# Make file for the icmp daemon # First, the descriptions of how to make .o files from .c and .s files # These are needed because the default compilation commands result in # the protection mode of the .o file being 0666, which we don't want .c.o: cc $(CFLAGS) -c $< chmod 0644 $@ .s.o: as - -o $@ $< chmod 0644 $@ # Next, the macro definitions L = icmplib.a INC-FILES = extern.h params.h OBJ-FILES = icmplib.a!globals.o icmplib.a!icmp_codes.o icmplib.a!request.o \ icmplib.a!timer.o # Next, the compiler flags CFLAGS = -O # Finally, the debug flag - DEBUG=DBG ==> debugging DEBUG = # Now, the descriptions for the daemon and its components icmpd$(DEBUG): icmpd.o $(OBJ-FILES) icmp$(DEBUG).o \ $(L)!internet.o $(L)!names.o $(L)!tst_and_clr.o cc -n -o icmpd$(DEBUG) icmpd.o icmp$(DEBUG).o $(L) -lU -lS -rm -f globals.o icmp_codes.o request.o timer.o internet.o \ request.o names.o tst_and_clr.o icmp$(DEBUG).o >/dev/null $(OBJ-FILES): $(INC-FILES) icmp$(DEBUG).o: $(INC-FILES) icmp_codes.h ip.h icmp.h icmp.c cp icmp.c icmptmp.c cc -c -D$(DEBUG) -DTEMPORARY icmptmp.c mv icmptmp.o icmp$(DEBUG).o rm icmptmp.c $(L)!globals.o: ip.h $(L)!internet.o: params.h ip.h netdefs.h $(L)!request.o: icmp_codes.h ip.h icmp.h $(L)!timer.o: ip.h # Last, the command to install the daemon install: cp icmpd /etc/icmpd -chown Net_Daemon /etc/icmpd -chmod 02755 /etc/icmpd