# 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
MAKE:=$(MAKE) -f BSDmakefile
-DO_LD=$(CC) -o ../../../$@ $> $(LDFLAGS)
+DO_LD=$(CC) -o $@ $> $(LDFLAGS)
##### Definitions shared by all makefiles #####
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
##### GNU Make specific definitions #####
-DO_LD=$(CC) -o ../../../$@ $^ $(LDFLAGS)
+DO_LD=$(CC) -o $@ $^ $(LDFLAGS)
##### Definitions shared by all makefiles #####
# 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
EXE_UNIXSDLNEXUIZ=nexuiz-sdl
CMD_UNIXRM=rm -rf
-CMD_UNIXCP=cp -f
-CMD_UNIXMKDIR=mkdir -p
##### Linux specific variables #####
EXE_WINSVNEXUIZ=nexuiz-dedicated.exe
EXE_WINSDLNEXUIZ=nexuiz-sdl.exe
-VPATH := ../../../
##### Commands #####
$(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
$(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
$(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
$(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
-$(CMD_RM) $(EXE_SDLNEXUIZ)
-$(CMD_RM) *.o
-$(CMD_RM) *.d
- -$(CMD_RM) obj/
clean-profile: clean
-$(CMD_RM) *.gcda