mirror of https://github.com/ioquake/ioq3.git
* Fix parallel build
* Print message indicating CC, CFLAGS and targets before building * Update .PHONY targets * Remove build_release and build_debug targets
This commit is contained in:
parent
2d5495d34b
commit
155802bc0c
54
Makefile
54
Makefile
|
@ -751,7 +751,7 @@ ifeq ($(USE_LOCAL_HEADERS),1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(GENERATE_DEPENDENCIES),1)
|
ifeq ($(GENERATE_DEPENDENCIES),1)
|
||||||
DEPEND_CFLAGS=-MMD
|
BASE_CFLAGS += -MMD
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_SVN),1)
|
ifeq ($(USE_SVN),1)
|
||||||
|
@ -777,23 +777,35 @@ DO_WINDRES = @echo "WINDRES $<"; \
|
||||||
# MAIN TARGETS
|
# MAIN TARGETS
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
default: build_release
|
default: release
|
||||||
|
all: debug release
|
||||||
|
|
||||||
debug: build_debug
|
debug:
|
||||||
release: build_release
|
@$(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(DEBUG_CFLAGS)"
|
||||||
|
|
||||||
build_debug: tools
|
release:
|
||||||
$(MAKE) makedirs targets B=$(BD) \
|
@$(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS)"
|
||||||
CFLAGS="$(CFLAGS) $(DEBUG_CFLAGS) $(DEPEND_CFLAGS)"
|
|
||||||
|
|
||||||
build_release: tools
|
# Create the build directories and tools, print out
|
||||||
$(MAKE) makedirs targets B=$(BR) \
|
# an informational message, then start building
|
||||||
CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS) $(DEPEND_CFLAGS)"
|
targets: makedirs tools
|
||||||
|
@echo ""
|
||||||
# Build both debug and release builds
|
@echo "Building ioquake3 in $(B):"
|
||||||
all: build_debug build_release
|
@echo " CC: $(CC)"
|
||||||
|
@echo ""
|
||||||
targets: $(TARGETS)
|
@echo " CFLAGS:"
|
||||||
|
@for i in $(CFLAGS); \
|
||||||
|
do \
|
||||||
|
echo " $$i"; \
|
||||||
|
done
|
||||||
|
@echo ""
|
||||||
|
@echo " Output:"
|
||||||
|
@for i in $(TARGETS); \
|
||||||
|
do \
|
||||||
|
echo " $$i"; \
|
||||||
|
done
|
||||||
|
@echo ""
|
||||||
|
@$(MAKE) $(TARGETS)
|
||||||
|
|
||||||
makedirs:
|
makedirs:
|
||||||
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
|
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
|
||||||
|
@ -1588,7 +1600,7 @@ $(B)/missionpack/qcommon/%.asm: $(CMDIR)/%.c
|
||||||
# MISC
|
# MISC
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
||||||
copyfiles: build_release
|
copyfiles: release
|
||||||
@if [ ! -d $(COPYDIR)/baseq3 ]; then echo "You need to set COPYDIR to where your Quake3 data is!"; fi
|
@if [ ! -d $(COPYDIR)/baseq3 ]; then echo "You need to set COPYDIR to where your Quake3 data is!"; fi
|
||||||
-$(MKDIR) -p -m 0755 $(COPYDIR)/baseq3
|
-$(MKDIR) -p -m 0755 $(COPYDIR)/baseq3
|
||||||
-$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
|
-$(MKDIR) -p -m 0755 $(COPYDIR)/missionpack
|
||||||
|
@ -1636,10 +1648,10 @@ clean2:
|
||||||
@rm -f $(TARGETS)
|
@rm -f $(TARGETS)
|
||||||
|
|
||||||
clean-debug:
|
clean-debug:
|
||||||
@$(MAKE) clean2 B=$(BD) CFLAGS="$(DEBUG_CFLAGS)"
|
@$(MAKE) clean2 B=$(BD)
|
||||||
|
|
||||||
clean-release:
|
clean-release:
|
||||||
@$(MAKE) clean2 B=$(BR) CFLAGS="$(RELEASE_CFLAGS)"
|
@$(MAKE) clean2 B=$(BR)
|
||||||
|
|
||||||
toolsclean:
|
toolsclean:
|
||||||
@$(MAKE) -C $(TOOLSDIR)/asm clean uninstall
|
@$(MAKE) -C $(TOOLSDIR)/asm clean uninstall
|
||||||
|
@ -1648,7 +1660,7 @@ toolsclean:
|
||||||
distclean: clean toolsclean
|
distclean: clean toolsclean
|
||||||
@rm -rf $(BUILD_DIR)
|
@rm -rf $(BUILD_DIR)
|
||||||
|
|
||||||
installer: build_release
|
installer: release
|
||||||
@$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR)
|
@$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR)
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
|
@ -1675,4 +1687,6 @@ ifneq ($(strip $(D_FILES)),)
|
||||||
include $(D_FILES)
|
include $(D_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: release debug clean distclean copyfiles installer dist
|
.PHONY: all clean clean2 clean-debug clean-release copyfiles \
|
||||||
|
debug default dist distclean installer makedirs qvmdeps \
|
||||||
|
release targets tools toolsclean
|
||||||
|
|
Loading…
Reference in New Issue