diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-11-29 01:35:56 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-11-29 02:24:20 +0000 |
| commit | c77b3e9f470f62d1a86647dc3fdf748462f4fd44 (patch) | |
| tree | 0c2a91a2bf766a730eddd64f9e254de35f0a00d2 /debian/patches/makefile | |
| parent | 1e83f7e7253b067dc084245e12d969b8c6cf6114 (diff) | |
More updates, large makefile rewrite for dynamic linking and cleaner
build, WIP.
Diffstat (limited to 'debian/patches/makefile')
| -rw-r--r-- | debian/patches/makefile | 59 |
1 files changed, 52 insertions, 7 deletions
diff --git a/debian/patches/makefile b/debian/patches/makefile index 00c189c..7e49309 100644 --- a/debian/patches/makefile +++ b/debian/patches/makefile @@ -1,21 +1,66 @@ --- a/makefile +++ b/makefile -@@ -33,11 +33,14 @@ +@@ -2,7 +2,7 @@ - linbpq: $(OBJS) - gcc $(OBJS) -Xlinker -Map=output.map -l:libminiupnpc.a -lrt -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq + # To exclude i2c support run make noi2c + +-OBJS = pngwtran.o pngrtran.o pngset.o pngrio.o pngwio.o pngtrans.o pngrutil.o pngwutil.o\ ++COMPLETE_SRC = pngwtran.o pngrtran.o pngset.o pngrio.o pngwio.o pngtrans.o pngrutil.o pngwutil.o\ + pngread.o pngwrite.o png.o pngerror.o pngget.o pngmem.o APRSIconData.o AISCommon.o\ + upnp.o APRSStdPages.o HSMODEM.o WinRPR.o KISSHF.o TNCEmulators.o bpqhdlc.o SerialPort.o\ + adif.o WebMail.o utf8Routines.o VARA.o LzFind.o Alloc.o LzmaDec.o LzmaEnc.o LzmaLib.o \ +@@ -18,26 +18,41 @@ + # Configuration: + + CC = gcc +- +-all: CFLAGS = -DLINBPQ -MMD -g -fcommon +-all: LDFLAGS = -l:libpaho-mqtt3a.a -l:libjansson.a +-all: linbpq ++LD = $(CC) ++CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) ++CFLAGS+=$(shell dpkg-buildflags --get CPPFLAGS) ++CFLAGS+=-DLINBPQ ++LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) ++ ++$(warning CFLAGS are $(CFLAGS)) ++ ++LIBS = -lrt -lm -lz -lpthread -lconfig -lpcap -lpaho-mqtt3a -ljansson -lminiupnpc + + +-nomqtt: CFLAGS = -DLINBPQ -MMD -fcommon -g -DNOMQTT ++ ++all: linbpq ++ ++nomqtt: CFLAGS += -DNOMQTT + nomqtt: linbpq + +-noi2c: CFLAGS = -DLINBPQ -MMD -DNOI2C -g -fcommon ++noi2c: CFLAGS += -DNOI2C + noi2c: linbpq + ++COMPLETE_OBJS = $(COMPLETE_SRC:.c=o) + +-linbpq: $(OBJS) +- gcc $(OBJS) -Xlinker -Map=output.map -l:libminiupnpc.a -lrt -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq - sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq -+ # sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq ++.c.o: ++ $(CC) $(CFLAGS) $(LDFLAGS) -c $< - -include *.d +--include *.d -clean : - rm *.d - rm linbpq $(OBJS) ++linbpq: $(COMPLETE_OBJS) ++ $(LD) $(LDFLAGS) -o linbpq $(COMPLETE_OBJS) $(LIBS) ++ ++-include *.d + +install: + install -b -m 755 -D -d debian/linbpq/usr/sbin -+ install -b -m 755 -s -p linbpq debian/linbpq/usr/sbin - ++ install -b -m 755 -p linbpq debian/linbpq/usr/sbin ++ +clean: + $(RM) *.d + $(RM) linbpq $(OBJS) |
