#
SUBDIRS = \
- $(APR_WORK)\build \
+ $(APR_WORK)/build \
$(EOLIST)
#
# paths to tools
#
-include $(AP_WORK)\build\NWGNUhead.inc
+include $(AP_WORK)/build/NWGNUhead.inc
#
# build this level's files
FILES_prebuild_headers = \
+ $(SRC)/include/ap_config_layout.h \
+ $(NWOS)/test_char.h \
$(PCRE)/config.h \
$(PCRE)/pcre.h \
$(EOLIST)
-nlms :: chkapr $(NWOS)/httpd.imp
+nlms :: libs $(NWOS)/httpd.imp $(DAV)/main/dav.imp $(STDMOD)/cache/mod_cache.imp $(STDMOD)/proxy/mod_proxy.imp
+
+libs :: chkapr $(NWOS)/chartables.c
+
+$(DAV)/main/dav.imp : make_nw_export.awk $(DAV)/main/mod_dav.h
+ @echo $(DL)GEN $@$(DL)
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
+
+$(STDMOD)/cache/mod_cache.imp: make_nw_export.awk $(STDMOD)/cache/mod_cache.h $(STDMOD)/cache/cache_util.h
+ @echo $(DL)GEN $@$(DL)
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
+
+$(STDMOD)/proxy/mod_proxy.imp: make_nw_export.awk $(STDMOD)/proxy/mod_proxy.h $(STDMOD)/proxy/proxy_util.h
+ @echo $(DL)GEN $@$(DL)
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
$(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
- @echo Generating $(subst /,\,$@)
- $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | sort >$@
+ @echo $(DL)GEN $@$(DL)
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
- @echo Generating $(subst /,\,$@)
+ @echo $(DL)GEN $@$(DL)
$(CC) $< @cc.opt
-cc.opt : NWGNUmakefile $(AP_WORK)\build\NWGNUenvironment.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUhead.inc
- $(CHK) $@ $(DEL) $@
- @echo -P >> $@
- @echo -EP >> $@
- @echo -nosyspath >> $@
- @echo -w nocmdline >> $@
- @echo $(DEFINES) >> $@
- @echo -DCORE_PRIVATE >> $@
- @echo -I..\include >> $@
- @echo -I..\modules\http >> $@
- @echo -I..\modules\aaa >> $@
- @echo -I..\os\netware >> $@
- @echo -I..\server\mpm\netware >> $@
- @echo -I$(APR)\include >> $@
- @echo -I$(APRUTIL)\include >> $@
- @echo -ir $(NOVELLLIBC) >> $@
-
-$(PCRE)/%.h: $(subst /,\,$(PCRE))\%.hw
- @echo Creating $(subst /,\,$@)
- copy $< $(subst /,\,$(PCRE))\$(@F)
+cc.opt : NWGNUmakefile $(APBUILD)/NWGNUenvironment.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUhead.inc
+ @echo $(DL)-P$(DL)> $@
+ @echo $(DL)-EP$(DL)>> $@
+ @echo $(DL)-nosyspath$(DL)>> $@
+ @echo $(DL)-w nocmdline$(DL)>> $@
+ @echo $(DL)$(DEFINES)$(DL)>> $@
+ @echo $(DL)-I$(SRC)/include$(DL)>> $@
+ @echo $(DL)-I$(HTTPD)$(DL)>> $@
+ @echo $(DL)-I$(STDMOD)/aaa$(DL)>> $@
+ @echo $(DL)-I$(STDMOD)/core$(DL)>> $@
+ @echo $(DL)-I$(NWOS)$(DL)>> $@
+ @echo $(DL)-I$(SERVER)/mpm/netware$(DL)>> $@
+ @echo $(DL)-I$(APR)/include$(DL)>> $@
+ @echo $(DL)-I$(APRUTIL)/include$(DL)>> $@
+ @echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@
+
+$(SRC)/include/ap_config_layout.h: $(NWOS)/netware_config_layout.h
+ @echo Creating $@
+ $(call COPY,$<,$@)
+
+$(PCRE)/%.h: $(PCRE)/%.h.generic
+ @echo Creating $@
+ $(call COPY,$<,$@)
+
+$(PCRE)/%.h: $(PCRE)/%.hw
+ @echo Creating $@
+ $(call COPY,$<,$@)
+
+ifneq "$(BUILDTOOL_AS_NLM)" "1"
+
+$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c
+ @echo $(DL)GEN $@$(DL)
+ $< $@
+
+%.exe: $(PCRE)/%.c $(PCRE)/config.h $(PCRE)/pcre.h
+ @echo $(DL)Creating Build Helper $@$(DL)
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DHAVE_CONFIG_H $< -o $@
+
+$(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c
+ @echo $(DL)GEN $@$(DL)
+ $< > $@
+
+%.exe: $(SERVER)/%.c
+ @echo $(DL)Creating Build Helper $@$(DL)
+ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE $< -o $@
+
+else
+
+ifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
+$(error Error: required source $(NWOS)/chartables.c not found!)
+endif
+
+ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
+$(error Error: required header $(NWOS)/test_char.h not found!)
+endif
+
+endif
#
# Check for minimum APR version
#
-chkapr: $(APR)\build\nw_ver.awk $(APR)\include\apr_version.h
- @echo Checking for APR version...
- @$(AWK) -v WANTED=$(APR_WANTED) -f $^
+chkapr: $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
+ @echo $(DL)Checking for APR version...$(DL)
+ $(AWK) -v WANTED=$(APR_WANTED) -f $^
#
# You can use this target if all that is needed is to copy files to the
install :: nlms FORCE
clean ::
- $(CHK) $(subst /,\,$(PCRE))\config.h $(DEL) $(subst /,\,$(PCRE))\config.h
- $(CHK) $(subst /,\,$(PCRE))\pcre.h $(DEL) $(subst /,\,$(PCRE))\pcre.h
- $(CHK) $(subst /,\,$(NWOS))\httpd.imp $(DEL) $(subst /,\,$(NWOS))\httpd.imp
- $(CHK) nw_export.i $(DEL) nw_export.i
- $(CHK) cc.opt $(DEL) cc.opt
- $(CHK) NWGNUversion.inc $(DEL) NWGNUversion.inc
+ $(call DEL,$(SRC)/include/ap_config_layout.h)
+ $(call DEL,$(PCRE)/config.h)
+ $(call DEL,$(PCRE)/pcre.h)
+ $(call DEL,$(STDMOD)/cache/mod_cache.imp)
+ $(call DEL,$(STDMOD)/proxy/mod_proxy.imp)
+ $(call DEL,$(DAV)/main/dav.imp)
+ $(call DEL,$(NWOS)/httpd.imp)
+ $(call DEL,nw_export.i)
+ $(call DEL,cc.opt)
+ $(call DEL,NWGNUversion.inc)
+ifneq "$(BUILDTOOL_AS_NLM)" "1"
+ $(call DEL,$(NWOS)/chartables.c)
+ $(call DEL,$(NWOS)/test_char.h)
+ $(call DEL,dftables.exe)
+ $(call DEL,gen_test_char.exe)
+endif
#
# Include the 'tail' makefile that has targets that depend on variables defined
# in this makefile
#
-include $(AP_WORK)\build\NWGNUtail.inc
+include $(APBUILD)/NWGNUtail.inc