# Makefile for mod_fcgid for Windows NT, 2000 and beyond # Targets are: # _apacher - build Apache in Release mode # _apached - build Apache in Debug mode # installr - build and install a Release build # installd - build and install a Debug build # clean - remove (most) generated files # # The following install defaults may be customized; # # Option Default # INSTDIR /Apache22 # # For example; # # nmake -f Makefile-fcgid.win INSTDIR="d:/Program Files/Apache" installr # # Be aware that certain awk's will not accept backslashed names, # so the server root should be given in forward slashes (quoted), # preferably with the drive designation! INSTDIR=\Apache22 !IF EXIST("httpd.vcproj") && ([devenv /help > NUL 2>&1] == 0) \ && !defined(USEMAK) && !defined(USEDSW) USESLN=1 USEMAK=0 USEDSW=0 !ELSEIF EXIST("httpd.mak") && !defined(USEDSW) USESLN=0 USEMAK=1 USEDSW=0 !ELSE USESLN=0 USEMAK=0 USEDSW=1 !ENDIF !IF ("$(CTARGET)" == "") && ($(USESLN) == 1) CTARGET=/build !ENDIF !IF "$(INSTDIR)" == "" INSTDIR=\Apache22 !ENDIF APACHE2_HOME=$(INSTDIR) !IF EXIST("$(APACHE2_HOME)\lib\libapr-1.lib") APACHE2_APRSFX=-1 !ELSEIF EXIST("$(APACHE2_HOME)\lib\libapr.lib") APACHE2_APRSFX= !ELSE !MESSAGE Point INSTDIR at the directory containing an already installed httpd !MESSAGE including build support directories of lib and include. It must !MESSAGE include apr and apr-util. mod_fcgid cannot build without these files! !ENDIF !IF "$(LONG)" == "" !MESSAGE !MESSAGE INSTDIR = $(INSTDIR) !MESSAGE !MESSAGE To change these options use 'nmake -f Makefile-fcgid.win [option=value]' !MESSAGE Example: nmake -f Makefile-fcgid.win !MESSAGE !ENDIF !IFNDEF MAKEOPT # Only default the behavior if MAKEOPT= is omitted !IFDEF _NMAKE_VER # Microsoft NMake options MAKEOPT=-nologo !ELSEIF "$(MAKE)" == "make" # Borland make options? Not really supported (yet) MAKEOPT=-s -N !ENDIF !ENDIF _buildr: @$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=R LONG=Release _build _buildd: @$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=D LONG=Debug _build installr: @$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=R LONG=Release _build _install installd: @$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=D LONG=Debug _build _install clean: _cleanr _cleand -if exist Browse\. rd /s Browse < << > nul y << !IF $(USEMAK) == 1 _cleanr: $(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=R LONG=Release CTARGET=CLEAN _build _cleand: $(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=D LONG=Debug CTARGET=CLEAN _build _build: echo Building Win32 $(LONG) targets ($(SHORT) suffixes) cd modules\fcgid $(MAKE) $(MAKEOPT) -f mod_fcgid.mak CFG="mod_fcgid - Win32 $(LONG)" RECURSE=0 $(CTARGET) !IFDEF ALL $(MAKE) $(MAKEOPT) -f mod_fcgid_example.mak CFG="mod_fcgid_example - Win32 $(LONG)" RECURSE=0 $(CTARGET) !ENDIF cd ..\.. !ELSEIF $(USESLN) == 1 _cleanr: $(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=R LONG=Release CTARGET="/clean" _build _cleand: $(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=D LONG=Debug CTARGET="/clean" _build _build: echo Building Win32 $(LONG) targets ($(SHORT) suffixes) devenv mod_fcgid.sln /useenv $(CTARGET) $(LONG) /project mod_fcgid !IFDEF ALL devenv mod_fcgid.sln /useenv $(CTARGET) $(LONG) /project mod_fcgid_example !ENDIF !ELSE _cleanr: @$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=R LONG=Release CTARGET="/CLEAN" _build _cleand: @$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win SHORT=D LONG=Debug CTARGET="/CLEAN" _build _build: @echo Building Win32 $(LONG) targets ($(SHORT) suffixes) @msdev mod_fcgid.dsw /USEENV /MAKE "mod_fcgid - Win32 $(LONG)" $(CTARGET) !IFDEF ALL @msdev mod_fcgid.dsw /USEENV /MAKE "mod_fcgid_example - Win32 $(LONG)" $(CTARGET) !ENDIF !ENDIF _install: echo Y >.y echo A >.A -mkdir "$(INSTDIR)" !IFDEF COMPLETED -mkdir "$(INSTDIR)\conf" -mkdir "$(INSTDIR)\conf\extra" -mkdir "$(INSTDIR)\conf\original" -mkdir "$(INSTDIR)\conf\original\extra" -mkdir "$(INSTDIR)\manual" -mkdir "$(INSTDIR)\include" !ENDIF -mkdir "$(INSTDIR)\modules" copy CHANGES-FCGID "$(INSTDIR)\CHANGES-FCGID.txt" <.y copy LICENSE-FCGID "$(INSTDIR)\LICENSE-FCGID.txt" <.y copy NOTICE-FCGID "$(INSTDIR)\NOTICE-FCGID.txt" <.y copy README-FCGID "$(INSTDIR)\README-FCGID.txt" <.y copy modules\fcgid\$(LONG)\mod_fcgid.so "$(INSTDIR)\modules" <.y copy modules\fcgid\$(LONG)\mod_fcgid.pdb "$(INSTDIR)\modules" <.y !IFDEF ALL copy modules\fcgid\$(LONG)\mod_fcgid_example.so "$(INSTDIR)\modules" <.y copy modules\fcgid\$(LONG)\mod_fcgid_example.pdb "$(INSTDIR)\modules" <.y !ENDIF xcopy docs\manual "$(INSTDIR)\manual" /s /d < .a !IFDEF COMPLETED copy include\mod_fcgid.h "$(INSTDIR)\include" < .y > nul #awk -v BDIR=$(APACHE2_HOME) -f build\mkconfnw.awk # docs\conf\extra\httpd-fcgid.conf >$(INSTALL)\$(BASEDIR)\conf\extra\httpd-fcgid.conf awk -f build\installwinconf.awk $(DOMAINNAME) $(SERVERNAME) \ $(SERVERADMIN) "$(INSTDIR) " docs/conf/ !ENDIF del .y del .a