MATH3S =
PLIB3S = $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++/MWCPP.lib
-# MetroWerks Win32 build flags to create build tool
-MWCW_MSL = "$(METROWERKS)/MSL"
-MWCW_W32 = "$(METROWERKS)/Win32-x86 Support"
-WIN_CFLAGS = -O2 -gccinc -nodefaults -proc 586 -w off
-WIN_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
-WIN_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
+ifeq "$(OS)" "Windows_NT"
+# MetroWerks Win32 build flags to create build tools
+MWCW_MSL = "$(METROWERKS)/MSL"
+MWCW_W32 = "$(METROWERKS)/Win32-x86 Support"
+HOST_CC = $(WIN_CC)
+HOST_CFLAGS = -O2 -gccinc -nodefaults -proc 586 -w off
+HOST_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
+HOST_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
+else
+# GNUC build flags to create build tools
+HOST_CC = gcc
+HOST_CFLAGS = -Wall -O2
+endif
# Base compile flags
# and prefix or precompiled header added here.
$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
@echo $(DL)GEN $@$(DL)
- @$< $@
+ $< $@
%.exe: $(PCRE)/%.c
@echo $(DL)Creating Build Helper $@$(DL)
- @$(WIN_CC) $(WIN_CFLAGS) -DHAVE_CONFIG_H $< -o $@
+ $(HOST_CC) $(HOST_CFLAGS) -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)
- @$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
+ $(HOST_CC) $(HOST_CFLAGS) -DCROSS_COMPILE $< -o $@
else
#
chkapr: $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
@echo $(DL)Checking for APR version...$(DL)
- @$(AWK) -v WANTED=$(APR_WANTED) -f $^
+ $(AWK) -v WANTED=$(APR_WANTED) -f $^
#
# You can use this target if all that is needed is to copy files to the
@echo $(DL)-l $(XML)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-l $(SRC)/$(OBJDIR)$(DL)>> $@
@echo $(DL)-nodefaults$(DL)>> $@
- @echo $(DL)-map $(OBJDIR)/$(NLM_NAME).map>> $@
+ @echo $(DL)-map $(OBJDIR)/$(NLM_NAME).map$(DL)>> $@
ifneq "$(strip $(XLFLAGS))" ""
@echo $(DL)$(XLFLAGS)$(DL)>> $@
endif
@echo $(DL)$(foreach objfile,$(strip $(FILES_nlm_objs)),$(objfile))$(DL)>> $@
endif
ifneq "$(FILES_nlm_libs)" ""
- @echo $(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(libfile))$(DL)>> $@
+ @echo $(DL)$(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(libfile))$(DL)>> $@
endif
@echo $(DL)-commandfile $(@:.opt=.def)$(DL)>> $@
@echo $(DL)# Do not edit this file - it is created by make!$(DL)> $(@:.opt=.def)
ifneq "$(NLM_CHECK_SYM)" ""
@echo $(DL)check $(NLM_CHECK_SYM)$(DL)>> $(@:.opt=.def)
endif
- @echo $(strip $(NLM_FLAGS))$(DL)>> $(@:.opt=.def)
+ @echo $(DL)$(strip $(NLM_FLAGS))$(DL)>> $(@:.opt=.def)
ifneq "$(FILES_nlm_modules)" ""
@echo $(DL)module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(module))$(DL)>> $(@:.opt=.def)
endif
aaa \
cache \
cluster \
- dav\main \
- dav\fs \
- dav\lock \
+ dav/main \
+ dav/fs \
+ dav/lock \
echo \
examples \
generators \
endif
endif
-#If the mod_edir directory exists then build the mod_edir module
-ifeq "$(wildcard $(AP_WORK)\modules\mod_edir)" "$(AP_WORK)\modules\mod_edir"
-SUBDIRS += mod_edir \
- $(EOLIST)
-endif
-
# Allow the experimental modules to be built if EXPERIMENTAL is defined
ifdef EXPERIMENTAL
SUBDIRS += experimental \
$(EOLIST)
endif
+#If the mod_edir directory exists then build the mod_edir module
+ifeq "$(wildcard $(AP_WORK)/modules/mod_edir)" "$(AP_WORK)/modules/mod_edir"
+SUBDIRS += mod_edir \
+ $(EOLIST)
+endif
+
#
# Get the 'head' of the build environment. This includes default targets and