blob: 2bc1ea012b7ed11aebc12b3fb7a7b8edd3e3b8a6 [file] [log] [blame] [raw]
OBJ=.
DEST=.
BITS=32
IOBJS=$(OBJ)/ipsend.o $(OBJ)/ip.o $(OBJ)/ipsopt.o $(OBJ)/iplang_y.o \
$(OBJ)/iplang_l.o
ROBJS=$(OBJ)/ipresend.o $(OBJ)/ip.o $(OBJ)/resend.o $(IPFTO)
TOBJS=$(OBJ)/iptest.o $(OBJ)/iptests.o $(OBJ)/ip.o
UNIXOBJS=$(OBJ)/dlcommon.o $(OBJ)/sdlpi.o $(OBJ)/arp.o
LIBS=-lsocket -lnsl -L$(OBJ) -lipf
LIBSRC=$(TOP)/lib
CC=gcc
DEBUG=-g
CFLAGS=$(DEBUG) -I$$(TOP) -Dsolaris
CCARGS=$(CFLAGS) -I.
include $(TOP)/lib/Makefile
all build dlpi sunos5 : $(OBJ)/ipsend $(OBJ)/ipresend $(OBJ)/iptest \
$(OBJ)/libipf.a
.c.o:
$(CC) $(CCARGS) -c $< -o $@
$(OBJ)/iplang_y.o: $(TOP)/iplang/iplang_y.y
(cd $(TOP)/iplang; $(MAKE) ../SunOS5/$(CPUDIR)/$@ 'DESTDIR=../SunOS5/$(CPUDIR)/$(OBJ)' 'CFLAGS=$(CFLAGS)' 'OBJ=$(OBJ)')
$(OBJ)/iplang_l.o: $(TOP)/iplang/iplang_l.l
(cd $(TOP)/iplang; $(MAKE) ../SunOS5/$(CPUDIR)/$@ 'DESTDIR=../SunOS5/$(CPUDIR)/$(OBJ)' 'CFLAGS=$(CFLAGS)' 'OBJ=$(OBJ)')
$(OBJ)/ipsend: $(IOBJS) $(UNIXOBJS) $(OBJ)/libipf.a
$(CC) $(DEBUG) $(IOBJS) $(UNIXOBJS) -o $@ $(LIBS) -ll
$(OBJ)/ipresend: $(ROBJS) $(UNIXOBJS) $(OBJ)/libipf.a
$(CC) $(DEBUG) $(ROBJS) $(UNIXOBJS) -o $@ $(LIBS)
$(OBJ)/iptest: $(TOBJS) $(UNIXOBJS) $(OBJ)/libipf.a
$(CC) $(DEBUG) $(TOBJS) $(UNIXOBJS) -o $@ $(LIBS)
clean:
rm -rf *.o core a.out ipsend ipresend iptest iplang_l.* iplang_y.*
$(OBJ)/ipsend.o: $(TOP)/ipsend/ipsend.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/ipsend.c -o $@
$(OBJ)/ipsopt.o: $(TOP)/ipsend/ipsopt.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/ipsopt.c -o $@
$(OBJ)/ipresend.o: $(TOP)/ipsend/ipresend.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/ipresend.c -o $@
$(OBJ)/ip.o: $(TOP)/ipsend/ip.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/ip.c -o $@
$(OBJ)/resend.o: $(TOP)/ipsend/resend.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/resend.c -o $@
$(OBJ)/iptest.o: $(TOP)/ipsend/iptest.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/iptest.c -o $@
$(OBJ)/iptests.o: $(TOP)/ipsend/iptests.c
$(CC) $(CCARGS) -Dsolaris -c $(TOP)/ipsend/iptests.c -o $@
$(OBJ)/sock.o: $(TOP)/ipsend/sock.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/sock.c -o $@
$(OBJ)/arp.o: $(TOP)/ipsend/arp.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/arp.c -o $@
$(OBJ)/dlcommon.o: $(TOP)/ipsend/dlcommon.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/dlcommon.c -o $@
$(OBJ)/sdlpi.o: $(TOP)/ipsend/sdlpi.c
$(CC) $(CCARGS) -c $(TOP)/ipsend/sdlpi.c -o $@