From 4c0f7f2923c1028a423b74103660a600045eccf3 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 27 Jul 2013 10:06:26 +0000 Subject: [PATCH] Revert "Build in subdirs" MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This reverts commit f41e93d3e84e082d4728e3d6a9aadb3ca686a9b9. Conflicts: BSDmakefile makefile.inc From: Matthias Krüger git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11984 d7cf8633-e32d-0410-b094-e92efae38249 --- .gitignore | 1 - BSDmakefile | 6 ++---- makefile | 10 ++-------- makefile.inc | 21 +++++---------------- 4 files changed, 9 insertions(+), 29 deletions(-) diff --git a/.gitignore b/.gitignore index 047e418e..de9a5adf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -obj/ *.d *.o *.i diff --git a/BSDmakefile b/BSDmakefile index ee3f7402..8c4561fb 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -10,10 +10,8 @@ DP_ARCH != uname # Makefile name MAKEFILE=BSDmakefile -# Commands +# Command used to delete files CMD_RM=$(CMD_UNIXRM) -CMD_CP=$(CMD_UNIXCP) -CMD_MKDIR=$(CMD_UNIXMKDIR) # default targets TARGETS_DEBUG=sv-debug cl-debug sdl-debug @@ -140,7 +138,7 @@ CFLAGS_PRELOAD=$(CFLAGS_UNIX_PRELOAD) MAKE:=$(MAKE) -f BSDmakefile -DO_LD=$(CC) -o ../../../$@ $> $(LDFLAGS) +DO_LD=$(CC) -o $@ $> $(LDFLAGS) ##### Definitions shared by all makefiles ##### diff --git a/makefile b/makefile index fc8c3e4f..b5dc369f 100644 --- a/makefile +++ b/makefile @@ -32,18 +32,12 @@ ifneq ($(DP_MAKE_TARGET), mingw) DP_MACHINE:=$(shell uname -m) endif -# Makefile name -MAKEFILE=makefile -# Commands +# Command used to delete files ifdef windir CMD_RM=del - CMD_CP=copy /y - CMD_MKDIR=mkdir else CMD_RM=$(CMD_UNIXRM) - CMD_CP=$(CMD_UNIXCP) - CMD_MKDIR=$(CMD_UNIXMKDIR) endif # 64bits AMD CPUs use another lib directory @@ -378,7 +372,7 @@ endif ##### GNU Make specific definitions ##### -DO_LD=$(CC) -o ../../../$@ $^ $(LDFLAGS) +DO_LD=$(CC) -o $@ $^ $(LDFLAGS) ##### Definitions shared by all makefiles ##### diff --git a/makefile.inc b/makefile.inc index 13ab52b2..879f5dd1 100644 --- a/makefile.inc +++ b/makefile.inc @@ -171,7 +171,7 @@ OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_SND_COMMON) snd_sdl. # Compilation -CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../ +CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES CFLAGS_CLIENT=-DCONFIG_CD CFLAGS_SERVER= CFLAGS_DEBUG=-ggdb @@ -220,8 +220,6 @@ EXE_UNIXSVNEXUIZ=nexuiz-dedicated EXE_UNIXSDLNEXUIZ=nexuiz-sdl CMD_UNIXRM=rm -rf -CMD_UNIXCP=cp -f -CMD_UNIXMKDIR=mkdir -p ##### Linux specific variables ##### @@ -287,7 +285,6 @@ EXE_WINCLNEXUIZ=nexuiz.exe EXE_WINSVNEXUIZ=nexuiz-dedicated.exe EXE_WINSDLNEXUIZ=nexuiz-sdl.exe -VPATH := ../../../ ##### Commands ##### @@ -426,8 +423,7 @@ bin-debug : $(CHECKLEVEL1) @echo @echo "========== $(EXE) (debug) ==========" - $(MAKE) prepare BUILD_DIR=obj/debug/$(EXE) - $(MAKE) -C obj/debug/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ + $(MAKE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_DEBUG) $(OPTIM_DEBUG)"\ LDFLAGS="$(LDFLAGS_DEBUG) $(LDFLAGS_COMMON)" LEVEL=2 @@ -436,8 +432,7 @@ bin-profile : $(CHECKLEVEL1) @echo @echo "========== $(EXE) (profile) ==========" - $(MAKE) prepare BUILD_DIR=obj/profile/$(EXE) - $(MAKE) -C obj/profile/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ + $(MAKE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_PROFILE) $(OPTIM_RELEASE)"\ LDFLAGS="$(LDFLAGS_PROFILE) $(LDFLAGS_COMMON)" LEVEL=2 @@ -446,8 +441,7 @@ bin-release : $(CHECKLEVEL1) @echo @echo "========== $(EXE) (release) ==========" - $(MAKE) prepare BUILD_DIR=obj/release/$(EXE) - $(MAKE) -C obj/release/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ + $(MAKE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)"\ LDFLAGS="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)" LEVEL=2 @@ -457,16 +451,12 @@ bin-release-profile : $(CHECKLEVEL1) @echo @echo "========== $(EXE) (release) ==========" - $(MAKE) prepare BUILD_DIR=obj/release-profile/$(EXE) - $(MAKE) -C obj/release-profile/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ + $(MAKE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE_PROFILE) $(OPTIM_RELEASE)"\ LDFLAGS="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)" LEVEL=2 $(STRIP) $(EXE) -prepare : - $(CMD_MKDIR) $(BUILD_DIR) - $(CMD_CP) makefile.inc $(BUILD_DIR)/ #this checks USEODE when compiling so it needs the ODE flags as well prvm_cmds.o: prvm_cmds.c @@ -566,7 +556,6 @@ clean: -$(CMD_RM) $(EXE_SDLNEXUIZ) -$(CMD_RM) *.o -$(CMD_RM) *.d - -$(CMD_RM) obj/ clean-profile: clean -$(CMD_RM) *.gcda -- 2.39.2