r1138 - trunk
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Aug 27 03:02:55 EDT 2007
Author: ludwig
Date: 2007-08-27 03:02:54 -0400 (Mon, 27 Aug 2007)
New Revision: 1138
Modified:
trunk/Makefile
trunk/README
Log:
make V=1 shows gcc command line
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2007-08-26 21:27:46 UTC (rev 1137)
+++ trunk/Makefile 2007-08-27 07:02:54 UTC (rev 1138)
@@ -32,6 +32,14 @@
BUILD_GAME_SO =
BUILD_GAME_QVM =
+ifeq ($(V),1)
+echo_cmd=@:
+Q=
+else
+echo_cmd=@echo
+Q=@
+endif
+
#############################################################################
#
# If you require a different configuration from the defaults below, create a
@@ -756,18 +764,18 @@
endif
define DO_CC
- at echo "CC $<"
-@$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
+$(echo_cmd) "CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -o $@ -c $<
endef
define DO_SMP_CC
- at echo "SMP_CC $<"
-@$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DSMP -o $@ -c $<
+$(echo_cmd) "SMP_CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) -DSMP -o $@ -c $<
endef
define DO_BOT_CC
- at echo "BOT_CC $<"
-@$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) -DBOTLIB -o $@ -c $<
+$(echo_cmd) "BOT_CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) $(CFLAGS) $(BOTCFLAGS) -DBOTLIB -o $@ -c $<
endef
ifeq ($(GENERATE_DEPENDENCIES),1)
@@ -775,30 +783,30 @@
endif
define DO_SHLIB_CC
- at echo "SHLIB_CC $<"
-@$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-@$(DO_QVM_DEP)
+$(echo_cmd) "SHLIB_CC $<"
+$(Q)$(CC) $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
endef
define DO_SHLIB_CC_MISSIONPACK
- at echo "SHLIB_CC_MISSIONPACK $<"
-@$(CC) -DMISSIONPACK $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
-@$(DO_QVM_DEP)
+$(echo_cmd) "SHLIB_CC_MISSIONPACK $<"
+$(Q)$(CC) -DMISSIONPACK $(CFLAGS) $(SHLIBCFLAGS) -o $@ -c $<
+$(Q)$(DO_QVM_DEP)
endef
define DO_AS
- at echo "AS $<"
-@$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
+$(echo_cmd) "AS $<"
+$(Q)$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
endef
define DO_DED_CC
- at echo "DED_CC $<"
-@$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) -o $@ -c $<
+$(echo_cmd) "DED_CC $<"
+$(Q)$(CC) $(NOTSHLIBCFLAGS) -DDEDICATED $(CFLAGS) -o $@ -c $<
endef
define DO_WINDRES
- at echo "WINDRES $<"
-@$(WINDRES) -i $< -o $@
+$(echo_cmd) "WINDRES $<"
+$(Q)$(WINDRES) -i $< -o $@
endef
@@ -810,16 +818,19 @@
all: debug release
debug:
- @$(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(DEBUG_CFLAGS)"
+ @$(MAKE) targets B=$(BD) CFLAGS="$(CFLAGS) $(DEBUG_CFLAGS)" V=$(V)
release:
- @$(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS)"
+ @$(MAKE) targets B=$(BR) CFLAGS="$(CFLAGS) $(RELEASE_CFLAGS)" V=$(V)
# Create the build directories and tools, print out
# an informational message, then start building
targets: makedirs tools
@echo ""
@echo "Building ioquake3 in $(B):"
+ @echo " ARCH: $(ARCH)"
+ @echo " COMPILE_PLATFORM: $(COMPILE_PLATFORM)"
+ @echo " COMPILE_ARCH: $(COMPILE_ARCH)"
@echo " CC: $(CC)"
@echo ""
@echo " CFLAGS:"
@@ -834,7 +845,7 @@
echo " $$i"; \
done
@echo ""
- @$(MAKE) $(TARGETS)
+ @$(MAKE) $(TARGETS) V=$(V)
makedirs:
@if [ ! -d $(BUILD_DIR) ];then $(MKDIR) $(BUILD_DIR);fi
@@ -872,13 +883,13 @@
endif
define DO_Q3LCC
- at echo "Q3LCC $<"
-@$(Q3LCC) -o $@ $<
+$(echo_cmd) "Q3LCC $<"
+$(Q)$(Q3LCC) -o $@ $<
endef
define DO_Q3LCC_MISSIONPACK
- at echo "Q3LCC_MISSIONPACK $<"
-@$(Q3LCC) -DMISSIONPACK -o $@ $<
+$(echo_cmd) "Q3LCC_MISSIONPACK $<"
+$(Q)$(Q3LCC) -DMISSIONPACK -o $@ $<
endef
@@ -1110,13 +1121,13 @@
endif
$(B)/ioquake3.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ) $(LIBSDLMAIN)
- @echo "LD $@"
- @$(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) \
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ) $(CLIENT_LDFLAGS) \
$(LDFLAGS) $(LIBSDLMAIN)
$(B)/ioquake3-smp.$(ARCH)$(BINEXT): $(Q3OBJ) $(Q3POBJ_SMP) $(LIBSDLMAIN)
- @echo "LD $@"
- @$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(CLIENT_LDFLAGS) \
$(THREAD_LDFLAGS) $(LDFLAGS) $(LIBSDLMAIN)
ifneq ($(strip $(LIBSDLMAIN)),)
@@ -1232,8 +1243,8 @@
endif
$(B)/ioq3ded.$(ARCH)$(BINEXT): $(Q3DOBJ)
- @echo "LD $@"
- @$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
@@ -1271,12 +1282,12 @@
Q3CGVMOBJ = $(Q3CGOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
- @echo "LD $@"
- @$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
$(B)/baseq3/vm/cgame.qvm: $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
- @echo "Q3ASM $@"
- @$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(Q3CGVMOBJ) $(CGDIR)/cg_syscalls.asm
#############################################################################
## MISSIONPACK CGAME
@@ -1314,12 +1325,12 @@
MPCGVMOBJ = $(MPCGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ)
- @echo "LD $@"
- @$(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
$(B)/missionpack/vm/cgame.qvm: $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
- @echo "Q3ASM $@"
- @$(Q3ASM) -o $@ $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(MPCGVMOBJ) $(CGDIR)/cg_syscalls.asm
@@ -1366,12 +1377,12 @@
Q3GVMOBJ = $(Q3GOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
- @echo "LD $@"
- @$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
$(B)/baseq3/vm/qagame.qvm: $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
- @echo "Q3ASM $@"
- @$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(Q3GVMOBJ) $(GDIR)/g_syscalls.asm
#############################################################################
## MISSIONPACK GAME
@@ -1416,12 +1427,12 @@
MPGVMOBJ = $(MPGOBJ_:%.o=%.asm) $(B)/missionpack/game/bg_lib.asm
$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ)
- @echo "LD $@"
- @$(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
$(B)/missionpack/vm/qagame.qvm: $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
- @echo "Q3ASM $@"
- @$(Q3ASM) -o $@ $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(MPGVMOBJ) $(GDIR)/g_syscalls.asm
@@ -1478,12 +1489,12 @@
Q3UIVMOBJ = $(Q3UIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ)
- @echo "LD $@"
- @$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
$(B)/baseq3/vm/ui.qvm: $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
- @echo "Q3ASM $@"
- @$(Q3ASM) -o $@ $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(Q3UIVMOBJ) $(UIDIR)/ui_syscalls.asm
#############################################################################
## MISSIONPACK UI
@@ -1505,12 +1516,12 @@
MPUIVMOBJ = $(MPUIOBJ_:%.o=%.asm) $(B)/baseq3/game/bg_lib.asm
$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ)
- @echo "LD $@"
- @$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
+ $(echo_cmd) "LD $@"
+ $(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
$(B)/missionpack/vm/ui.qvm: $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
- @echo "Q3ASM $@"
- @$(Q3ASM) -o $@ $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
+ $(echo_cmd) "Q3ASM $@"
+ $(Q)$(Q3ASM) -o $@ $(MPUIVMOBJ) $(UIDIR)/ui_syscalls.asm
@@ -1699,7 +1710,7 @@
@rm -rf $(BUILD_DIR)
installer: release
- @$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR)
+ @$(MAKE) VERSION=$(VERSION) -C $(LOKISETUPDIR) V=$(V)
dist:
rm -rf ioquake3-$(SVN_VERSION)
Modified: trunk/README
===================================================================
--- trunk/README 2007-08-26 21:27:46 UTC (rev 1137)
+++ trunk/README 2007-08-27 07:02:54 UTC (rev 1138)
@@ -88,6 +88,7 @@
Makefile.local:
OPTIMIZE - use this for custom CFLAGS
+ V - set to show cc command line when building
DEFAULT_BASEDIR - extra path to search for baseq3 and such
BUILD_SERVER - build the 'ioq3ded' server binary
BUILD_CLIENT - build the 'ioquake3' client binary
More information about the quake3-commits
mailing list