ongrep

A cleaned up fork of ngrep for OpenBSD
git clone git://git.sgregoratto.me/ongrep
Log | Files | Refs | README | LICENSE

commit 9fe5368ffce8e9f27a5534e82f99f5aace22737a
parent 3ea97ada71823f64a41d2bee8ae42e02a9dee700
Author: Jordan Ritter <jpr5@darkridge.com>
Date:   Thu, 22 May 2014 10:22:19 -0700

Re-organize some compile flags and get HAVE_CONFIG_H back

Diffstat:
MMakefile.in | 15++++++++-------
Mconfig.h.in | 3+++
2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/Makefile.in b/Makefile.in @@ -5,9 +5,10 @@ CC=@CC@ -CFLAGS = -D@OS@ @EXTRA_DEFINES@ @EXTRA_INCLUDES@ @CFLAGS@ -LDFLAGS = @LDFLAGS@ @EXTRA_LDFLAGS@ -LIBS = @LIBS@ @EXTRA_LIBS@ +CPPFLAGS = @DEFS@ -D@OS@ @EXTRA_DEFINES@ @CPPFLAGS@ +CFLAGS = @EXTRA_INCLUDES@ @CFLAGS@ +LDFLAGS = @EXTRA_LDFLAGS@ @LDFLAGS@ +LIBS = @LIBS@ @EXTRA_LIBS@ STRIPFLAG=@STRIPFLAG@ @@ -34,20 +35,20 @@ REGEX_DIR=@REGEX_DIR@ all: $(TARGET) $(TARGET): $(REGEX_OBJS) $(OBJS) - $(CC) $(CFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LDFLAGS) $(LIBS) + $(CC) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LDFLAGS) $(LIBS) debug: $(REGEX_OBJS) $(OBJS) - $(CC) $(CFLAGS) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LDFLAGS) $(LIBS) + $(CC) -g -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LDFLAGS) $(LIBS) static: $(REGEX_OBJS) $(OBJS) - $(CC) $(CFLAGS) $(STRIPFLAG) -static -o $(TARGET).static $(OBJS) $(REGEX_OBJS) $(LDFLAGS) $(LIBS) + $(CC) $(STRIPFLAG) -static -o $(TARGET).static $(OBJS) $(REGEX_OBJS) $(LDFLAGS) $(LIBS) install: $(TARGET) $(INSTALL) -c -m 0755 $(TARGET) $(DESTDIR)/$(BINDIR_INSTALL)/$(TARGET) $(INSTALL) -c -m 0644 $(MANPAGE) $(DESTDIR)/$(MANDIR_INSTALL)/$(MANPAGE) .c.o: - $(CC) $(CFLAGS) -g -c $< + $(CC) $(CPPFLAGS) $(CFLAGS) -g -c $< clean: $(MAKE) -C $(REGEX_DIR) clean diff --git a/config.h.in b/config.h.in @@ -16,7 +16,10 @@ #define HAVE_DLT_IEEE802_11_RADIO @HAVE_DLT_IEEE802_11_RADIO@ #define USE_PCAP_RESTART @USE_PCAP_RESTART@ +#if USE_PCAP_RESTART #define PCAP_RESTART_FUNC @PCAP_RESTART_FUNC@ +extern void PCAP_RESTART_FUNC(); +#endif #define USE_DROPPRIVS @USE_DROPPRIVS@ #define DROPPRIVS_USER @DROPPRIVS_USER@