apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr NWGNUmakefile
Date Fri, 01 Mar 2002 22:25:26 GMT
bnicholes    02/03/01 14:25:26

  Added:       build    NWGNUtail.inc NWGNUmakefile NWGNUhead.inc
                        NWGNUenvironment.inc
               .        NWGNUmakefile
  Log:
  Switching from a project build file to GNU make files
  
  Revision  Changes    Path
  1.1                  apr/build/NWGNUtail.inc
  
  Index: NWGNUtail.inc
  ===================================================================
  #
  # This contains final targets and should be included at the end of any
  # NWGNUmakefile file
  #
  
  #
  # If we are going to create an nlm, make sure we have assigned variables to 
  # use during the link.
  #
  echo NLM_NAME=$(NLM_NAME)
  ifndef NLM_NAME
  NLM_NAME = $(TARGET_nlm)
  endif
  
  ifndef NLM_DESCRIPTION
  NLM_DESCRIPTION = $(NLM_NAME)
  endif
  
  ifndef NLM_THREAD_NAME
  NLM_THREAD_NAME = $(NLM_NAME) Thread
  endif
  
  #
  # Create dependency lists based on the files available
  #
  
  
  CCOPT_DEPENDS 	= \
  				$(APR_WORK)\build\NWGNUhead.inc \
  				$(APR_WORK)\build\NWGNUenvironment.inc \
  				$(APR_WORK)\build\NWGNUtail.inc \
  				NWGNUmakefile \
  				$(CUSTOM_INI) \
  				$(EOLIST)
                  
  CPPOPT_DEPENDS	= \
  				$(APR_WORK)\build\NWGNUhead.inc \
  				$(APR_WORK)\build\NWGNUenvironment.inc \
  				$(APR_WORK)\build\NWGNUtail.inc \
  				NWGNUmakefile \
  				$(CUSTOM_INI) \
  				$(EOLIST)
  
  $(NLM_NAME)_LINKOPT_DEPENDS	= \
  				$(TARGET_lib) \
  				$(APR_WORK)\build\NWGNUenvironment.inc \
  				NWGNUmakefile \
  				$(APR_WORK)\build\NWGNUtail.inc \
  				$(CUSTOM_INI) \
  				$(EOLIST)
  
  ifeq "$(words $(strip $(TARGET_lib)))" "1"
  LIB_NAME					= $(basename $(notdir $(TARGET_lib)))
  $(LIB_NAME)_LIBLST_DEPENDS	= \
  				$(FILES_lib_objs) \
  				$(APR_WORK)\build\NWGNUenvironment.inc \
  				NWGNUmakefile \
  				$(APR_WORK)\build\NWGNUtail.inc \
  				$(CUSTOM_INI) \
  				$(EOLIST)
  endif
  
  ifeq "$(wildcard NWGNU$(LIB_NAME))" "NWGNU$(LIB_NAME)"
  $(LIB_NAME)_LIBLST_DEPENDS	+= NWGNU$(LIB_NAME)
  endif
  
  ifeq "$(wildcard NWGNU$(NLM_NAME))" "NWGNU$(NLM_NAME)"
  $(NLM_NAME)_LINKOPT_DEPENDS	+= NWGNU$(NLM_NAME)
  CCOPT_DEPENDS 	+= NWGNU$(NLM_NAME)
  CPPOPT_DEPENDS 	+= NWGNU$(NLM_NAME)
  endif
  
  #
  # Generic compiler rules
  #
  
  $(OBJDIR)/%.o: %.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt 
  
  $(OBJDIR)\cc.opt: $(CCOPT_DEPENDS)
  	@echo CCOPT_DEPENDS=$(CCOPT_DEPENDS)
  	$(CHK) $@ $(DEL) $@
  	@echo Generating $@
  ifneq "$(strip $(CFLAGS))" ""
  	@echo $(CFLAGS) >> $@
  endif	
  ifneq "$(strip $(XCFLAGS))" ""
  	@echo $(XCFLAGS) >> $@
  endif
  ifneq "$(strip $(XINCDIRS))" ""
  	@echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >>
$@
  endif	
  ifneq "$(strip $(INCDIRS))" ""
  	@echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
  endif
  ifneq "$(strip $(DEFINES))" "" 
  	@echo $(DEFINES) >> $@
  endif
  ifneq "$(strip $(XDEFINES))" "" 
  	@echo $(XDEFINES) >> $@
  endif
  
  $(OBJDIR)/%.o: %.cpp $(OBJDIR)\cpp.opt
  	@echo Compiling $<
  	$(CPP) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cpp.opt 
  
  $(OBJDIR)\cpp.opt: $(CPPOPT_DEPENDS)
  	$(CHK) $@ $(DEL) $@
  	@echo Generating $@
  ifneq "$(strip $(CFLAGS))" ""
  	@echo $(CFLAGS) >> $@
  endif	
  ifneq "$(strip $(XCFLAGS))" ""
  	@echo $(XCFLAGS) >> $@
  endif
  ifneq "$(strip $(XINCDIRS))" ""
  	@echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >>
