# Generated automatically from Makefile.in by configure. # Makefile.in # $@ target file name in rule # $* basename of a filename # $< filename of a rule's first dependency # $^ list of all of a rules dependencies # $? list of all of a rules dependencies that are newer than the target ########################################################### # Variables ########################################################### prefix = /usr/local top_srcdir = . SBINDIR = $(prefix)/sbin CFGDIR = /etc PROGS = twhttpd htpasswd ########################################################### # compilers and options ########################################################### INSTALL := /usr/bin/install -c -o root -g wheel MKINSTALLDIRS = $(SHELL) $(top_srcdir)/mkinstalldirs SHELL = /bin/sh LEX := flex YACC := bison -y -d CC := cc RPM = `which rpm` CFLAGS := -fno-common DEFS := -DHAVE_INET_ATON=1 -DHAVE_INET_PTON=1 LIBS := -lmd ########################################################### # default actions ########################################################### all: $(PROGS) ########################################################### # main programs ########################################################### y.tab.c y.tab.h: cfg_parser.y cfg_functions.h structs.h config.h $(YACC) $< y.tab.o: y.tab.c $(CC) $(CFLAGS) $(DEFS) -c $< lex.yy.c: cfg_parser.l y.tab.h structs.h config.h $(LEX) $< lex.yy.o: lex.yy.c $(CC) $(CFLAGS) $(DEFS) -c $< cfg_functions.o: cfg_functions.c cfg_functions.h y.tab.h base64.h twhttpd.h structs.h config.h $(CC) $(CFLAGS) $(DEFS) -c $< md5.o: md5.c md5.h $(CC) $(CFLAGS) $(DEFS) -c $< base64.o: base64.c base64.h config.h $(CC) $(CFLAGS) $(DEFS) -c $< httplog.o: httplog.c httplog.h structs.h config.h $(CC) $(CFLAGS) $(DEFS) -c $< twhttpd: twhttpd.c base64.o cfg_functions.o httplog.o lex.yy.o y.tab.o $(CC) $(CFLAGS) $(DEFS) $(LIBS) $^ -o $@ ########################################################### # utilities ########################################################### htpasswd: htpasswd.c $(CC) $(CFLAGS) $(LIBS) $< -o $@ ########################################################### # MISC make options ########################################################### .PHONY: clean pkg install clean: rm -f *.o lex.yy.c y.tab.c y.tab.h pkg: rm -f *.o lex.yy.c y.tab.c y.tab.h rm -f config.cache config.log config.status rm -f Makefile rm -f twhttpd htpasswd if test -e "changelog" ; then mv -f changelog CHANGELOG ; fi if test -e "readme" ; then mv -f readme README ; fi if test -e "install" ; then mv -f install INSTALL ; fi install: @echo '#' @echo '# Install twhttpd as ${SBINDIR}/twhttpd ' @echo '# Install rm_cache as ${SBINDIR}/rm_cache ' @echo '# Install twhttpd.cfg as ${CFGDIR}/twhttpd.cfg ' @echo '# ' $(INSTALL) -o root -g root -m 0755 twhttpd ${SBINDIR}/twhttpd $(INSTALL) -o root -g root -m 0755 rm_cache ${SBINDIR}/rm_cache $(INSTALL) -o root -g root -m 0700 twhttpd.cfg ${CFGDIR}/twhttpd.cfg @echo '# Done! ' rpm: @echo '# Making twhttpd RPM' $(RPM) -bb twhttpd.spec