diff options
author | Guenter Knauf <fuankg@apache.org> | 2011-04-10 20:07:31 +0000 |
---|---|---|
committer | Guenter Knauf <fuankg@apache.org> | 2011-04-10 20:07:31 +0000 |
commit | bccb881e4f3e67eb11d5f9d12487f77b2d37fbf2 (patch) | |
tree | 065e28d2a525d64aa978284ff78012bcdd5ab920 /build/NWGNUtail.inc | |
parent | d9e75f0dbcd8f1ce6f2974a6e38a9dcf6c5ec980 (diff) | |
download | apr-bccb881e4f3e67eb11d5f9d12487f77b2d37fbf2.tar.gz |
Prepare NetWare build system for other compilers.
Initial patch from NormW <normw gknw net>;
various modifications and adds by fuankg.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1090884 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/NWGNUtail.inc')
-rw-r--r-- | build/NWGNUtail.inc | 81 |
1 files changed, 26 insertions, 55 deletions
diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc index e6cc66274..9c789eb73 100644 --- a/build/NWGNUtail.inc +++ b/build/NWGNUtail.inc @@ -51,7 +51,6 @@ endif # Create dependency lists based on the files available # - CCOPT_DEPENDS = \ $(APRBUILD)/NWGNUhead.inc \ $(APRBUILD)/NWGNUenvironment.inc \ @@ -94,8 +93,8 @@ 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) +CCOPT_DEPENDS += NWGNU$(NLM_NAME) +CPPOPT_DEPENDS += NWGNU$(NLM_NAME) endif # @@ -129,69 +128,43 @@ INCLUDE_BLDCMDS = 1 CCOPT_NAME = $(LIB_NAME) endif -ifeq "$(INCLUDE_BLDCMDS)" "1" - -$(OBJDIR)/%.o: %.c $(OBJDIR)/$(CCOPT_NAME)_cc.opt -# @echo Compiling $< - @echo $(DL)CC $<$(DL) - $(CC) -o $@ $< @$(word 2, $^) - -$(OBJDIR)/$(CCOPT_NAME)_cc.opt: $(CCOPT_DEPENDS) - $(call DEL,$@) -ifdef VERBOSE - @echo CCOPT_DEPENDS=$^ -endif -# @echo Generating $@ - @echo $(DL)GEN $@$(DL) +CCFLAGS = ifneq "$(strip $(CFLAGS))" "" - @echo $(DL)$(CFLAGS)$(DL)>> $@ +CCFLAGS += $(CFLAGS) endif ifneq "$(strip $(XCFLAGS))" "" - @echo $(DL)$(XCFLAGS)$(DL)>> $@ +CCFLAGS += $(XCFLAGS) endif ifneq "$(strip $(XINCDIRS))" "" - @echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@ +CCFLAGS += $(foreach xincdir,$(strip $(XINCDIRS)),-I$(xincdir)) endif ifneq "$(strip $(INCDIRS))" "" - @echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@ +CCFLAGS += $(foreach incdir,$(strip $(INCDIRS)),-I$(incdir)) endif ifneq "$(strip $(DEFINES))" "" - @echo $(DL)$(DEFINES)$(DL)>> $@ +CCFLAGS += $(DEFINES) endif ifneq "$(strip $(XDEFINES))" "" - @echo $(DL)$(XDEFINES)$(DL)>> $@ +CCFLAGS += $(XDEFINES) endif -$(OBJDIR)/%.o: %.cpp $(OBJDIR)/$(CCOPT_NAME)_cpp.opt -# @echo Compiling $< - @echo $(DL)CPP $<$(DL) - $(CCP) -o $@ $< @$(word 2, $^) +ifeq "$(INCLUDE_BLDCMDS)" "1" -$(OBJDIR)/$(CCOPT_NAME)_cpp.opt: $(CPPOPT_DEPENDS) - $(call DEL,$@) +$(OBJDIR)/%.o: %.c $(CCOPT_DEPENDS) + @echo $(DL)CC $<$(DL) ifdef VERBOSE - @echo CPPOPT_DEPENDS=$^ -endif -# @echo Generating $@ - @echo $(DL)GEN $@$(DL) -ifneq "$(strip $(CFLAGS))" "" - @echo $(DL)$(CFLAGS)$(DL)>> $@ + @echo CCOPT_DEPENDS=$(CCOPT_DEPENDS) endif -ifneq "$(strip $(XCFLAGS))" "" - @echo $(DL)$(XCFLAGS)$(DL)>> $@ -endif -ifneq "$(strip $(XINCDIRS))" "" - @echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@ -endif -ifneq "$(strip $(INCDIRS))" "" - @echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@ -endif -ifneq "$(strip $(DEFINES))" "" - @echo $(DL)$(DEFINES)$(DL)>> $@ -endif -ifneq "$(strip $(XDEFINES))" "" - @echo $(DL)$(XDEFINES)$(DL)>> $@ + $(CC) $(CCFLAGS) -c -o $@ $< + +CCPFLAGS = $(CPFLAGS) $(CCFLAGS) + +$(OBJDIR)/%.o: %.cpp $(CPPOPT_DEPENDS) + @echo $(DL)CPP $<$(DL) +ifdef VERBOSE + @echo CPPOPT_DEPENDS=$(CPPOPT_DEPENDS) endif + $(CPP) $(CCPFLAGS) -c -o $@ $< endif # one target nlm or lib @@ -205,14 +178,15 @@ ifeq "$(words $(strip $(TARGET_lib)))" "1" $(TARGET_lib) : $(OBJDIR)/$(LIB_NAME)_lib.lst $(call DEL,$@) -# @echo Generating $@ @echo $(DL)AR $@$(DL) - $(LIB) -o $@ @$< + $(AR) -o $@ @$< +ifdef RANLIB + $(RANLIB) $@ +endif $(OBJDIR)/aprlib_lib.lst: $(aprlib_LIBLST_DEPENDS) $(call DEL,$@) ifneq "$(strip $(FILES_lib_objs))" "" -# @echo Generating $@ @echo $(DL)GEN $@$(DL) @echo $(DL)$(wordlist 1, 10, $(FILES_lib_objs))$(DL)>> $@ @echo $(DL)$(wordlist 11, 20, $(FILES_lib_objs))$(DL)>> $@ @@ -230,7 +204,6 @@ endif $(OBJDIR)/%_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS) $(call DEL,$@) ifneq "$(strip $(FILES_lib_objs))" "" -# @echo Generating $@ @echo $(DL)GEN $@$(DL) @echo $(DL)$(FILES_lib_objs)$(DL)>> $@ endif @@ -251,7 +224,6 @@ endif ifeq "$(words $(strip $(TARGET_nlm)))" "1" $(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)/$(NLM_NAME)_link.opt -# @echo Linking $@ @echo $(DL)LINK $@$(DL) $(LINK) @$(OBJDIR)/$(NLM_NAME)_link.opt @@ -261,7 +233,6 @@ $(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)/$(NLM_NAME)_link.o $(OBJDIR)/$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS) $(call DEL,$@) $(call DEL,$(@:.opt=.def)) -# @echo Generating $@ @echo $(DL)GEN $@$(DL) @echo $(DL)# Do not edit this file - it is created by make!$(DL) > $@ @echo $(DL)# All your changes will be lost!!$(DL)>> $@ |