# # Makefile for fhttpd # Makefile Copyright (C) 1995-99 Alex Belits # # This source/code is public free; you can distribute it and/or modify # it under terms of the GNU General Library Public License (published # by the Free Software Foundation) either version two of this License, # or any later version. # # Default compilers and linker CC ?= cc CXX ?= c++ LD = $(CXX) # OS-dependent definitions (choose one and adjust, if necessary) ## for SunOS 4.1.x: # #COPTS = -O2 -DLS_OPTIONS_IGNORE -DMUST_ALIGN -DNO_SNPRINTF\ # -DTM_GMTOFF_PRESENT -DSA_RESTART=0 -DBSD43_MSGHDR\ # -DMAP_FILE=0 -DGETOPT_VARS_NOT_DEFINED -DNO_MEMMOVE\ # -DSIGARGS="int sig,..." -DSIGACTARGS="..."\ # -D__s32=int # -DFCNTL_LOCK ## for Solaris 2.x (SunOS 5.x): # #CC = /opt/SUNWspro/bin/cc #CXX = /opt/SUNWspro/bin/CC #LD = /opt/SUNWspro/bin/CC #COPTS = -DLS_OPTIONS_IGNORE -DMUST_ALIGN -DNO_SNPRINTF\ # -DSOLARIS -DUSE_GETSPNAM -DNEED_CRYPT_H -DBSD43_MSGHDR\ # -DMAP_FILE=0 -DGETOPT_VARS_NOT_DEFINED -DGLOBAL_TIMEZONE\ # -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ # -D__s32=int # -DFCNTL_LOCK #LFLAGS = -lsocket -lnsl ## for AIX 3.x: # #COPTS = -O2 -DAIX -DLS_OPTIONS_IGNORE -DNO_SNPRINTF\ # -DNEED_SELECT_H -DSIGARGS="int sig" -DSIGACTARGS="..."\ # -DBSD43_MSGHDR -DCOMPAT_43 -I. -I/usr/include\ # -DGLOBAL_TIMEZONE -D__s32=int \ # # -DFCNTL_LOCK ## for AIX 4.x: ## COMPAT_43 because BSD4.4 support is broken # #CC = xlc #CXX = xlC #LD = $(CXX) #COPTS = -O2 -DAIX -DAIX4 -DLS_OPTIONS_IGNORE -DNO_SNPRINTF\ # -DNEED_SELECT_H -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ # -DBSD43_MSGHDR -DCOMPAT_43 -I.\ # -DGLOBAL_TIMEZONE -D__s32=int -Dseteuid=setuid\ # # -DFCNTL_LOCK ## for IRIX 6.x # #CXX = KCC #CC = cc #LD = $(CXX) #COPTS = -O2 -DLS_OPTIONS_IGNORE -DNO_SNPRINTF\ # -DMUST_ALIGN -DSIGARGS=int -DSIGACTARGS=int\ # -DIRIX -DSIGBUS=10 -DMAP_FILE=0 -DGLOBAL_TIMEZONE -D__s32=int\ # -DBSD43_MSGHDR # -DFCNTL_LOCK ## for IRIX 4.x (not tested, most likely broken) # #COPTS = -O2 -DLS_OPTIONS_IGNORE -DMUST_ALIGN -DPSEUDOPOLL\ # -DSIGARGS="int sig,..." -DSIGACTARGS="int sig,..."\ # -D_LANGUAGE_C_PLUS_PLUS -DSA_RESTART=0x10000000 -D__s32=int\ # -DGLOBAL_TIMEZONE -DBSD43_MSGHDR # -DFCNTL_LOCK ## for HP-UX # #COPTS = -O3 -DLS_OPTIONS_IGNORE -DMUST_ALIGN -DNO_SNPRINTF\ # -DSIGARGS="int sig" -DSIGACTARGS="..."\ # -DSA_RESTART=0 -DRLIM_INFINITY=0x7fffffff -DBSD43_MSGHDR\ # -DMAXPATHLEN=1024 -Dseteuid=setuid -DGLOBAL_TIMEZONE -D__s32=int\ # # -DFCNTL_LOCK #LFLAGS = -lM ## for Digital Unix # #CC = cc #CXX = cxx #LD = $(CXX) #COPTS = -O2 -DLS_OPTIONS_IGNORE -DDIGITAL\ # -DSIGARGS="int sig" -DSIGACTARGS="int sig" -D__s32=int\ # -DBSD43_MSGHDR -DNO_SNPRINTF -DGLOBAL_TIMEZONE # -DFLOCK ## for Linux (libc 5): # #COPTS = -Wall -O3 -felide-constructors -DLS_OPTIONS_IGNORE -DPSEUDOPOLL\ # -DMMAPPAGESIZE=65536 -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ # -DGLOBAL_TIMEZONE # -DFLOCK ## for Linux (glibc2/libc 6): # #COPTS = -Wall -O3 -felide-constructors -DLS_OPTIONS_IGNORE\ # -DNEED_CRYPT_H -DCMSG_DATA_IS_A_MACRO \ # -DMMAPPAGESIZE=65536 -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ # -D__s32=int\ # -DGLOBAL_TIMEZONE -DGLIBC -DERRNO_DEFINED # -DFLOCK #LFLAGS= -lcrypt ## for FreeBSD 2.2: # COPTS = -fno-strength-reduce -DLS_OPTIONS_IGNORE\ -D__s32=int -DMMAPPAGESIZE=65536\ -DPSEUDOPOLL -DCMSG_DATA_IS_A_MACRO\ -DSIGARGS="int sig" -DSIGACTARGS="int sig"\ -DTM_GMTOFF_PRESENT -DERRNO_DEFINED # -DFLOCK LFLAGS = -lcrypt # End of OS-dependent definitions # Debugging DEBUG = -g #DEBUG = -g -DDEBUG #DEBUG = # Don't modify anything below CXXOPTS = $(COPTS) CXXFLAGS += $(CXXOPTS) $(DEBUG) CFLAGS += $(COPTS) $(DEBUG) FHTTPD_OFILES = pseudopoll.o lists.o wildmat.o util.o configfile.o users.o \ process.o log.o loadedfile.o sockobj.o configargs.o fhttpd.o FHTTPDFILE_OFILES = fhttpd-file.o servproc.o imageform.o lists.o wildmat.o \ configargs.o FHTTPDLOG_OFILES = fhttpd-log.o servproc.o lists.o wildmat.o \ configargs.o all: fhttpd fhttpd-file fhttpd-log @ls -l fhttpd fhttpd-file fhttpd-log clean: rm -f *~ *.flc *.core core *.o fhttpd fhttpd-file fhttpd-log .c.o: $(CC) $(CFLAGS) -c -o $@ $< .cc.o: $(CXX) $(CXXFLAGS) -c -o $@ $< fhttpd: $(FHTTPD_OFILES) $(LD) $(LFLAGS) -o fhttpd $(FHTTPD_OFILES) fhttpd-file: $(FHTTPDFILE_OFILES) $(LD) $(LFLAGS) -o fhttpd-file $(FHTTPDFILE_OFILES) fhttpd-log: $(FHTTPDLOG_OFILES) $(LD) $(LFLAGS) -o fhttpd-log $(FHTTPDLOG_OFILES) # End