From: havoc Date: Tue, 22 Oct 2002 07:05:24 +0000 (+0000) Subject: make profile now works X-Git-Tag: RELEASE_0_2_0_RC1~119 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=86fdecae428e202aa34987a0b40256350754934f;p=xonotic%2Fdarkplaces.git make profile now works no longer prints 'Compiling whatever.c' and so on as per Mercury's request git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2549 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/makefile b/makefile index 5c1bc588..5502b27d 100644 --- a/makefile +++ b/makefile @@ -61,7 +61,7 @@ OBJ_DED= vid_null.o cd_null.o snd_null.o # Compilation CFLAGS_COMMON=-MD -Wall -Werror CFLAGS_DEBUG=-ggdb -CFLAGS_PROFILE=-pg +CFLAGS_PROFILE=-g -pg -ggdb CFLAGS_RELEASE= OPTIM_DEBUG= @@ -72,7 +72,10 @@ DO_CC=$(CC) $(CFLAGS) -c $< -o $@ # Link -LDFLAGS=-lm -ldl +LDFLAGS_COMMON=-lm -ldl +LDFLAGS_DEBUG=-g -ggdb +LDFLAGS_PROFILE=-g -pg +LDFLAGS_RELEASE= EXE_GLX=darkplaces-glx EXE_DED=darkplaces-dedicated @@ -106,82 +109,85 @@ help: @echo debug : - @$(MAKE) glx-debug ded-debug + $(MAKE) glx-debug ded-debug profile : - @$(MAKE) glx-profile ded-profile + $(MAKE) glx-profile ded-profile release : - @$(MAKE) glx-release ded-release + $(MAKE) glx-release ded-release glx-debug : - @$(MAKE) bin-debug EXE="$(EXE_GLX)" + $(MAKE) bin-debug EXE="$(EXE_GLX)" glx-profile : - @$(MAKE) bin-profile EXE="$(EXE_GLX)" + $(MAKE) bin-profile EXE="$(EXE_GLX)" glx-release : - @$(MAKE) bin-release EXE="$(EXE_GLX)" + $(MAKE) bin-release EXE="$(EXE_GLX)" ded-debug : - @$(MAKE) bin-debug EXE="$(EXE_DED)" + $(MAKE) bin-debug EXE="$(EXE_DED)" ded-profile : - @$(MAKE) bin-profile EXE="$(EXE_DED)" + $(MAKE) bin-profile EXE="$(EXE_DED)" ded-release : - @$(MAKE) bin-release EXE="$(EXE_DED)" + $(MAKE) bin-release EXE="$(EXE_DED)" bin-debug : @echo @echo "========== $(EXE) (debug) ==========" - @echo Using compiler $(CC) - @echo Compiling with flags: $(CFLAGS_COMMON) $(CFLAGS_DEBUG) \ - $(OPTIM_DEBUG) - @echo - @$(MAKE) $(EXE) \ - CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_DEBUG) $(OPTIM_DEBUG)" +# @echo Using compiler $(CC) +# @echo Compiling with flags: $(CFLAGS_COMMON) $(CFLAGS_DEBUG) \ +# $(OPTIM_DEBUG) +# @echo + $(MAKE) $(EXE) \ + CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_DEBUG) $(OPTIM_DEBUG)"\ + LDFLAGS="$(LDFLAGS_COMMON) $(LDFLAGS_DEBUG)" bin-profile : @echo @echo "========== $(EXE) (profile) ==========" - @echo Using compiler $(CC) - @echo Compiling with flags: $(CFLAGS_COMMON) $(CFLAGS_PROFILE) \ - $(OPTIM_RELEASE) - @echo - @$(MAKE) $(EXE) \ - CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_PROFILE) $(OPTIM_RELEASE)" +# @echo Using compiler $(CC) +# @echo Compiling with flags: $(CFLAGS_COMMON) $(CFLAGS_PROFILE) \ +# $(OPTIM_RELEASE) +# @echo + $(MAKE) $(EXE) \ + CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_PROFILE) $(OPTIM_RELEASE)"\ + LDFLAGS="$(LDFLAGS_COMMON) $(LDFLAGS_PROFILE)" bin-release : @echo @echo "========== $(EXE) (release) ==========" - @echo Using compiler $(CC) - @echo Compiling with flags: $(CFLAGS_COMMON) $(CFLAGS_RELEASE) \ - $(OPTIM_RELEASE) - @echo - @$(MAKE) $(EXE) \ - CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)" +# @echo Using compiler $(CC) +# @echo Compiling with flags: $(CFLAGS_COMMON) $(CFLAGS_RELEASE) \ +# $(OPTIM_RELEASE) +# @echo + $(MAKE) $(EXE) \ + CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)"\ + LDFLAGS="$(LDFLAGS_COMMON) $(LDFLAGS_RELEASE)" builddate: touch builddate.c vid_glx.o: vid_glx.c - @echo " Compiling" $< - @$(DO_CC) -I/usr/X11R6/include +# @echo " Compiling" $< + $(DO_CC) -I/usr/X11R6/include .c.o: - @echo " Compiling" $< - @$(DO_CC) +# @echo " Compiling" $< + $(DO_CC) $(EXE_GLX): $(OBJ_COMMON) $(OBJ_GLX) - @echo " Linking " $@ - @$(DO_LD) $(GLX_LIB) +# @echo " Linking " $@ + $(DO_LD) $(GLX_LIB) $(EXE_DED): $(OBJ_COMMON) $(OBJ_DED) - @echo " Linking " $@ - @$(DO_LD) +# @echo " Linking " $@ + $(DO_LD) clean: - @rm -f $(EXE_GLX) $(EXE_DED) *.o *.d + rm -f $(EXE_GLX) $(EXE_DED) *.o *.d -include *.d