# Makefile1 # # compile myprog.c # # note the include and lib subdirectories # # usage: # make -f Makefile1 to compile/link # make -f Makefile1 clean to remove old object files # make -f Makefile1 install to make myprog.cgi executable by others CC = gcc CFLAGS = -O2 INCLUDE = -I./include PROG = myprog.cgi SRCS=myprog.c cgi-util.c OBJS=myprog.o cgi-util.o all: $(PROG) clean: rm -f $(PROG); rm -f $(OBJS) install: chmod go+x $(PROG) $(PROG) : $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(OBJS) : $(SRCS) $(CC) $(CFLAGS) $(INCLUDE) -c $*.c