pppdump_use_zlib

support building pppdump with the system zlib


Gbp-Pq: Name pppdump_use_zlib
This commit is contained in:
Ubuntu Developers 2022-05-14 02:43:52 +08:00 committed by openKylinBot
parent 8e9c8720e8
commit 268741dad0
1 changed files with 26 additions and 2 deletions

View File

@ -2,18 +2,42 @@ DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
MANDIR = $(DESTDIR)/share/man/man8
DO_DEFLATE=y
DO_BSD_COMPRESS=y
HAVE_ZLIB=n
COPTS=-O2 -g
CFLAGS= $(COPTS) -I../include/net
LDFLAGS=$(LDOPTS)
OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
OBJS = pppdump.o
LIBS =
ifdef DO_DEFLATE
CFLAGS += -DDO_DEFLATE=1
OBJS += deflate.o
ifdef HAVE_ZLIB
LIBS += -lz
else
OBJS += zlib.o
endif
else
CFLAGS += -DDO_DEFLATE=0
endif
ifdef DO_BSD_COMPRESS
CFLAGS += -DDO_BSD_COMPRESS=1
OBJS += bsd-comp.o
else
CFLAGS += -DDO_BSD_COMPRESS=0
endif
INSTALL= install
all: pppdump
pppdump: $(OBJS)
$(CC) $(LDFLAGS) -o pppdump $(OBJS)
$(CC) $(LDFLAGS) -o pppdump $(OBJS) $(LIBS)
clean:
rm -f pppdump $(OBJS) *~