$@
  endif	
  ifneq "$(strip $(INCDIRS))" ""
  	@echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
  endif
  ifneq "$(strip $(DEFINES))" "" 
  	@echo $(DEFINES) >> $@
  endif
  ifneq "$(strip $(XDEFINES))" "" 
  	@echo $(XDEFINES) >> $@
  endif
  
  #
  # Rules to build libraries
  #
  
  # If we only have one target library then build it
  
  ifeq "$(words $(strip $(TARGET_lib)))" "1"
  
  $(TARGET_lib) : $(OBJDIR)\$(LIB_NAME)_lib.lst
  	@echo Generating $@
  	$(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
  	$(LIB) -o $(OBJDIR)\$(@F) @$?
     
  $(OBJDIR)\$(LIB_NAME)_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
  	$(CHK) $@ $(DEL) $@
  	@echo Generating $@
  ifneq "$(strip $(FILES_lib_objs))" ""
  	@echo $(foreach objfile,$(FILES_lib_objs),$(subst /,\,$(objfile)) ) >> $@
  endif
  
  else # We must have more than one target library so load the individual makefiles
  
  $(OBJDIR)/%.lib: NWGNU% $(APR_WORK)\build\NWGNUhead.inc $(APR_WORK)\build\NWGNUtail.inc
$(APR_WORK)\build\NWGNUenvironment.inc FORCE
  	@echo Calling $<
  	$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
  
  endif
  
  #
  # Rules to build nlms. 
  #
  
  vpath libcpre.o $(NOVELLLIBC)\imports
  
  # If we only have one target NLM then build it
  ifeq "$(words $(strip $(TARGET_nlm)))" "1"
  
  $(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)\$(NLM_NAME)_link.opt
  	@echo Linking $@
  	$(LINK) @$(OBJDIR)\$(NLM_NAME)_link.opt
  
  # This will force the link option file to be rebuilt if we change the 
  # corresponding makefile
  
  $(OBJDIR)\$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
  	$(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
  	$(CHK) $(OBJDIR)\$(NLM_NAME)_link.def $(DEL) $(OBJDIR)\$(NLM_NAME)_link.def
  	@echo Generating $@
  	@echo -warnings off >> $@
  	@echo -zerobss >> $@
  	@echo -desc "$(NLM_DESCRIPTION)" >> $@
  	@echo -o $(TARGET_nlm) >> $@
  ifneq "$(FILE_nlm_copyright)" ""
  	@-type $(FILE_nlm_copyright) >> $@
  endif
  ifeq "$(RELEASE)" "debug"
  	@echo -g >> $@
  	@echo -sym internal >> $@
  	@echo -sym codeview4 >> $@
  	@echo -osym $(OBJDIR)\$(NLM_NAME).sym >> $@
  else	
  	@echo -sym internal >> $@
  endif	
  	@echo -screenname "Apache for NetWare" >> $@ 
  ifneq "$(NLM_VERSION)" ""
  	@echo -nlmversion=$(NLM_VERSION) >> $@ 
  else
  	@echo -nlmversion=$(VERSION) >> $@
  endif
  	@echo -l $(APR)/$(OBJDIR) >> $@
  	@echo -l $(APRUTIL)/$(OBJDIR) >> $@
  	@echo -l $(XML)/$(OBJDIR) >> $@
  	@echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime" >> $@
  	@echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++" >> $@
  	@echo -l $(NOVELLLIBC)/imports >> $@
  ifneq "$(LDAPSDK)" ""    
  	@echo -l $(LDAPSDK)/lib/nlm >> $@
  endif    
  	@echo -nodefaults >> $@
  	@echo -map $(OBJDIR)\$(NLM_NAME).map>> $@
  	@echo -threadname "$(NLM_THREAD_NAME)" >> $@
  ifneq "$(NLM_STACK_SIZE)" ""
  	@echo -stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE)))) >> $@
  else	
  	@echo -stacksize 64000 >> $@
  endif
  ifneq "$(NLM_ENTRY_SYM)" ""
  	@echo -entry $(NLM_ENTRY_SYM) >> $@
  endif
  ifneq "$(NLM_EXIT_SYM)" ""
  	@echo -exit $(NLM_EXIT_SYM) >> $@
  endif
  ifneq "$(NLM_CHECK_SYM)" ""
  	@echo -check $(NLM_CHECK_SYM) >> $@
  endif
  ifneq "$(NLM_FLAGS)" ""
  	@echo -flags $(NLM_FLAGS) >> $@
  endif
  ifneq "$(strip $(FILES_nlm_objs))" ""
  	@echo $(foreach objfile,$(strip $(FILES_nlm_objs)),$(subst /,\,$(objfile))) >> $@
  endif
  ifneq "$(FILES_nlm_libs)" ""
  	@echo $(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(subst /,\,$(libfile)))
