# The one and only PROGRAMS = httpdate PROGARGS = www.ebay.com http://www.google.com http://www.youtube.com http://www.slashdot.org http://www.microsoft.com http://localhost http://www.amazon.com # The source files CSRC = httpdate.c TimeServer.c HttpUrl.c Clock.c COBJ = $(CSRC:%.c=%.o) CFLAGS = -ansi -Wall CFLAGSRELEASE = -O3 -DNDEBUG CFLAGSDEBUG = -Wall -g C = gcc # File of dependency DEPENDFILE = .depend # Make executeable all: $(PROGRAMS) # Build executeable if obj have been modified $(PROGRAMS): $(COBJ) $(C) $(CFLAGS) $(COBJ) -o $(PROGRAMS) # Make dependencies of source dep: $(C) $(CFLAGS) -MM $(CSRC) > $(DEPENDFILE) # Include the dependency file -include $(DEPENDFILE) # Run the little proggy run: all ./$(PROGRAMS) $(PROGARGS) # Get rid of all files which are build by make clean: rm -f *.o rm -f $(PROGRAMS)