makefile

# This makefile builds webserver using gcc.

CC = gcc
CFLAGS = -Wall
LIBS = -lsocket -lnsl
TARGET = webserver

default : $(TARGET)

$(TARGET) : jadehttpd.o jadesocket.o
	$(CC) jadesocket.o jadehttpd.o $(LIBS) -o $(TARGET)

jadehttpd.o : jadehttpd.c
	$(CC) $(CFLAGS) -c jadehttpd.c

jadesocket.o : jadesocket.c
	$(CC) $(CFLAGS) -c jadesocket.c

all : $(TARGET)

clean :
	@-rm -f *.o *~ $(TARGET)

install : $(TARGET)
	@echo Copy ./$(TARGET) to the directory of your choice.
Valid HTML 4.01 Valid CSS