>> $@
  endif
  	@echo -commandfile $(OBJDIR)\$(NLM_NAME)_link.def >> $@
  ifneq "$(FILE_nlm_msg)" ""
  	@echo Messages $(FILE_nlm_msg) >> $(OBJDIR)\$(NLM_NAME)_link.def
  endif
  ifneq "$(FILE_nlm_hlp)" ""
  	@echo Help $(FILE_nlm_hlp) >> $(OBJDIR)\$(NLM_NAME)_link.def
  endif
  ifneq "$(FILES_nlm_modules)" ""
  	@echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst
/,\,$(module))) >> $(OBJDIR)\$(NLM_NAME)_link.def
  endif
  ifneq "$(FILES_nlm_Ximports)" ""
  	@echo Import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(subst
/,\,$(import))) >> $(OBJDIR)\$(NLM_NAME)_link.def
  endif	
  ifneq "$(FILES_nlm_exports)" ""
  	@echo Export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(subst
/,\,$(export))) >> $(OBJDIR)\$(NLM_NAME)_link.def
  endif	
  ifneq "$(strip $(XLFLAGS))" ""
  	@echo $(XLFLAGS) >> $(OBJDIR)\$(NLM_NAME)_link.def
  endif
  
  # if APACHE_UNIPROC is defined, don't include XDCData
  ifndef APACHE_UNIPROC
  ifneq "$(string $(XDCDATA))" ""
  	@echo XDCData $(XDCDATA) >> $(OBJDIR)\$(NLM_NAME)_link.def
  else
  	@echo XDCData $(APR)\misc\netware\apr.xdc >> $(OBJDIR)\$(NLM_NAME)_link.def
  endif
  endif
  
  else # more than one target so look for individual makefiles.
  
  # Only include these if NO_LICENSE_FILE isn't set to prevent excessive 
  # recursion
  
  ifndef NO_LICENSE_FILE
  
  $(OBJDIR)/%.nlm: NWGNU% $(APR_WORK)\build\NWGNUhead.inc $(APR_WORK)\build\NWGNUtail.inc
$(APR_WORK)\build\NWGNUenvironment.inc $(CUSTOM_INI) FORCE
  	@echo Calling $<
  	$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
  	$(CMD) echo.
  
  else
  
  $(TARGET_nlm):
  
  endif # NO_LICENSE_FILE
  
  endif # multiple targets
  
  
  
  
  1.1                  apr/build/NWGNUmakefile
  
  Index: NWGNUmakefile
  ===================================================================
  #
  # Declare the sub-directories to be built here
  #
  
  SUBDIRS = \
  	$(EOLIST) 
  
  #
  # Get the 'head' of the build environment.  This includes default targets and
  # paths to tools
  #
  
  include $(APR_WORK)\build\NWGNUhead.inc
  
  #
  # build this level's files
  
  FILES_prebuild_headers = \
  	$(APR)/include/apr.h \
  	$(APRUTIL)/include/apu.h \
  	$(APRUTIL)/include/apr_ldap.h \
  	$(APRUTIL)/include/private/apu_config.h \
  	$(APRUTIL)/include/private/apu_select_dbm.h \
  	$(APRUTIL)/xml/expat/lib/expat.h \
  	$(APRUTIL)/xml/expat/lib/config.h \
  	$(EOLIST) 
      
  nlms :: $(APR)/aprlib.imp
  
  $(APR)/aprlib.imp : make_nw_export.awk nw_export.i
  	@echo Generating $(subst /,\,$@)
  	awk -f make_nw_export.awk nw_export.i | sort >$(APR)/aprlib.imp
      
  nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
  	@echo Generating $(subst /,\,$@)
  	$(CC) $< @cc.opt
  
  cc.opt : NWGNUmakefile $(APR_WORK)\build\NWGNUenvironment.inc $(APR_WORK)\build\NWGNUhead.inc
