Commit 4a1208ed authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

ENH: add handling of exe file extensions in wmake/src/Makefile (#1238)

- change internal naming from 'EXE_EXT' to 'EXT_EXE' for symmetry with
  'EXT_SO'
parent ffcff46f
...@@ -74,7 +74,7 @@ LIB_LIBS = ...@@ -74,7 +74,7 @@ LIB_LIBS =
EXT_SO = .so EXT_SO = .so
# Executable extension (with '.' separator) # Executable extension (with '.' separator)
EXE_EXT = EXT_EXE =
# Library (default which is to be overridden) # Library (default which is to be overridden)
LIB = libNULL LIB = libNULL
...@@ -86,7 +86,7 @@ EXE = $(WM_PROJECT).out ...@@ -86,7 +86,7 @@ EXE = $(WM_PROJECT).out
SEXE = a.out SEXE = a.out
#DEBUG $(info "EXE_SO = ${EXE_SO}") #DEBUG $(info "EXE_SO = ${EXE_SO}")
#DEBUG $(info "EXE_EXT = ${EXE_EXT}") #DEBUG $(info "EXT_EXE = ${EXT_EXE}")
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
...@@ -129,28 +129,28 @@ LIB_HEADER_DIRS = \ ...@@ -129,28 +129,28 @@ LIB_HEADER_DIRS = \
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
.PHONY: all .PHONY: all
all: $(EXE)$(EXE_EXT) all: $(EXE)$(EXT_EXE)
@: @:
.PHONY: silent .PHONY: silent
silent: silent:
@: @:
$(EXE)$(EXE_EXT): $(OBJECTS) $(EXE)$(EXT_EXE): $(OBJECTS)
@$(WM_SCRIPTS)/makeTargetDir $(EXE) @$(WM_SCRIPTS)/makeTargetDir $(EXE)
$(call QUIET_MESSAGE,ld,$(EXE)$(EXE_EXT)) $(call QUIET_MESSAGE,ld,$(EXE)$(EXT_EXE))
$E $(LINKEXE) $(OBJECTS) -L$(LIB_PLATFORMS) \ $E $(LINKEXE) $(OBJECTS) -L$(LIB_PLATFORMS) \
$(EXE_LIBS) $(PROJECT_LIBS) $(SYS_LIBS) \ $(EXE_LIBS) $(PROJECT_LIBS) $(SYS_LIBS) \
$(LINK_LIBS) $(GLIBS) -o $(EXE)$(EXE_EXT) $(LINK_LIBS) $(GLIBS) -o $(EXE)$(EXT_EXE)
.PHONY: exe .PHONY: exe
exe: $(SEXE)$(EXE_EXT) | silent exe: $(SEXE)$(EXT_EXE) | silent
$(SEXE)$(EXE_EXT): $(OBJECTS) $(SEXE)$(EXT_EXE): $(OBJECTS)
@$(WM_SCRIPTS)/makeTargetDir $(SEXE) @$(WM_SCRIPTS)/makeTargetDir $(SEXE)
$(call QUIET_MESSAGE,ld,$(SEXE)$(EXE_EXT)) $(call QUIET_MESSAGE,ld,$(SEXE)$(EXT_EXE))
$E $(LINKEXE) $(OBJECTS) $(EXE_LIBS) \ $E $(LINKEXE) $(OBJECTS) $(EXE_LIBS) \
$(SYS_LIBS) $(LINK_LIBS) $(GLIBS) -o $(SEXE)$(EXE_EXT) $(SYS_LIBS) $(LINK_LIBS) $(GLIBS) -o $(SEXE)$(EXT_EXE)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
......
...@@ -61,7 +61,10 @@ include $(GENERAL_RULES)/general ...@@ -61,7 +61,10 @@ include $(GENERAL_RULES)/general
.PHONY: all clean .PHONY: all clean
all: $(WMAKE_BIN)/dirToString $(WMAKE_BIN)/wmkdep $(WMAKE_BIN)/wmkdepend all: \
$(WMAKE_BIN)/dirToString$(EXT_EXE) \
$(WMAKE_BIN)/wmkdep$(EXT_EXE) \
$(WMAKE_BIN)/wmkdepend$(EXT_EXE)
@echo "built wmake-bin for $(WM_ARCH)$(WM_COMPILER)" @echo "built wmake-bin for $(WM_ARCH)$(WM_COMPILER)"
clean: clean:
...@@ -69,23 +72,23 @@ clean: ...@@ -69,23 +72,23 @@ clean:
@rm -rf $(WMAKE_BIN) 2>/dev/null @rm -rf $(WMAKE_BIN) 2>/dev/null
@rmdir $(shell dirname $(WMAKE_BIN)) 2>/dev/null || true @rmdir $(shell dirname $(WMAKE_BIN)) 2>/dev/null || true
$(WMAKE_BIN)/dirToString: dirToString.c $(WMAKE_BIN)/dirToString$(EXT_EXE): dirToString.c
@mkdir -p $(WMAKE_BIN) @mkdir -p $(WMAKE_BIN)
$(call QUIET_MESSAGE,compile,$(<F)) $(call QUIET_MESSAGE,compile,$(<F))
$E $(cc) $(cFLAGS) $(<F) -o $@ $E $(cc) $(cFLAGS) $(<F) -o $@
$(WMAKE_BIN)/wmkdep: wmkdep.l $(WMAKE_BIN)/wmkdep$(EXT_EXE): wmkdep.l
@mkdir -p $(WMAKE_BIN) @mkdir -p $(WMAKE_BIN)
$(call QUIET_MESSAGE,flex,$(<F)) $(call QUIET_MESSAGE,flex,$(<F))
$E flex -o $@.c $(<F) && $(cc) $(cFLAGS) $@.c -o $@ $E flex -o $@.c $(<F) && $(cc) $(cFLAGS) $@.c -o $@
@rm -f $@.c 2>/dev/null @rm -f $@.c 2>/dev/null
$(WMAKE_BIN)/wmkdepend: wmkdepend.cpp $(WMAKE_BIN)/wmkdepend$(EXT_EXE): wmkdepend.cpp
@mkdir -p $(WMAKE_BIN) @mkdir -p $(WMAKE_BIN)
$(call QUIET_MESSAGE,wmkdepend,$(<F)) $(call QUIET_MESSAGE,wmkdepend,$(<F))
$E $(CC) $(c++FLAGS) $(c++LESSWARN) $(<F) -o $@ $E $(CC) $(c++FLAGS) $(c++LESSWARN) $(<F) -o $@
# $(WMAKE_BIN)/wmkdepend: wmkdepend.rl # $(WMAKE_BIN)/wmkdepend$(EXT_EXE): wmkdepend.rl
# @mkdir -p $(WMAKE_BIN) # @mkdir -p $(WMAKE_BIN)
# $(call QUIET_MESSAGE,ragel,$(<F)) # $(call QUIET_MESSAGE,ragel,$(<F))
# $E ragel -G2 -o $@.cpp $(<F) && $(CC) $(c++FLAGS) $(c++LESSWARN) $@.cpp -o $@ # $E ragel -G2 -o $@.cpp $(<F) && $(CC) $(c++FLAGS) $(c++LESSWARN) $@.cpp -o $@
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment