# Generated automatically from Makefile.in by configure.
SRC_COMMON=../common
SRC_CGI=../cgi

ALL=daemonchk.cgi traceroute.cgi
CGI_C=$(SRC_CGI)/getcgi.c
CGI_O=$(SRC_CGI)/getcgi.o
CGI_H=$(SRC_CGI)/getcgi.h
COMMON_H=$(SRC_COMMON)/config.h $(SRC_COMMON)/common.h $(SRC_COMMON)/locations.h

##############################################################################
# standard targets (all, clean, distclean, devclean, install)

all: $(ALL)

clean:
	rm -f daemonchk.cgi core *.o

distclean: clean
	rm -f Makefile

devclean: distclean
	rm -f *~

install:
	$(INSTALL) -m 775 $(INSTALL_OPTS) -d $(CGIDIR)
	for f in $(ALL); do $(INSTALL) -m 775 $(INSTALL_OPTS) $$f $(CGIDIR); done

##############################################################################
# rules and dependencies for actual target programs

daemonchk.cgi: daemonchk.c $(CGI_O) $(CGI_H) $(COMMON_H)

##############################################################################
# dependencies

$(CGI_O): $(CGI_C)
	cd $(SRC_CGI); make $(CGI_O)

##############################################################################
# implicit rules

%.cgi : %.c
	$(CC) $(CFLAGS) $(LDFLAGS) $< $(CGI_O) -o $@