$(APR_WORK)\build\NWGNUtail.inc $(CUSTOM_INI)
  	$(CHK) $@ $(DEL) $@
  	@echo -P >> $@
  	@echo -EP >> $@
  	@echo -nosyspath >> $@
  	@echo -w nocmdline >> $@
  	@echo -DNETWARE >> $@
  	@echo -I..\include >> $@
  	@echo -I..\include\arch\netware >> $@
  	@echo -I..\include\arch\unix >> $@
  	@echo -I..\..\apr-util\include >> $@
  	@echo -ir $(NOVELLLIBC) >> $@
  
  $(APR)/include/%.h: $(subst /,\,$(APR))\include\%.hnw
  	@echo Creating $(subst /,\,$@)
  	copy $< $(subst /,\,$(APR))\include\$(@F)
  
  $(APRUTIL)/include/%.h: $(subst /,\,$(APRUTIL))\include\%.hnw
  	@echo Creating $(subst /,\,$@)
  	copy $< $(subst /,\,$(APRUTIL))\include\$(@F)
  
  $(APRUTIL)/include/private/%.h: $(subst /,\,$(APRUTIL))\include\private\%.hw
  	@echo Creating $(subst /,\,$@)
  	copy $< $(subst /,\,$(APRUTIL))\include\private\$(@F)
  
  $(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.hnw
  	@echo Creating $(subst /,\,$@)
  	copy $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F)
  
  $(APRUTIL)/xml/expat/lib/%.h: $(subst /,\,$(APRUTIL))\xml\expat\lib\%.h.in
  	@echo Creating $(subst /,\,$@)
  	copy $< $(subst /,\,$(APRUTIL))\xml\expat\lib\$(@F)
  
  #
  # You can use this target if all that is needed is to copy files to the
  # installation area
  #
  install :: nlms FORCE
  	
  
  clean ::
  	$(CHK) nw_export.i                                              $(DEL) nw_export.i
  	$(CHK) cc.opt                                                   $(DEL) cc.opt
  	$(CHK) $(subst /,\,$(APR))\include\apr.h                        $(DEL) $(subst /,\,$(APR))\include\apr.h
  	$(CHK) $(subst /,\,$(APRUTIL))\include\apu.h                    $(DEL) $(subst /,\,$(APRUTIL))\include\apu.h
  	$(CHK) $(subst /,\,$(APRUTIL))\include\apr_ldap.h               $(DEL) $(subst /,\,$(APRUTIL))\include\apr_ldap.h
  	$(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_config.h     $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_config.h
  	$(CHK) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h $(DEL) $(subst /,\,$(APRUTIL))\include\private\apu_select_dbm.h
  	$(CHK) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h            $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\expat.h
  	$(CHK) $(subst /,\,$(APRUTIL))\xml\expat\lib\config.h           $(DEL) $(subst /,\,$(APRUTIL))\xml\expat\lib\config.h
  	$(CHK) $(subst /,\,$(APR))\aprlib.imp                           $(DEL) $(subst /,\,$(APR))\aprlib.imp
      
  
  
  
  1.1                  apr/build/NWGNUhead.inc
  
  Index: NWGNUhead.inc
  ===================================================================
  #
  # Obtain the global build environment
  #
  
  include $(APR_WORK)\build\NWGNUenvironment.inc
  
  #
  # Define base targets and rules
  # 
  
  TARGETS = libs nlms install clobber_libs clobber_nlms clean installdev
  
  .PHONY : $(TARGETS) default all help $(NO_LICENSE_FILE)
  
  # Here is where we will use the NO_LICENSE_FILE variable to see if we need to
  # restart the make with it defined
  
  ifdef NO_LICENSE_FILE
  
  default: NO_LICENSE_FILE
  
  all: NO_LICENSE_FILE
  
  install :: NO_LICENSE_FILE
  
  installdev :: NO_LICENSE_FILE
  
  NO_LICENSE_FILE :
  	$(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)\license.dat"
  
  else # LM_LICENSE_FILE must be defined so use the real targets
  
  default: $(SUBDIRS) libs nlms
  
  all: $(SUBDIRS) libs nlms install
  
  $(TARGETS) :: $(SUBDIRS)
  
  install :: nlms $(INSTDIRS)
  
  installdev :: $(INSTDEVDIRS)
  
  $(INSTDIRS) ::
  	$(CHKNOT) $@\NUL mkdir $@
  
  $(INSTDEVDIRS) ::
  	$(CHKNOT) $@\NUL mkdir $@
  
  endif #NO_LICENSE_FILE check
  
  help :
  	@echo targets for RELEASE=$(RELEASE):
  	@echo (default) . . . . libs nlms
  	@echo all . . . . . . . does everything (libs nlms install)
  	@echo libs. . . . . . . builds all libs
  	@echo nlms. . . . . . . builds all nlms
  	@echo install . . . . . builds libs and nlms and copies install files to
  	@echo                   "$(INSTALL)"
  	@echo clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map
  	@echo clobber_all . . . deletes all possible output from the make
  	@echo clobber_install . deletes all files in $(INSTALL)
  	@$(CMD) echo.
  	@echo Multiple targets can be used on a single nmake command line -
  	@echo (i.e. $(MAKE) clean all)
  	@$(CMD) echo.
  	@echo You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized
  	@echo The default is RELEASE=optimized
  
  clobber_all :: clean clobber_install
  
  clobber_install ::
  	-$(DELTREE) $(INSTALL) 2>NUL
  
  #
  # build recursive targets
  #
  
  $(SUBDIRS) : FORCE
  ifneq "$(MAKECMDGOALS)" "clean"
  	$(CMD) echo.
  	@echo Building $(CURDIR)/$@
  endif
  	$(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
  	$(CMD) echo.
  
  FORCE:
  
  #
  # Standard targets
  #
  
  clean :: $(SUBDIRS)
  	@echo Cleaning up $(CURDIR)
  	-$(DELTREE) $(OBJDIR) 2> NUL
  	$(CHK) *.err $(DEL) *.err
  	$(CHK) *.map $(DEL) *.map
  	$(CHK) *.d $(DEL) *.d
  	$(CHK) *.tmp $(DEL) *.tmp
  	-$(DELTREE) $(OBJDIR) 2> NUL
  
  $(OBJDIR) ::
  	$(CHKNOT) $(OBJDIR)\nul mkdir $(OBJDIR)
  
  
  
  
  1.1                  apr/build/NWGNUenvironment.inc
  
  Index: NWGNUenvironment.inc
  ===================================================================
  #
  # Setup needed Tools and Libraries
  #
  
  ifeq "$(wildcard $(APR_WORK)\build\NWGNUcustom.inc)" "$(APR_WORK)\build\NWGNUcustom.inc"
  include $(APR_WORK)\build\NWGNUcustom.inc
  CUSTOM_INI = $(AP_WORK)\NWGNUcustom.ini
  endif
  
  ifndef VERBOSE
  .SILENT:
  endif
  
  #
  # Treat like an include
  #
  ifndef EnvironmentDefined
  
  #
  # simple macros for parsing makefiles
  #
  EOLIST:=
  EMPTY :=
  COMMA := ,
  SPACE := $(EMPTY) $(EMPTY)
  
  #
  # Base environment
  #
  
  # Try and handle case issues
  ifndef NOVELLLIBC
  ifdef NovellLibC
  NOVELLLIBC = $(NovellLibC)
  endif
  endif
  
  ifndef NOVELLLIBC
  NOVELLLIBC = C:/novell/ndk/libc
  endif
  
  # This is a placeholder
  # ifndef LDAPSDK
  # LDAPSDK = C:/novell/ndk/cldapsdk
  # endif
  
  ifndef METROWERKS
  METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
  endif
  
  # If LM_LICENSE_FILE isn't defined, define a variable that can be used to
  # restart make with it defined
  ifndef LM_LICENSE_FILE
  NO_LICENSE_FILE = NO_LICENSE_FILE
  endif
  
  #
  # Set the Release type that you want to build, possible values are:
  #
  #  debug		- full debug switches are set
  #  noopt		- normal switches are set (default)
  #  optimized	- optimization switches are set
  
  ifdef reltype
  RELEASE=$(reltype)
  endif
  
  ifdef RELTYPE
  RELEASE=$(RELTYPE)
  endif
  
  ifdef debug
  RELEASE=debug
  endif
  
  ifdef DEBUG
  RELEASE=debug
  endif
  
  ifdef optimized
  RELEASE=optimized
  endif
  
  ifdef OPTIMIZED
  RELEASE=optimized
  endif
  
  ifndef RELEASE
  RELEASE = optimized
  endif
  
  ifeq "$(RELEASE)" "debug"
  OBJDIR = Debug
  endif
  
  ifeq "$(RELEASE)" "noopt"
  OBJDIR = Noopt
  endif
  
  ifeq "$(RELEASE)" "optimized"
  OBJDIR = Release
  endif
  
  #
  # Setup compiler information
  #
  
  # MetroWerks NLM tools
  CC		= mwccnlm
  CPP		= mwccnlm
  LINK	= mwldnlm
  LIB		= mwldnlm -type library -w nocmdline
  
  NOVI	= $(NOVELLLIBC)\imports
  
  INCDIRS 	= $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
  
  DEFINES		= -DNETWARE
  
  #
  # MetroWerks static Libraries
  
  CLIB3S	= $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
  MATH3S	=
  PLIB3S	= $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
  
  # Base compile flags
  # and prefix or precompiled header added here.
  
  # The default flags are as follows:
  #
  # -c                    compile only, no link
  # -nosyspath            treat #include <...> like #include "..."
  # -Cpp_exceptions off   disable C++ exceptions
  # -RTTI off             disable C++ run-time typing information
  # -align 4              align on 4 byte bounderies
  # -w nocmdline          disable command-line driver/parser warnings
  # -proc PII             generate code base on Pentium II instruction set
  # -inst mmx             use MMX extensions
  
  CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII -inst
mmx
  
  # -g                    generate debugging information
  # -O1                   level 1 optimizations
  
  ifeq "$(RELEASE)" "debug"
  CFLAGS += -g -O1
  endif
  
  # -O4,p                 level 4 optimizations, optimize for speed
  ifeq "$(RELEASE)" "optimized"
  CFLAGS += -O4,p
  endif
  
  # -prefix pre_nw.h      #include pre_nw.h for all files
  
  CFLAGS += -prefix pre_nw.h
  
  
  PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
  
  #
  # Declare major project deliverables output directories here
  #
  
  ifdef DEST
  INSTALL = $(DEST)
  ifeq (\, $(findstring \,$(INSTALL)))
  INSTDIRS = $(DEST)
  endif
  endif
  
  ifdef dest
  INSTALL = $(dest)
  ifeq (\, $(findstring \,$(INSTALL)))
  INSTDIRS = $(dest)
  endif
  endif
  
  ifndef INSTALL
  INSTALL = $(APR_WORK)\..\Dist
  INSTDIRS = $(APR_WORK)\..\Dist
  endif
  
  INSTDEVDIRS := \
      $(INSTDIRS) \
  	$(INSTALL)\Apache2 \
  	$(INSTALL)\Apache2\include \
  	$(INSTALL)\Apache2\lib \
  
  INSTDIRS += \
  	$(INSTALL)\Apache2 \
  
  #
  # Declare Command and tool macros here
  #
  
  # Os2LibPath is an extra check to see if we are on NT
  ifdef Os2LibPath
  OS = Windows_NT
  endif
  
  ifeq "$(OS)" "Windows_NT"
  CMD=cmd /C
  CHK=cmd /C if exist
  CHKNOT=cmd /C if not exist
  DEL = del /F
  DELTREE = cmd /C rd /s/q
  WINNT=1
  else
  CMD=command /C
  CHK=command /C if exist
  CHKNOT=command /C if not exist
  DEL = del
  DELTREE = deltree /y
  endif
  
  
  #
  # Setup base C compiler flags
  #
  
  #
  # Common directories
  #
  
  APR			= $(APR_WORK)
  APRTEST		= $(APR_WORK)/test
  APRUTIL		= $(APR_WORK)/../apr-util
  XML			= $(APRUTIL)/xml
  
  #
  # Internal Libraries
  #
  
  APRLIB		= $(APR)/$(OBJDIR)/aprlib.lib
  APRUTLIB	= $(APRUTIL)/$(OBJDIR)/aprutil.lib
  XMLLIB		= $(XML)/$(OBJDIR)/xmllib.lib
  
  #
  # Additional general defines
  #
  VERSION		= 2,0,0
  			
  EnvironmentDefined = 1
  endif # ifndef EnvironmentDefined
  
  # This is always set so that it will show up in lower directories
  
  ifdef Path
  Path = $(PATH)
  endif
  
  
  
  
  1.1                  apr/NWGNUmakefile
  
  Index: NWGNUmakefile
  ===================================================================
  #
  # Declare the sub-directories to be built here
  #
  
  SUBDIRS = \
  		build \
  		..\apr-util \
  		$(EOLIST) 
  
  #
  # Get the 'head' of the build environment.  This includes default targets and
  # paths to tools
  #
  
  include $(APR_WORK)\build\NWGNUhead.inc
  
  #
  # build this level's files
  
  #
  # Make sure all needed macro's are defined
  #
  
  #
  # These directories will be at the beginning of the include list, followed by
  # INCDIRS
  #
  XINCDIRS	+= \
  			$(APR_WORK)/include \
  			$(APR_WORK)/include/arch/NetWare \
  			$(APR_WORK)/include/arch/unix \
  			$(APR_WORK)/memory/unix \
  			$(APRUTIL)/xml \
  			$(EOLIST)
  
  #
  # These flags will come after CFLAGS
  #
  XCFLAGS		+= \
  			$(EOLIST)
  
  #
  # These defines will come after DEFINES
  #
  XDEFINES	+= \
  			$(EOLIST)
  
  #
  # These flags will be added to the link.opt file
  #
  XLFLAGS		+= \
  			$(EOLIST)
  
  #
  # These values will be appended to the correct variables based on the value of
  # RELEASE
  #
  ifeq "$(RELEASE)" "debug"
  XINCDIRS	+= \
  			$(EOLIST)
  
  XCFLAGS		+= \
  			$(EOLIST)
  
  XDEFINES	+= \
  			$(EOLIST)
  
  XLFLAGS		+= \
  			$(EOLIST)
  endif
  
  ifeq "$(RELEASE)" "noopt"
  XINCDIRS	+= \
  			$(EOLIST)
  
  XCFLAGS		+= \
  			$(EOLIST)
  
  XDEFINES	+= \
  			$(EOLIST)
  
  XLFLAGS		+= \
  			$(EOLIST)
  endif
  
  ifeq "$(RELEASE)" "release"
  XINCDIRS	+= \
  			$(EOLIST)
  
  XCFLAGS		+= \
  			$(EOLIST)
  
  XDEFINES	+= \
  			$(EOLIST)
  
  XLFLAGS		+= \
  			$(EOLIST)
  endif
  
  #
  # These are used by the link target if an NLM is being generated
  # This is used by the link 'name' directive to name the nlm.  If left blank
  # TARGET_nlm (see below) will be used.
  #
  NLM_NAME		= aprlib
  
  #
  # This is used by the link '-desc ' directive. 
  # If left blank, NLM_NAME will be used.
  #
  NLM_DESCRIPTION	= Apache Portability Runtime Library
  
  #
  # This is used by the '-threadname' directive.  If left blank,
  # NLM_NAME Thread will be used.
  #
  NLM_THREAD_NAME	= 
  #
  # If this is specified, it will override VERSION value in 
  # $(APR_WORK)\build\NWGNUenvironment.inc
  #
  NLM_VERSION		=
  
  #
  # If this is specified, it will override the default of 64K
  #
  NLM_STACK_SIZE	= 
  
  #
  # If this is specified it will be used by the link '-entry' directive
  #
  NLM_ENTRY_SYM	= _LibCPrelude
  
  #
  # If this is specified it will be used by the link '-exit' directive
  #
  NLM_EXIT_SYM	= _LibCPostlude
  
  #
  # If this is specified it will be used by the link '-check' directive
  #
  NLM_CHECK_SYM	=
  
  #
  # If this is specified it will be used by the link '-flags' directive
  #
  NLM_FLAGS		= AUTOUNLOAD, PSEUDOPREEMPTION
   
  #
  # If this is specified it will be linked in with the XDCData option in the def 
  # file instead of the default of $(APR)/misc/netware/apache.xdc.  XDCData can 
  # be disabled by setting APACHE_UNIPROC in the environment
  #
  XDCDATA         = 
  
  #
  # Declare all target files (you must add your files here)
  #
  
  #
  # If there is an NLM target, put it here
  #
  TARGET_nlm = \
  	$(OBJDIR)/aprlib.nlm \
  	$(EOLIST)
  
  #
  # If there is an LIB target, put it here
  #
  TARGET_lib = \
  	$(OBJDIR)/aprlib.lib \
  	$(EOLIST)
  
  #
  # These are the OBJ files needed to create the NLM target above.
  # Paths must all use the '/' character
  #
  FILES_nlm_objs = \
  	$(OBJDIR)/libprews.o \
  	$(EOLIST)
  
  #
  # These are the LIB files needed to create the NLM target above.
  # These will be added as a library command in the link.opt file.
  #
  FILES_nlm_libs = \
  	libcpre.o \
  	$(APRLIB) \
  	$(APRUTLIB) \
  	$(XMLLIB) \
  	$(EOLIST)
  
  #
  # These are the modules that the above NLM target depends on to load.
  # These will be added as a module command in the link.opt file.
  #
  FILES_nlm_modules = \
  	Libc \
  	ws2_32 \
  	$(EOLIST)
  
  #
  # If the nlm has a msg file, put it's path here
  #
  FILE_nlm_msg =
   
  #
  # If the nlm has a hlp file put it's path here
  #
  FILE_nlm_hlp =
  
  #
  # If this is specified, it will override $(NWOS)\copyright.txt.
  #
  FILE_nlm_copyright =
  
  #
  # Any additional imports go here
  #
  FILES_nlm_Ximports = \
  	@libc.imp \
  	@ws2nlm.imp \
      @netware.imp \
      NXGetRandom \
      NXGetCtlInfo \
      NXSetCtlInfo \
  	$(EOLIST)
   
  #   
  # Any symbols exported to here
  #
  FILES_nlm_exports = \
  	@aprlib.imp	\
  	$(EOLIST)
  	
  #   
  # These are the OBJ files needed to create the LIB target above.
  # Paths must all use the '/' character
  #
  FILES_lib_objs = \
  	$(OBJDIR)/apr_cpystrn.o \
  	$(OBJDIR)/apr_fnmatch.o \
  	$(OBJDIR)/apr_getpass.o \
  	$(OBJDIR)/apr_hash.o \
  	$(OBJDIR)/apr_md5.o \
  	$(OBJDIR)/apr_pools.o \
  	$(OBJDIR)/apr_snprintf.o \
  	$(OBJDIR)/apr_strings.o \
  	$(OBJDIR)/apr_strnatcmp.o \
  	$(OBJDIR)/apr_strtok.o \
  	$(OBJDIR)/apr_tables.o \
  	$(OBJDIR)/copy.o \
  	$(OBJDIR)/dir.o \
  	$(OBJDIR)/dso.o \
  	$(OBJDIR)/errorcodes.o \
  	$(OBJDIR)/fileacc.o \
  	$(OBJDIR)/filedup.o \
  	$(OBJDIR)/filepath.o \
  	$(OBJDIR)/filestat.o \
  	$(OBJDIR)/filesys.o \
  	$(OBJDIR)/flock.o \
  	$(OBJDIR)/fullrw.o \
  	$(OBJDIR)/getopt.o \
  	$(OBJDIR)/getuuid.o \
  	$(OBJDIR)/groupinfo.o \
  	$(OBJDIR)/inet_pton.o \
  	$(OBJDIR)/inet_ntop.o \
  	$(OBJDIR)/libprews.o \
  	$(OBJDIR)/locks.o \
  	$(OBJDIR)/mktemp.o \
  	$(OBJDIR)/open.o \
  	$(OBJDIR)/pipe.o \
  	$(OBJDIR)/poll.o \
  	$(OBJDIR)/proc.o \
  	$(OBJDIR)/procsup.o \
  	$(OBJDIR)/proc_mutex.o \
  	$(OBJDIR)/rand.o \
  	$(OBJDIR)/readwrite.o \
  	$(OBJDIR)/seek.o \
  	$(OBJDIR)/sendrecv.o \
  	$(OBJDIR)/shm.o \
  	$(OBJDIR)/signals.o \
  	$(OBJDIR)/sockaddr.o \
  	$(OBJDIR)/sockets.o \
  	$(OBJDIR)/sockopt.o \
  	$(OBJDIR)/start.o \
  	$(OBJDIR)/thread.o \
  	$(OBJDIR)/thread_cond.o \
  	$(OBJDIR)/thread_mutex.o \
  	$(OBJDIR)/thread_rwlock.o \
  	$(OBJDIR)/threadpriv.o \
  	$(OBJDIR)/time.o \
  	$(OBJDIR)/timestr.o \
  	$(OBJDIR)/userinfo.o \
  	$(OBJDIR)/utf8_ucs2.o \
  	$(OBJDIR)/uuid.o \
  	$(OBJDIR)/version.o \
  	$(OBJDIR)/xlate.o \
  	$(EOLIST)
  
  
  #
  # implement targets and dependancies (leave this section alone)
  #
  
  libs :: $(OBJDIR) $(TARGET_lib)
  
  nlms :: libs $(TARGET_nlm)
  
  #
  # Updated this target to create necessary directories and copy files to the 
  # correct place.  (See $(APR_WORK)\build\NWGNUhead.inc for examples)
  #
  install :: nlms FORCE
  	copy $(OBJDIR)\aprlib.nlm $(INSTALL)\Apache2\*.*
  
  #
  # Any specialized rules here
  #
  
  $(OBJDIR)/%.o: strings/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) strings\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: tables/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) tables\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: passwd/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) passwd\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: lib/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) lib\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: time/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) time\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: file_io/netware/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) file_io\netware\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: file_io/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) file_io\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: locks/netware/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) locks\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: misc/netware/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) misc\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: misc/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) misc\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: threadproc/netware/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) threadproc\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: dso/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) dso\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: memory/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) memory\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: user/netware/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) user\netware\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: network_io/win32/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) network_io\win32\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: network_io/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) network_io\unix\$(<F) -cwd source -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: i18n/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) i18n\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: file_io/os2/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) file_io\os2\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  $(OBJDIR)/%.o: shmem/unix/%.c $(OBJDIR)\cc.opt
  	@echo Compiling $<
  	$(CC) shmem\unix\$(<F) -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cc.opt
  
  #
  # Include the 'tail' makefile that has targets that depend on variables defined
  # in this makefile
  #
  
  include $(APR_WORK)\build\NWGNUtail.inc
  
  
  
  
  

Mime
View raw message