# Makefile for tp dtp itp tap and ntap # # If your machine is big endian, uncomment the next line #END= -DBIGEND # # If you need uintN_t types defined, uncomment the next line. # Ubuntu Linux 18.04 needs this define. FreeBSD doesn't. # Also add -DNEEDITYPES if you need intN_t types defined. TYPES= -DNEEDUTYPES CC= gcc CFLAGS= -Wall $(END) $(TYPES) BINDIR=/usr/local/bin MANDIR=/usr/local/man/man1 BINS= tp dtp itp tap ntap MANS= tp.1 dtp.1 itp.1 tap.1 ntap.1 all: $(BINS) tp: tp.c $(CC) -o tp $(CFLAGS) tp.c itp: itp.c $(CC) -o itp $(CFLAGS) itp.c dtp: dtp.c $(CC) -o dtp $(CFLAGS) dtp.c tap: tap.c $(CC) -o tap $(CFLAGS) tap.c ntap: ntap.c $(CC) -o ntap $(CFLAGS) ntap.c install: $(BINS) $(MANS) install -m 755 -o bin -g bin $(BINS) $(BINDIR) install -c -m 644 -o bin -g bin $(MANS) $(MANDIR) clean: rm -f $(BINS) *.o