diff options
| author | Dave Hibberd <hibby@debian.org> | 2025-07-22 20:57:03 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2025-07-22 20:57:03 +0100 |
| commit | 1cc87cf7663179e46d40e316276f2604bc8a7872 (patch) | |
| tree | 3f2080524be7d2b41616b758bd65d4745a055e79 /makefile | |
| parent | 30b1e26a04be2474ebda4cac931831dabb89eb74 (diff) | |
| parent | 1f40ff4a07793ecfa679a1384053451c4f3f536f (diff) | |
Update upstream source from tag 'upstream/6.0.24.77+repack'
Update to upstream version '6.0.24.77+repack'
with Debian dir bbbd57413e9e0c750630f2d175419335251e159d
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 32 |
1 files changed, 27 insertions, 5 deletions
@@ -17,10 +17,32 @@ OBJS = pngwtran.o pngrtran.o pngset.o pngrio.o pngwio.o pngtrans.o pngrutil.o pn # Configuration: -CC = gcc - -all: CFLAGS = -DLINBPQ -MMD -g -rdynamic -fcommon -fasynchronous-unwind-tables -all: LDFLAGS = -l:libpaho-mqtt3a.a -l:libjansson.a +#Default to Linux + CC = gcc + EXTRA_LDFLAGS = -Xlinker -Map=output.map -lrt -l:libpaho-mqtt3a.a -l:libjansson.a + +#other OS + +OS_NAME = $(shell uname -s) +ifeq ($(OS_NAME),NetBSD) + CC = cc + EXTRA_CFLAGS = -DFREEBSD -DNOMQTT -I/usr/pkg/include + EXTRA_LDFLAGS = -Xlinker -Map=output.map -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lrt -lutil -lexecinfo +endif +ifeq ($(OS_NAME),FreeBSD) + CC = cc + EXTRA_CFLAGS = -DFREEBSD -DNOMQTT -I/usr/local/include + EXTRA_LDFLAGS = -Xlinker -Map=output.map -L/usr/local/lib -lrt -liconv -lutil -lexecinfo +endif +ifeq ($(OS_NAME),Darwin) + CC = gcc + EXTRA_CFLAGS = -DMACBPQ -DNOMQTT + EXTRA_LDFLAGS = -liconv +endif + +$(info OS_NAME is $(OS_NAME)) + +all: CFLAGS = -DLINBPQ -MMD -g -fcommon -fasynchronous-unwind-tables $(EXTRA_CFLAGS) all: linbpq @@ -32,7 +54,7 @@ noi2c: linbpq linbpq: $(OBJS) - gcc $(OBJS) -Xlinker -Map=output.map -l:libminiupnpc.a -lrt -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq + cc $(OBJS) $(EXTRA_LDFLAGS) -lminiupnpc -lm -lz $(LDFLAGS) -lpthread -lconfig -lpcap -o linbpq sudo setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbpq -include *.d |
