bgpdump /

CC	= @CC@

LD	= @CC@
AR	= @AR@


prefix   = @prefix@
exec_prefix = @exec_prefix@
bindir   = @bindir@
libdir   = @libdir@
includedir = @includedir@

LIB_H	 = bgpdump_attr.h bgpdump_formats.h bgpdump_lib.h bgpdump_mstream.h
LIB_O	 = bgpdump_lib.o bgpdump_mstream.o cfile_tools.o util.o inet_ntop.o
OTHER    = *.in configure bgpdump.spec README* ChangeLog License*

all: bgpdump 

libbgpdump.a: $(LIB_H) $(LIB_O) Makefile cfile_tools.h util.h
	$(AR) r libbgpdump.a $(LIB_O)
	$(RANLIB) libbgpdump.a libbgpdump.a

testbgpdump: test.c libbgpdump.a
	$(COMPILE) -o testbgpdump test.c libbgpdump.a $(SYS_LIBS)

bgpdump: bgpdump.c libbgpdump.a
	$(COMPILE) -o bgpdump bgpdump.c libbgpdump.a $(SYS_LIBS)

	rm -f test_out/*.bgp.gz

test: test-clean bgpdump

clean: test-clean
	rm -f libbgpdump.a testbgpdump bgpdump $(LIB_O)

distclean: clean
	rm -Rf config.log config.status *.dSYM core *.core autom4te.cache bgpdump-config.h Makefile
	rm -Rf $(PKG)

install: all testbgpdump
	install -d $(bindir) $(includedir) $(libdir)
	install bgpdump testbgpdump $(bindir)
	install $(LIB_H) $(includedir)
	install libbgpdump.a $(libdir)

	mkdir $(PKG)
	ln *.h *.c $(OTHER) $(PKG)
	tar -czf $(PKG).tgz $(PKG)
	rm $(PKG)/* && rmdir $(PKG)

rpm: dist
	rpmbuild -v -ta $(PKG).tgz
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.