NWGNUmakefile revision 0662ed52e814f8f08ef0e09956413a792584eddf
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# Declare the sub-directories to be built here
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub HrozekSUBDIRS = \
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(APR_WORK)/build \
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(EOLIST)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# Get the 'head' of the build environment. This includes default targets and
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# paths to tools
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekinclude $(AP_WORK)/build/NWGNUhead.inc
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# build this level's files
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub HrozekFILES_prebuild_headers = \
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(NWOS)/test_char.h \
69fb159e1464ef91376f56e65afa9704d5bafad8Lukas Slebodnik $(PCRE)/config.h \
69fb159e1464ef91376f56e65afa9704d5bafad8Lukas Slebodnik $(PCRE)/pcre.h \
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(EOLIST)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozeknlms :: chkapr $(NWOS)/httpd.imp $(NWOS)/chartables.c
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
72e60fd4eabcfbcdbfe01e8c38b94052bc6c2067Jakub Hrozek$(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
e0c86d21388bffe2e3919e780780c40d96186abbJakub Hrozek @echo $(DL)GEN $@$(DL)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | $(SORT) >$@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozeknw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
72e60fd4eabcfbcdbfe01e8c38b94052bc6c2067Jakub Hrozek @echo $(DL)GEN $@$(DL)
72e60fd4eabcfbcdbfe01e8c38b94052bc6c2067Jakub Hrozek $(CC) $< @cc.opt
72e60fd4eabcfbcdbfe01e8c38b94052bc6c2067Jakub Hrozek
72e60fd4eabcfbcdbfe01e8c38b94052bc6c2067Jakub Hrozekcc.opt : NWGNUmakefile $(APBUILD)/NWGNUenvironment.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUhead.inc
72e60fd4eabcfbcdbfe01e8c38b94052bc6c2067Jakub Hrozek @echo $(DL)-P$(DL)> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-EP$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-nosyspath$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-w nocmdline$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)$(DEFINES)$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-I$(SRC)/include$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-I$(HTTPD)$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-I$(STDMOD)/aaa$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-I$(STDMOD)/core$(DL)>> $@
4a6a5421113ab662a665c62ed6a24b61a5a36950Jakub Hrozek @echo $(DL)-I$(NWOS)$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-I$(SERVER)/mpm/netware$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-I$(APR)/include$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-I$(APRUTIL)/include$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek$(PCRE)/%.h: $(PCRE)/%.h.generic
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo Creating $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call COPY,$<,$@)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek$(PCRE)/%.h: $(PCRE)/%.hw
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo Creating $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call COPY,$<,$@)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekifneq "$(BUILDTOOL_AS_NLM)" "1"
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)GEN $@$(DL)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @$< $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
22d268c88f6d324b3a66846af007b06488eddae7Jakub Hrozek%.exe: $(PCRE)/%.c
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)Creating Build Helper $@$(DL)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @$(WIN_CC) $(WIN_CFLAGS) -DHAVE_CONFIG_H $< -o $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek$(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)GEN $@$(DL)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @$< > $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek%.exe: $(SERVER)/%.c
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)Creating Build Helper $@$(DL)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekelse
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek$(error Error: required source $(NWOS)/chartables.c not found!)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekendif
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
341a00311680a440d7f979f06c34c70d86c9367aBohuslav Kabrdaifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek$(error Error: required header $(NWOS)/test_char.h not found!)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekendif
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekendif
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# Check for minimum APR version
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekchkapr: $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @echo $(DL)Checking for APR version...$(DL)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek @$(AWK) -v WANTED=$(APR_WANTED) -f $^
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# You can use this target if all that is needed is to copy files to the
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# installation area
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekinstall :: nlms FORCE
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekclean ::
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,$(PCRE)/config.h)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,$(PCRE)/pcre.h)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,$(NWOS)/httpd.imp)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,nw_export.i)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,cc.opt)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,NWGNUversion.inc)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekifneq "$(BUILDTOOL_AS_NLM)" "1"
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,$(NWOS)/chartables.c)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,$(NWOS)/test_char.h)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,dftables.exe)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek $(call DEL,gen_test_char.exe)
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekendif
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# Include the 'tail' makefile that has targets that depend on variables defined
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek# in this makefile
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek#
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozekinclude $(APBUILD)/NWGNUtail.inc
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek
667db40da4db362d7ca0a1f7f1c4ba40fb71795aJakub Hrozek