mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Ball-busting Makefile restructure.
DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4543 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6ef05fe07c
commit
b332189ae5
16 changed files with 1252 additions and 1733 deletions
|
@ -5,61 +5,177 @@
|
|||
include Makefile.common
|
||||
|
||||
|
||||
# Build locations
|
||||
#
|
||||
SRC=source
|
||||
RSRC=rsrc
|
||||
ESRC=$(EROOT)/src
|
||||
EINC=$(EROOT)/include
|
||||
INC=$(SRC)
|
||||
DUKE3D_SRC=source
|
||||
DUKE3D_INC=$(DUKE3D_SRC)
|
||||
DUKE3D_RSRC=rsrc
|
||||
ENGINE_ROOT=build
|
||||
ENGINE_SRC=$(ENGINE_ROOT)/src
|
||||
ENGINE_INC=$(ENGINE_ROOT)/include
|
||||
o=o
|
||||
# ENETROOT=$(ESRC)/enet
|
||||
asm=nasm
|
||||
|
||||
|
||||
# BUILD Engine
|
||||
|
||||
ENGINE_CFLAGS=-I$(ENGINE_SRC)
|
||||
UTIL_LIBS= -lm # -lpthread
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ENGINE_OBJ=$(DUKE3D_SRC)/eobj_win
|
||||
else
|
||||
ENGINE_OBJ=$(DUKE3D_SRC)/eobj
|
||||
endif
|
||||
|
||||
ENGINE_OBJS=baselayer cache1d compat crc32 defs engine polymost texcache dxtfilter hightile textfont smalltextfont kplib lz4 osd pragmas scriptfile mutex xxhash
|
||||
ENGINE_EDITOR_OBJS=build config defs
|
||||
ifeq (0,$(NOASM))
|
||||
ENGINE_OBJS+= a
|
||||
else
|
||||
ENGINE_OBJS+= a-c
|
||||
ifneq (0,$(USE_ASM64))
|
||||
ENGINE_OBJS+= a64
|
||||
endif
|
||||
endif
|
||||
ifeq (1,$(USE_OPENGL))
|
||||
ENGINE_OBJS+= mdsprite glbuild
|
||||
ifeq (1,$(POLYMER))
|
||||
ENGINE_OBJS+= polymer
|
||||
endif
|
||||
endif
|
||||
ifeq (1,$(LUNATIC))
|
||||
ENGINE_OBJS+= lunatic
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ENGINE_OBJS += osxbits
|
||||
ifneq (0,$(OSX_STARTUPWINDOW))
|
||||
ENGINE_EDITOR_OBJS += startosx.editor
|
||||
endif
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
ENGINE_OBJS+=SDLMain
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ENGINE_OBJS+= winbits
|
||||
ENGINE_EDITOR_OBJS+= startwin.editor
|
||||
endif
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
ENGINE_OBJS+= sdlayer
|
||||
|
||||
ifeq (1,$(HAVE_GTK2))
|
||||
ENGINE_OBJS+= gtkbits
|
||||
ifeq ($(LINKED_GTK),0)
|
||||
ENGINE_OBJS+= dynamicgtk
|
||||
endif
|
||||
ENGINE_EDITOR_OBJS+= startgtk.editor
|
||||
endif
|
||||
endif
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
ENGINE_OBJS+= winlayer rawinput
|
||||
endif
|
||||
|
||||
ENGINE_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(ENGINE_OBJS)))
|
||||
ENGINE_EDITOR_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(ENGINE_EDITOR_OBJS)))
|
||||
|
||||
|
||||
# AudioLib
|
||||
|
||||
AUDIOLIB_OBJS=drivers fx_man multivoc mix mixst pitch formats vorbis flac xa driver_nosound
|
||||
|
||||
AUDIOLIB_ROOT=$(DUKE3D_SRC)/jaudiolib
|
||||
AUDIOLIB_SRC=$(AUDIOLIB_ROOT)/src
|
||||
AUDIOLIB_INC=$(AUDIOLIB_ROOT)/include
|
||||
|
||||
AUDIOLIB_CFLAGS=-I$(AUDIOLIB_ROOT)/third-party/common/include -DHAVE_VORBIS
|
||||
ifneq ($(PLATFORM),WII)
|
||||
AUDIOLIB_CFLAGS+= -DHAVE_FLAC
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(MIXERTYPE),WIN)
|
||||
AUDIOLIB_CFLAGS+= -DHAVE_DS
|
||||
AUDIOLIB_OBJS+= driver_directsound
|
||||
endif
|
||||
|
||||
AUDIOLIB_OBJ=$(AUDIOLIB_ROOT)/obj_win
|
||||
else
|
||||
AUDIOLIB_OBJ=$(AUDIOLIB_ROOT)/obj
|
||||
endif
|
||||
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
AUDIOLIB_CFLAGS+= -DHAVE_SDL
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(PLATFORM),WII)
|
||||
AUDIOLIB_CFLAGS+=`pkg-config --cflags vorbis`
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
AUDIOLIB_OBJS+= driver_sdl
|
||||
endif
|
||||
|
||||
AUDIOLIB_OBJS_EXP:=$(addprefix $(AUDIOLIB_OBJ)/,$(addsuffix .$o,$(AUDIOLIB_OBJS)))
|
||||
|
||||
|
||||
# ENet
|
||||
|
||||
ENET_OBJS=callbacks host list packet peer protocol compress
|
||||
|
||||
ENET_ROOT=$(DUKE3D_SRC)/enet
|
||||
ENET_SRC=$(ENET_ROOT)/src
|
||||
ENET_INC=$(ENET_ROOT)/include
|
||||
ENET_CFLAGS=
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ENET_OBJS += win32
|
||||
ENET_OBJ=$(ENET_ROOT)/obj_win
|
||||
else
|
||||
ENET_OBJS += unix
|
||||
ENET_CFLAGS += -DHAS_SOCKLEN_T
|
||||
ENET_OBJ=$(ENET_ROOT)/obj
|
||||
endif
|
||||
|
||||
ENET_OBJS_EXP:=$(addprefix $(ENET_OBJ)/,$(addsuffix .$o,$(ENET_OBJS)))
|
||||
|
||||
|
||||
# Tools
|
||||
|
||||
UTIL_OBJS=compat pragmas kplib cache1d compat_tools
|
||||
UTILS=kextract kgroup transpal wad2art wad2map kmd2tool md2tool generateicon cacheinfo arttool givedepth mkpalette unpackssi bsuite
|
||||
GAMEUTILS=ivfrate
|
||||
DXUTILS=enumdisplay getdxdidf
|
||||
SDLUTILS=makesdlkeytrans
|
||||
|
||||
UTIL_OBJS_EXP:=$(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTIL_OBJS)))
|
||||
|
||||
|
||||
# Duke Nukem 3D
|
||||
|
||||
ifneq (0,$(RELEASE))
|
||||
# Debugging disabled
|
||||
debug+= $(F_NO_STACK_PROTECTOR)
|
||||
COMMONFLAGS += $(F_NO_STACK_PROTECTOR)
|
||||
else
|
||||
# Debugging enabled
|
||||
ifneq (0,$(KRANDDEBUG))
|
||||
debug+= -fno-inline -fno-inline-functions -fno-inline-functions-called-once
|
||||
COMMONFLAGS += -fno-inline -fno-inline-functions -fno-inline-functions-called-once
|
||||
endif
|
||||
ifeq (1,$(SDL_TARGET))
|
||||
COMPILERFLAGS += -DNOSDLPARACHUTE
|
||||
endif
|
||||
endif
|
||||
|
||||
OURCOMMONFLAGS=$(BASECOMMONFLAGS) \
|
||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(JAUDIOLIBDIR)/include -I$(ENETDIR)/include
|
||||
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
|
||||
OURCXXFLAGS=$(BASECXXFLAGS)
|
||||
OURCONLYFLAGS=$(BASECONLYFLAGS)
|
||||
OURASFLAGS=$(BASEASFLAGS)
|
||||
PRINTLDFLAGS=$(BASELDFLAGS)
|
||||
OURLDFLAGS=$(OURCOMMONFLAGS) $(PRINTLDFLAGS)
|
||||
COMPILERFLAGS += -I$(DUKE3D_INC) -I$(ENGINE_INC) -I$(DUKE3D_SRC)/jmact -I$(AUDIOLIB_ROOT)/include -I$(ENET_ROOT)/include
|
||||
|
||||
# Game/editor-specific linker options
|
||||
GAMELDFLAGS=
|
||||
EDITORLDFLAGS=
|
||||
DUKE3D_LINKERFLAGS=
|
||||
DUKE3D_EDITOR_LINKERFLAGS=
|
||||
|
||||
LIBS=
|
||||
LIBDIRS=
|
||||
|
||||
JAUDIOLIBDIR=$(SRC)/jaudiolib
|
||||
JAUDIOLIB=libjfaudiolib.a
|
||||
|
||||
ENETDIR=$(SRC)/enet
|
||||
ENETLIB=libenet.a
|
||||
|
||||
ifeq ($(NETCODE),0)
|
||||
ENET_TARGET=
|
||||
else
|
||||
ENET_TARGET=$(ENETDIR)/$(ENETLIB)
|
||||
ENET_TARGET=$(ENET_OBJS_EXP)
|
||||
endif
|
||||
|
||||
|
||||
include $(EROOT)/Makefile.shared
|
||||
|
||||
# The reasoning for this order is so SDL_mixer can link to SDL, etc.
|
||||
OURLIBS=$(LIBDIRS) $(BASELIBDIRS) $(BUILDLIBDIRS) $(LIBS) $(BASELIBS) $(BUILDLIBS)
|
||||
|
||||
|
||||
EDUKE32 ?= eduke32$(EXESUFFIX)
|
||||
MAPSTER32 ?= mapster32$(EXESUFFIX)
|
||||
|
||||
|
@ -75,115 +191,54 @@ endif
|
|||
EBACKTRACEDLL_TARGET:=$(EBACKTRACEDLL)
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OBJ=$(SRC)/obj_win
|
||||
EOBJ=$(SRC)/eobj_win
|
||||
DUKE3D_OBJ=$(DUKE3D_SRC)/obj_win
|
||||
else
|
||||
ifeq ($(SUBPLATFORM),LINUX)
|
||||
LIBS+= -lrt
|
||||
endif
|
||||
OBJ=$(SRC)/obj
|
||||
EOBJ=$(SRC)/eobj
|
||||
DUKE3D_OBJ=$(DUKE3D_SRC)/obj
|
||||
endif
|
||||
|
||||
JMACTOBJ=$(OBJ)/file_lib.$o \
|
||||
$(OBJ)/control.$o \
|
||||
$(OBJ)/keyboard.$o \
|
||||
$(OBJ)/mouse.$o \
|
||||
$(OBJ)/joystick.$o \
|
||||
$(OBJ)/mathutil.$o \
|
||||
$(OBJ)/scriplib.$o \
|
||||
$(OBJ)/animlib.$o
|
||||
MACT_OBJ=file_lib control keyboard mouse joystick mathutil scriplib animlib
|
||||
|
||||
GAMEOBJS=$(OBJ)/game.$o \
|
||||
$(OBJ)/actors.$o \
|
||||
$(OBJ)/anim.$o \
|
||||
$(OBJ)/common.$o \
|
||||
$(OBJ)/rev.$o \
|
||||
$(OBJ)/config.$o \
|
||||
$(OBJ)/demo.$o \
|
||||
$(OBJ)/gamedef.$o \
|
||||
$(OBJ)/gameexec.$o \
|
||||
$(OBJ)/gamevars.$o \
|
||||
$(OBJ)/global.$o \
|
||||
$(OBJ)/input.$o \
|
||||
$(OBJ)/menus.$o \
|
||||
$(OBJ)/namesdyn.$o \
|
||||
$(OBJ)/net.$o \
|
||||
$(OBJ)/player.$o \
|
||||
$(OBJ)/premap.$o \
|
||||
$(OBJ)/savegame.$o \
|
||||
$(OBJ)/sector.$o \
|
||||
$(OBJ)/rts.$o \
|
||||
$(OBJ)/osdfuncs.$o \
|
||||
$(OBJ)/osdcmds.$o \
|
||||
$(OBJ)/grpscan.$o \
|
||||
$(OBJ)/sounds.$o \
|
||||
$(OBJ)/soundsdyn.$o \
|
||||
$(JMACTOBJ)
|
||||
DUKE3D_OBJS=game actors anim common rev config demo gamedef gameexec gamevars global input menus namesdyn net player premap savegame sector rts osdfuncs osdcmds grpscan sounds soundsdyn $(MACT_OBJ)
|
||||
|
||||
EDITOROBJS=$(OBJ)/astub.$o \
|
||||
$(OBJ)/common.$o \
|
||||
$(OBJ)/rev.$o \
|
||||
$(OBJ)/m32def.$o \
|
||||
$(OBJ)/m32exec.$o \
|
||||
$(OBJ)/m32vars.$o \
|
||||
$(OBJ)/mathutil.$o \
|
||||
$(OBJ)/sounds_mapster32.$o
|
||||
DUKE3D_EDITOR_OBJS=astub common rev m32def m32exec m32vars mathutil sounds_mapster32
|
||||
|
||||
ifneq ($(USE_LIBVPX),0)
|
||||
GAMEOBJS+= $(OBJ)/animvpx.$o
|
||||
DUKE3D_OBJS+= animvpx
|
||||
endif
|
||||
|
||||
ifneq (0,$(DISABLEINLINING))
|
||||
GAMEOBJS+= $(OBJ)/game_inline.$o \
|
||||
$(OBJ)/actors_inline.$o \
|
||||
$(OBJ)/sector_inline.$o
|
||||
DUKE3D_OBJS+= game_inline actors_inline sector_inline
|
||||
endif
|
||||
|
||||
MISCGAMEDEPS=
|
||||
MISCEDITORDEPS=
|
||||
DUKE3D_MISCDEPS=
|
||||
DUKE3D_EDITOR_MISCDEPS=
|
||||
|
||||
|
||||
## Lunatic devel
|
||||
ifneq (0,$(LUNATIC))
|
||||
LUNATIC_COMMON_OBJS = \
|
||||
$(OBJ)/luaJIT_BC_defs_common.$o \
|
||||
$(OBJ)/luaJIT_BC_engine_maptext.$o \
|
||||
$(OBJ)/luaJIT_BC_engine.$o \
|
||||
$(OBJ)/luaJIT_BC_bcarray.$o \
|
||||
$(OBJ)/luaJIT_BC_bcheck.$o \
|
||||
$(OBJ)/luaJIT_BC_bitar.$o \
|
||||
$(OBJ)/luaJIT_BC_xmath.$o \
|
||||
$(OBJ)/luaJIT_BC_v.$o \
|
||||
$(OBJ)/luaJIT_BC_dump.$o \
|
||||
$(OBJ)/luaJIT_BC_dis_x86.$o \
|
||||
$(OBJ)/luaJIT_BC_dis_x64.$o \
|
||||
LUNATIC_COMMON_OBJS = luaJIT_BC_defs_common luaJIT_BC_engine_maptext luaJIT_BC_engine luaJIT_BC_bcarray luaJIT_BC_bcheck luaJIT_BC_bitar luaJIT_BC_xmath luaJIT_BC_v luaJIT_BC_dump luaJIT_BC_dis_x86 luaJIT_BC_dis_x64
|
||||
|
||||
# TODO: remove debugging modules from release build
|
||||
|
||||
EDITOROBJS+= $(OBJ)/lunatic_m32.$o $(LUNATIC_COMMON_OBJS)
|
||||
GAMEOBJS+= $(OBJ)/lunatic_game.$o $(LUNATIC_COMMON_OBJS)
|
||||
DUKE3D_EDITOR_OBJS+= lunatic_m32 $(LUNATIC_COMMON_OBJS)
|
||||
DUKE3D_OBJS+= lunatic_game $(LUNATIC_COMMON_OBJS)
|
||||
|
||||
EDITOROBJS+= $(OBJ)/luaJIT_BC_defs_m32.$o
|
||||
DUKE3D_EDITOR_OBJS+= luaJIT_BC_defs_m32
|
||||
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
# On non-Windows, we expect to have liblpeg.a (or a symlink to it) in source/.
|
||||
# On Windows, it will reside in platform/Windows/lib/32/ or lib/64/.
|
||||
LIBDIRS+= -L$(OBJ)/..
|
||||
ifeq ($(realpath $(OBJ)/../liblpeg.a),)
|
||||
LIBDIRS+= -L$(DUKE3D_SRC)
|
||||
ifeq ($(realpath $(DUKE3D_SRC)/liblpeg.a),)
|
||||
# XXX: This cripples "make clean" etc. too, but IMO it's better than warning.
|
||||
$(error "liblpeg.a not found in $(realpath $(OBJ)/..)")
|
||||
$(error "liblpeg.a not found in $(realpath $(DUKE3D_OBJ)/..)")
|
||||
endif
|
||||
endif
|
||||
LIBS+= -llpeg
|
||||
GAMEOBJS+= $(OBJ)/luaJIT_BC_con_lang.$o \
|
||||
$(OBJ)/luaJIT_BC_lunacon.$o \
|
||||
$(OBJ)/luaJIT_BC_randgen.$o \
|
||||
$(OBJ)/luaJIT_BC_stat.$o \
|
||||
$(OBJ)/luaJIT_BC_control.$o \
|
||||
$(OBJ)/luaJIT_BC_defs.$o \
|
||||
$(OBJ)/luaJIT_BC_savegame.$o \
|
||||
$(OBJ)/luaJIT_BC_fs.$o \
|
||||
DUKE3D_OBJS+= luaJIT_BC_con_lang luaJIT_BC_lunacon luaJIT_BC_randgen luaJIT_BC_stat luaJIT_BC_control luaJIT_BC_defs luaJIT_BC_savegame luaJIT_BC_fs
|
||||
|
||||
# now, take care of having the necessary symbols (sector, wall, etc.) in the
|
||||
# executable no matter what the debugging level
|
||||
|
@ -193,23 +248,23 @@ ifneq (0,$(LUNATIC))
|
|||
# Use -exported_symbols_list at link time when building
|
||||
# But, following _their_ directions does not give us the symbols! wtf?
|
||||
ifneq ($(STRIP),0)
|
||||
STRIP+= -s $(SRC)/lunatic/dynsymlist_osx
|
||||
STRIP+= -s $(DUKE3D_SRC)/lunatic/dynsymlist_osx
|
||||
endif
|
||||
|
||||
MISCGAMEDEPS+= $(SRC)/lunatic/dynsymlist_osx
|
||||
PRINTLDFLAGS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(SRC)/lunatic/aliases_list #-exported_symbols_list $(SRC)/lunatic/dynsymlist_osx
|
||||
DUKE3D_MISCDEPS+= $(DUKE3D_SRC)/lunatic/dynsymlist_osx
|
||||
LINKERFLAGS+= -pagezero_size 10000 -image_base 100000000 #-Wl,-alias_list -Wl,$(DUKE3D_SRC)/lunatic/aliases_list #-exported_symbols_list $(DUKE3D_SRC)/lunatic/dynsymlist_osx
|
||||
endif
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
override STRIP=
|
||||
MISCGAMEDEPS+= $(SRC)/lunatic/eduke32.def
|
||||
GAMELDFLAGS+= $(SRC)/lunatic/eduke32.def
|
||||
MISCEDITORDEPS+= $(SRC)/lunatic/mapster32.def
|
||||
EDITORLDFLAGS+= $(SRC)/lunatic/mapster32.def
|
||||
DUKE3D_MISCDEPS+= $(DUKE3D_SRC)/lunatic/eduke32.def
|
||||
DUKE3D_LINKERFLAGS+= $(DUKE3D_SRC)/lunatic/eduke32.def
|
||||
DUKE3D_EDITOR_MISCDEPS+= $(DUKE3D_SRC)/lunatic/mapster32.def
|
||||
DUKE3D_EDITOR_LINKERFLAGS+= $(DUKE3D_SRC)/lunatic/mapster32.def
|
||||
endif
|
||||
ifeq ($(SUBPLATFORM),LINUX)
|
||||
override STRIP=
|
||||
GAMELDFLAGS+= -Wl,--dynamic-list=$(SRC)/lunatic/dynsymlist
|
||||
EDITORLDFLAGS+= -Wl,--dynamic-list=$(SRC)/lunatic/dynsymlist_m32
|
||||
DUKE3D_LINKERFLAGS+= -Wl,--dynamic-list=$(DUKE3D_SRC)/lunatic/dynsymlist
|
||||
DUKE3D_EDITOR_LINKERFLAGS+= -Wl,--dynamic-list=$(DUKE3D_SRC)/lunatic/dynsymlist_m32
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -218,140 +273,69 @@ endif
|
|||
|
||||
ifeq ($(SUBPLATFORM),LINUX)
|
||||
ifeq (0,$(CLANG))
|
||||
OURCOMMONFLAGS += -fno-pic
|
||||
COMMONFLAGS += -fno-pic
|
||||
endif
|
||||
OURASFLAGS += -f elf
|
||||
LIBS += -lFLAC -lvorbisfile -lvorbis -logg
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
OURCOMMONFLAGS += -fno-pic
|
||||
LIBDIRS += -L$(abspath $(JAUDIOLIBDIR)/third-party/Apple/lib)
|
||||
COMMONFLAGS += -fno-pic
|
||||
LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Apple/lib
|
||||
|
||||
ifneq ($(findstring x86_64,$(ARCH)),x86_64)
|
||||
ifeq (,$(ARCH))
|
||||
ifneq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
LIBS += -read_only_relocs suppress
|
||||
endif
|
||||
else
|
||||
LIBS += -read_only_relocs suppress
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
||||
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
||||
|
||||
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lm \
|
||||
-Wl,-framework,SDL -Wl,-framework,SDL_mixer platform/Apple/lib/libSDLmain.a \
|
||||
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
|
||||
-Wl,-framework,CoreMidi -Wl,-framework,AudioUnit \
|
||||
-Wl,-framework,AudioToolbox -Wl,-framework,IOKit -Wl,-framework,AGL \
|
||||
-Wl,-framework,QuickTime -lm \
|
||||
-Wl,-rpath -Wl,"@loader_path/../Frameworks"
|
||||
# We have SDLMain.m from the OSX SDL package in the Apple/ subdir:
|
||||
EDITOROBJS+=$(OBJ)/SDLMain.$o
|
||||
GAMEOBJS+=$(OBJ)/SDLMain.$o
|
||||
else
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lm -lSDL_mixer \
|
||||
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
|
||||
-Wl,-framework,CoreMidi -Wl,-framework,AudioUnit \
|
||||
-Wl,-framework,AudioToolbox -Wl,-framework,IOKit -Wl,-framework,AGL \
|
||||
-Wl,-framework,QuickTime -lm
|
||||
endif
|
||||
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lm \
|
||||
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
|
||||
-Wl,-framework,CoreMidi -Wl,-framework,AudioUnit \
|
||||
-Wl,-framework,AudioToolbox -Wl,-framework,IOKit -Wl,-framework,AGL \
|
||||
-Wl,-framework,QuickTime -lm
|
||||
|
||||
ifneq (0,$(OSX_STARTUPWINDOW))
|
||||
GAMEOBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/startosx.game.$o
|
||||
DUKE3D_OBJS += GrpFile.game GameListSource.game startosx.game
|
||||
endif
|
||||
|
||||
OURASFLAGS += -f macho
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS += -fno-pic -DUNDERSCORES
|
||||
OURASFLAGS+= -DUNDERSCORES -f win32
|
||||
LIBS += -lFLAC -lvorbisfile -lvorbis -logg
|
||||
LIBDIRS += -L$(abspath $(JAUDIOLIBDIR)/third-party/Windows/lib$(WINLIB))
|
||||
GAMEOBJS+= $(OBJ)/gameres.$o $(OBJ)/winbits.$o $(OBJ)/startwin.game.$o
|
||||
EDITOROBJS+= $(OBJ)/buildres.$o
|
||||
JAUDIOLIB=libjfaudiolib_win32.a
|
||||
ENETLIB=libenet_win32.a
|
||||
OURCOMMONFLAGS += -I$(DXROOT) -I$(DXROOT)/include
|
||||
COMMONFLAGS += -fno-pic
|
||||
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lcompat-from-mingw-w64
|
||||
LIBDIRS += -L$(AUDIOLIB_ROOT)/third-party/Windows/lib$(WINLIB)
|
||||
DUKE3D_OBJS+= gameres winbits startwin.game
|
||||
DUKE3D_EDITOR_OBJS+= buildres
|
||||
ifeq ($(MIXERTYPE),WIN)
|
||||
LIBS+= -ldsound
|
||||
GAMEOBJS+= $(OBJ)/music.$o $(OBJ)/midi.$o $(OBJ)/mpu401.$o
|
||||
DUKE3D_OBJS+= music midi mpu401
|
||||
endif
|
||||
endif
|
||||
# -lGLU to build with gluBuild2DMipmaps
|
||||
|
||||
ifeq ($(PLATFORM),WII)
|
||||
LIBS += -lvorbisidec
|
||||
endif
|
||||
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
ifeq (1,$(HAVE_GTK2))
|
||||
OURCOMMONFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
|
||||
GAMEOBJS+= $(OBJ)/game_banner.$o $(OBJ)/startgtk.game.$o
|
||||
EDITOROBJS+= $(OBJ)/editor_banner.$o
|
||||
DUKE3D_OBJS+= game_banner startgtk.game
|
||||
DUKE3D_EDITOR_OBJS+= editor_banner
|
||||
endif
|
||||
|
||||
GAMEOBJS+= $(OBJ)/game_icon.$o
|
||||
EDITOROBJS+= $(OBJ)/build_icon.$o
|
||||
DUKE3D_OBJS+= game_icon
|
||||
DUKE3D_EDITOR_OBJS+= build_icon
|
||||
endif
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
ifeq ($(SDL_TARGET),1)
|
||||
LIBS+= platform/Windows/lib$(WINLIB)/SDL_mixer.lib
|
||||
else
|
||||
LIBS+= -l$(SDLNAME)_mixer
|
||||
endif
|
||||
LIBDIRS+= -L$(SDLROOT)/lib
|
||||
else
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
LIBS+= -l$(SDLNAME)_mixer
|
||||
endif
|
||||
endif
|
||||
|
||||
GAMEOBJS+= $(OBJ)/sdlmusic.$o
|
||||
DUKE3D_OBJS+= sdlmusic
|
||||
endif
|
||||
|
||||
|
||||
OURCOMMONFLAGS+= $(BUILDCOMMONFLAGS)
|
||||
DUKE3D_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_OBJS)))
|
||||
DUKE3D_EDITOR_OBJS_EXP:=$(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(DUKE3D_EDITOR_OBJS)))
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(findstring x86_64,$(COMPILERTARGET)),x86_64)
|
||||
PRINTLDFLAGS+= -Wl,--large-address-aware
|
||||
endif
|
||||
endif
|
||||
#ifneq (0,$(KRANDDEBUG))
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
PRINTLDFLAGS+=-Wl,-map -Wl,$@.memmap
|
||||
else
|
||||
PRINTLDFLAGS+=-Wl,-Map=$@.memmap
|
||||
endif
|
||||
#endif
|
||||
ifneq (0,$(PROFILER))
|
||||
PRINTLDFLAGS+=-pg
|
||||
endif
|
||||
ifeq ($(PLATFORM),WII)
|
||||
PRINTLDFLAGS+= -mrvl -meabi -mhard-float -Wl,--gc-sections -Wl,-Map,$(notdir $@).map
|
||||
# -msdata=eabi
|
||||
endif
|
||||
|
||||
COMPILER=$(CC) $(OURCONLYFLAGS)
|
||||
LINKER=$(L_CC)
|
||||
ifneq ($(CPLUSPLUS),0)
|
||||
COMPILER=$(CXX) $(OURCXXFLAGS)
|
||||
LINKER=$(L_CXX)
|
||||
endif
|
||||
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
.SILENT:
|
||||
endif
|
||||
.PHONY: clean all engine $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB)
|
||||
.PHONY: veryclean clean all cleanutils utils dxutils sdlutils printutils printsdlutils printdxutils rev rev_clean
|
||||
|
||||
# TARGETS
|
||||
|
||||
UTILOBJS=$(OBJ)/ivfrate.$o
|
||||
UTILS=ivfrate$(EXESUFFIX)
|
||||
|
||||
all: start $(DO_REV) $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
|
||||
ifneq (,$(EDUKE32_TARGET))
|
||||
@ls -l $(EDUKE32)
|
||||
|
@ -365,19 +349,24 @@ ifneq (,$(EBACKTRACEDLL_TARGET))
|
|||
@ls -l $(EBACKTRACEDLL)
|
||||
endif
|
||||
|
||||
utils: start $(UTILS) finish
|
||||
@ls -l $(UTILS)
|
||||
|
||||
start:
|
||||
$(BUILD_STARTED)
|
||||
|
||||
finish:
|
||||
$(BUILD_FINISHED)
|
||||
|
||||
utils: $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))
|
||||
@ls -l $^
|
||||
|
||||
$(EDUKE32): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENET_TARGET) $(MISCGAMEDEPS)
|
||||
dxutils: $(addsuffix $(EXESUFFIX),$(DXUTILS))
|
||||
@ls -l $^
|
||||
|
||||
sdlutils: $(addsuffix $(EXESUFFIX),$(SDLUTILS))
|
||||
@ls -l $^
|
||||
|
||||
$(EDUKE32): $(DUKE3D_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
|
||||
$(LINK_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(GAMELDFLAGS) $(OURLIBS) $(STATICSTDCPP); then $(LINK_OK); else $(LINK_FAILED); fi
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $(EDUKE32)
|
||||
endif
|
||||
|
@ -387,9 +376,9 @@ ifeq ($(PLATFORM),DARWIN)
|
|||
cp -f "$(EDUKE32)" "EDuke32.app/Contents/MacOS/"
|
||||
endif
|
||||
|
||||
$(MAPSTER32): $(EDITOROBJS) $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(MISCEDITORDEPS)
|
||||
$(MAPSTER32): $(DUKE3D_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(DUKE3D_EDITOR_MISCDEPS)
|
||||
$(LINK_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(EDITORLDFLAGS) $(OURLIBS) $(STATICSTDCPP); then $(LINK_OK); else $(LINK_FAILED); fi
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||
ifneq ($(STRIP),)
|
||||
$(STRIP) $(MAPSTER32)
|
||||
endif
|
||||
|
@ -400,154 +389,172 @@ ifeq ($(PLATFORM),DARWIN)
|
|||
endif
|
||||
|
||||
include Makefile.deps
|
||||
|
||||
.PHONY: enginelib editorlib
|
||||
enginelib editorlib:
|
||||
-mkdir -p $(EOBJ)
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(EROOT)\033[0;35m \033[0m\n"
|
||||
endif
|
||||
$(MAKE) -C $(EROOT)/ "OBJ=../$(EOBJ)" $@ LUNATIC=$(LUNATIC)
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n"
|
||||
endif
|
||||
|
||||
$(EOBJ)/$(ENGINELIB): enginelib
|
||||
$(EOBJ)/$(EDITORLIB): editorlib
|
||||
$(JAUDIOLIBDIR)/$(JAUDIOLIB):
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(JAUDIOLIBDIR)\033[0;35m \033[0m\n"
|
||||
endif
|
||||
$(MAKE) -C $(JAUDIOLIBDIR)
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n"
|
||||
endif
|
||||
|
||||
$(ENETDIR)/$(ENETLIB):
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)/$(ENETDIR)\033[0;35m \033[0m\n"
|
||||
endif
|
||||
$(MAKE) -C $(ENETDIR)
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
printf "\033[K\033[0;35mChanging dir to \033[1;35m$(CURDIR)\033[0;35m \033[0m\n"
|
||||
endif
|
||||
|
||||
include $(ENGINE_ROOT)/Makefile.deps
|
||||
|
||||
# RULES
|
||||
|
||||
$(EBACKTRACEDLL): platform/Windows/src/backtrace.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(CC) $(OURCONLYFLAGS) -O2 -ggdb -shared -Wall -Wextra -static-libgcc -I$(EINC) -o $@ $^ -lbfd -liberty -limagehlp; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(CC) $(CONLYFLAGS) -O2 -ggdb -shared -Wall -Wextra -static-libgcc -I$(ENGINE_INC) -o $@ $^ -lbfd -liberty -limagehlp $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.nasm
|
||||
libcache1d$(DLLSUFFIX): $(ENGINE_SRC)/cache1d.c
|
||||
$(COMPILE_STATUS)
|
||||
$(AS) $(OURASFLAGS) $< -o $@
|
||||
$(RECIPE_IF) $(COMPILER) -Wall -Wextra -DCACHE1D_COMPRESS_ONLY -shared -fPIC $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
#### Frama-C and related
|
||||
|
||||
.PHONY: print-compiler-options
|
||||
print-compiler-options:
|
||||
@echo "$(OURCFLAGS)"
|
||||
|
||||
#frama-c-check:
|
||||
# frama-c -machdep x86_64 -cpp-command "gcc -C -E $(OURCFLAGS)" -no-annot -val source/anim.c
|
||||
|
||||
#### Utilities
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/util/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
ivfrate$(EXESUFFIX): $(OBJ)/ivfrate.$o
|
||||
%$(EXESUFFIX): $(ENGINE_OBJ)/%.$o $(UTIL_OBJS_EXP)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
|
||||
|
||||
%$(EXESUFFIX): $(DUKE3D_OBJ)/%.$o
|
||||
$(ONESTEP_STATUS)
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
|
||||
|
||||
enumdisplay$(EXESUFFIX): $(ENGINE_OBJ)/enumdisplay.$o
|
||||
$(ONESTEP_STATUS)
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) -lgdi32 $(RECIPE_RESULT_ONESTEP)
|
||||
getdxdidf$(EXESUFFIX): $(ENGINE_OBJ)/getdxdidf.$o
|
||||
$(ONESTEP_STATUS)
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) -ldinput $(RECIPE_RESULT_ONESTEP)
|
||||
makesdlkeytrans$(EXESUFFIX): $(ENGINE_OBJ)/makesdlkeytrans.$o
|
||||
$(ONESTEP_STATUS)
|
||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(UTIL_LIBS) $(SDL_INCLUDES) $(RECIPE_RESULT_ONESTEP)
|
||||
arttool$(EXESUFFIX): $(ENGINE_OBJ)/arttool.$o
|
||||
$(ONESTEP_STATUS)
|
||||
$(RECIPE_IF) $(L_CXX) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB) $(UTIL_LIBS) $(RECIPE_RESULT_ONESTEP)
|
||||
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.c
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
#### Lunatic
|
||||
|
||||
# Create object files directly with luajit
|
||||
$(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.lua
|
||||
$(DUKE3D_OBJ)/luaJIT_BC_%.$o: source/lunatic/%.lua
|
||||
$(COMPILE_STATUS)
|
||||
if $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
# Same thing for defs*.ilua which I'm too reluctant to rename now:
|
||||
# NOTE: The target path must match EXACTLY with that of the DEFS_BC_SIZE
|
||||
# determination in Makefile.common, because it is embedded into the bytecode as
|
||||
# debugging information.
|
||||
$(OBJ)/luaJIT_BC_%.$o: $(MAKEFILE_COMMON_DIR)/source/lunatic/%.ilua
|
||||
if $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(DUKE3D_OBJ)/luaJIT_BC_%.$o: source/lunatic/%.ilua
|
||||
$(RECIPE_IF) $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/lunatic/%.c
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/lunatic/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
# TODO: _m32
|
||||
# List of exported symbols, OS X
|
||||
$(SRC)/lunatic/dynsymlist_osx: $(SRC)/lunatic/dynsymlist
|
||||
$(DUKE3D_SRC)/lunatic/dynsymlist_osx: $(DUKE3D_SRC)/lunatic/dynsymlist
|
||||
sed 's/[{};]//g;s/[A-Za-z_][A-Za-z_0-9]*/_&/g' $< > $@
|
||||
|
||||
#$(SRC)/lunatic/aliases_list: $(SRC)/lunatic/dynsymlist_osx
|
||||
#$(DUKE3D_SRC)/lunatic/aliases_list: $(DUKE3D_SRC)/lunatic/dynsymlist_osx
|
||||
# sed 's/_\([A-Za-z_][A-Za-z_0-9]*\)/_\1 \1/g' $< > $@
|
||||
|
||||
# List of exported symbols, Windows
|
||||
$(SRC)/lunatic/eduke32.def: $(SRC)/lunatic/dynsymlist
|
||||
$(DUKE3D_SRC)/lunatic/eduke32.def: $(DUKE3D_SRC)/lunatic/dynsymlist
|
||||
echo EXPORTS > $@
|
||||
sed 's/[{};]//g' $< >> $@
|
||||
|
||||
$(SRC)/lunatic/mapster32.def: $(SRC)/lunatic/dynsymlist_m32
|
||||
$(DUKE3D_SRC)/lunatic/mapster32.def: $(DUKE3D_SRC)/lunatic/dynsymlist_m32
|
||||
echo EXPORTS > $@
|
||||
sed 's/[{};]//g' $< >> $@
|
||||
|
||||
####
|
||||
|
||||
$(OBJ)/%.$o: platform/Apple/%.m
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.nasm
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.m
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.yasm
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(AS) $(ASFLAGS) $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.cc
|
||||
# Comment out the following rule to debug a-c.o
|
||||
$(ENGINE_OBJ)/a-c.$o: $(ENGINE_SRC)/a-c.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(COMPILER) $(subst -O$(OPTLEVEL),-O2,$(subst $(CLANG_DEBUG_FLAGS),,$(COMMONFLAGS) $(COMPILERFLAGS))) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.cpp
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.cxx
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/util/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/jmact/%.c
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.m
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/misc/%.rc
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/%.cpp
|
||||
$(COMPILE_STATUS)
|
||||
if $(RC) -i $< -o $@ --include-dir=$(EINC) --include-dir=$(SRC) -DPOLYMER=$(POLYMER); then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(CXX) $(CXXFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/%.$o: $(RSRC)/%.c
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/game_banner.$o: $(RSRC)/game_banner.c
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/misc/%.rc
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(ENGINE_SRC) $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -Wno-pointer-sign -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(RSRC)/game_banner.c: $(RSRC)/game.bmp
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cpp
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(CXX) $(CXXFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(ENGINE_OBJ)/%.$o: $(ENGINE_SRC)/util/%.cc
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(CXX) $(CXXFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENGINE_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(ENGINE_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(AUDIOLIB_OBJ)/%.o: $(AUDIOLIB_SRC)/%.c | $(AUDIOLIB_OBJ)
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(AUDIOLIB_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(AUDIOLIB_OBJ):
|
||||
mkdir $(AUDIOLIB_OBJ)
|
||||
|
||||
$(ENET_OBJ)/%.o: $(ENET_SRC)/%.c $(ENET_INC)/enet/*.h | $(ENET_OBJ)
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) $(ENET_CFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(ENET_OBJ):
|
||||
mkdir $(ENET_OBJ)
|
||||
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.m
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/%.cpp
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(CXX) $(CXXFLAGS) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/jmact/%.c
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_SRC)/misc/%.rc
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(RC) -i $< -o $@ --include-dir=$(ENGINE_INC) --include-dir=$(DUKE3D_SRC) -DPOLYMER=$(POLYMER) $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(DUKE3D_OBJ)/%.$o: $(DUKE3D_RSRC)/%.c
|
||||
$(COMPILE_STATUS)
|
||||
$(RECIPE_IF) $(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS) -Wno-pointer-sign -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
||||
|
||||
$(DUKE3D_RSRC)/game_banner.c: $(DUKE3D_RSRC)/game.bmp
|
||||
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
|
||||
echo "extern const GdkPixdata startbanner_pixdata;" >> $@
|
||||
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
|
||||
$(RSRC)/editor_banner.c: $(RSRC)/build.bmp
|
||||
$(DUKE3D_RSRC)/editor_banner.c: $(DUKE3D_RSRC)/build.bmp
|
||||
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
|
||||
echo "extern const GdkPixdata startbanner_pixdata;" >> $@
|
||||
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
|
||||
|
@ -555,21 +562,25 @@ $(RSRC)/editor_banner.c: $(RSRC)/build.bmp
|
|||
# PHONIES
|
||||
|
||||
clean: $(UNDO_REV)
|
||||
-rm -f $(OBJ)/* $(EDUKE32) $(EDUKE32).memmap $(MAPSTER32) $(MAPSTER32).memmap core* && $(MAKE) -C $(JAUDIOLIBDIR) clean && $(MAKE) -C $(ENETDIR) clean
|
||||
-rm -f $(EDUKE32) $(MAPSTER32) $(DUKE3D_OBJS_EXP) $(DUKE3D_EDITOR_OBJS_EXP) $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS) core*
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
-rm -rf EDuke32.app Mapster32.app
|
||||
endif
|
||||
echo -n "" > $(OBJ)/keep.me
|
||||
|
||||
cleanutils:
|
||||
-rm -f $(UTILS) $(UTILOBJS) $(addsuffix .memmap, $(UTILS))
|
||||
-rm -f $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTILS))) $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(GAMEUTILS))) $(addsuffix $(EXESUFFIX),$(DXUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(DXUTILS))) $(addsuffix $(EXESUFFIX),$(SDLUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(SDLUTILS))) $(UTIL_OBJS_EXP)
|
||||
|
||||
veryclean: clean cleanutils
|
||||
-rm -f $(EOBJ)/* $(RSRC)/*banner* $(EBACKTRACEDLL)
|
||||
echo -n "" > $(EOBJ)/keep.me
|
||||
-rm -f $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_OBJS_EXP) $(DUKE3D_RSRC)/*banner* $(EBACKTRACEDLL)
|
||||
|
||||
printutils:
|
||||
echo "$(UTILS)"
|
||||
echo "$(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS))"
|
||||
|
||||
printdxutils:
|
||||
echo "$(addsuffix $(EXESUFFIX),$(DXUTILS))"
|
||||
|
||||
printsdlutils:
|
||||
echo "$(addsuffix $(EXESUFFIX),$(SDLUTILS))"
|
||||
|
||||
rev:
|
||||
@echo "s_buildRev = \"r$(VC_REV)$(VC_REV_CUSTOM)\";">source/rev.h
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
|
||||
## common definitions for Makefile, build/Makefile, source/enet/Makefile and
|
||||
## source/jaudiolib/Makefile
|
||||
|
||||
# NOTE: make's 'dir' function keeps a trailing shash, the 'abspath' does not!
|
||||
MAKEFILE_COMMON_DIR:=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
# Use colored output
|
||||
PRETTY_OUTPUT ?= 1
|
||||
|
||||
|
@ -12,7 +6,7 @@ PRETTY_OUTPUT ?= 1
|
|||
CROSS=
|
||||
CC=$(CROSS)gcc
|
||||
CXX=$(CROSS)g++
|
||||
AS=$(CROSS)nasm
|
||||
AS=nasm
|
||||
AR=$(CROSS)ar
|
||||
RC=$(CROSS)windres
|
||||
RANLIB=$(CROSS)ranlib
|
||||
|
@ -30,6 +24,7 @@ ifneq (0,$(CLANG))
|
|||
L_CXX=clang
|
||||
endif
|
||||
|
||||
CCFULLPATH=$(CC)
|
||||
|
||||
ifeq ($(PLATFORM),WII)
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
|
@ -38,28 +33,31 @@ ifeq ($(PLATFORM),WII)
|
|||
|
||||
include $(DEVKITPPC)/wii_rules
|
||||
|
||||
CCFULLPATH=$(DEVKITPPC)/bin/$(CC)
|
||||
|
||||
RANLIB=powerpc-eabi-ranlib
|
||||
STRIP=powerpc-eabi-strip
|
||||
endif
|
||||
|
||||
# GCC version, for conditional selection of flags.
|
||||
ifndef GCC_MAJOR
|
||||
GCC_MAJOR := $(shell $(CC) -dumpversion 2>&1 | cut -d'.' -f1)
|
||||
GCC_MAJOR := $(shell $(CCFULLPATH) -dumpversion 2>&1 | cut -d'.' -f1)
|
||||
endif
|
||||
ifeq ($(GCC_MAJOR),)
|
||||
GCC_MAJOR := 4
|
||||
endif
|
||||
ifndef GCC_MINOR
|
||||
GCC_MINOR := $(shell $(CC) -dumpversion 2>&1 | cut -d'.' -f2)
|
||||
GCC_MINOR := $(shell $(CCFULLPATH) -dumpversion 2>&1 | cut -d'.' -f2)
|
||||
endif
|
||||
ifeq ($(GCC_MINOR),)
|
||||
GCC_MINOR := 7
|
||||
GCC_MINOR := 8
|
||||
endif
|
||||
|
||||
# Detect machine architecture
|
||||
ifndef SYSARCH
|
||||
SYSARCH:=$(strip $(shell uname -m))
|
||||
endif
|
||||
SYSBITS=32
|
||||
|
||||
# Detect the platform if it wasn't explicitly given to us from
|
||||
# the outside world. This allows cross-compilation by overriding
|
||||
|
@ -174,6 +172,7 @@ endif
|
|||
# DISABLEINLINING - 1 = compile inline functions as extern __fastcall instead of static inline
|
||||
# FORCEWARNINGS - 1 = do not disable any compiler warnings within the source
|
||||
# KRANDDEBUG - 1 = include logging of krand() calls for debugging the demo system
|
||||
# MEMMAP - 1 = produce .memmap file when linking
|
||||
# EFENCE - 1 = compile with Electric Fence for malloc() debugging
|
||||
# OPTLEVEL - 0..3 = GCC optimization strategy
|
||||
# LTO - 1 = enable link-time optimization, for GCC 4.5 and up
|
||||
|
@ -182,6 +181,7 @@ CPLUSPLUS?=0
|
|||
RELEASE?=1
|
||||
DEBUGANYWAY?=0
|
||||
KRANDDEBUG?=0
|
||||
MEMMAP?=0
|
||||
DISABLEINLINING?=0
|
||||
FORCEWARNINGS?=0
|
||||
EFENCE?=0
|
||||
|
@ -224,6 +224,38 @@ ifndef LTO
|
|||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
COMMONFLAGS=-O$(OPTLEVEL)
|
||||
COMPILERFLAGS=
|
||||
|
||||
ifneq (,$(ARCH))
|
||||
COMMONFLAGS+= $(ARCH)
|
||||
endif
|
||||
|
||||
COMMONFLAGS+= $(OPTOPT)
|
||||
|
||||
ifneq ($(RELEASE)$(DEBUGANYWAY),10)
|
||||
# debug build or DEBUGANYWAY=1 --> -g flag
|
||||
ifneq (0,$(CLANG))
|
||||
COMMONFLAGS += -g
|
||||
else
|
||||
ifeq ($(PLATFORM), WII)
|
||||
COMMONFLAGS += -g
|
||||
else
|
||||
COMMONFLAGS += -ggdb
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
CONLYFLAGS=-Wimplicit -Wdeclaration-after-statement
|
||||
CXXFLAGS= -fno-exceptions -fno-rtti -Wno-write-strings
|
||||
ASFORMAT=elf$(SYSBITS)
|
||||
ASFLAGS=-s -f $(ASFORMAT) #-g
|
||||
LINKERFLAGS=
|
||||
LIBS=-lm
|
||||
LIBDIRS=
|
||||
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
||||
F_NO_STACK_PROTECTOR := -fno-stack-protector
|
||||
# there are some link-time issues with stack protectors, so make it possible to override
|
||||
|
@ -241,13 +273,11 @@ ifeq ($(PLATFORM),WINDOWS)
|
|||
COMPILERTARGET:=$(strip $(shell $(CC) -dumpmachine))
|
||||
endif
|
||||
|
||||
WINBITS=32
|
||||
ifeq ($(findstring x86_64,$(COMPILERTARGET)),x86_64)
|
||||
SYSARCH:=x86_64
|
||||
WINBITS=64
|
||||
endif
|
||||
|
||||
WINLIB?=/$(WINBITS)
|
||||
WINLIB?=/$(SYSBITS)
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
|
@ -258,7 +288,7 @@ ifeq ($(PLATFORM),DARWIN)
|
|||
DARWIN9 ?= 1
|
||||
endif
|
||||
|
||||
# BASECOMMONFLAGS += -fno-leading-underscore
|
||||
# COMMONFLAGS += -fno-leading-underscore
|
||||
|
||||
ifeq (1,$(DARWIN9))
|
||||
F_JUMP_TABLES :=
|
||||
|
@ -266,17 +296,28 @@ ifeq ($(PLATFORM),DARWIN)
|
|||
endif
|
||||
|
||||
ifeq (1,$(BUILD32_ON_64))
|
||||
BASECOMMONFLAGS += $(F_NO_STACK_PROTECTOR)
|
||||
COMMONFLAGS += $(F_NO_STACK_PROTECTOR)
|
||||
else
|
||||
ifeq ($(findstring ppc,$(ARCH)),ppc)
|
||||
BASECOMMONFLAGS += $(F_NO_STACK_PROTECTOR)
|
||||
COMMONFLAGS += $(F_NO_STACK_PROTECTOR)
|
||||
endif
|
||||
endif
|
||||
ifneq (0,$(OSX_STARTUPWINDOW))
|
||||
BASECOMMONFLAGS+= -DOSX_STARTUPWINDOW
|
||||
COMPILERFLAGS+= -DOSX_STARTUPWINDOW
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifneq (1,$(BUILD32_ON_64))
|
||||
ifeq ($(findstring x86_64,$(ARCH)),x86_64)
|
||||
SYSBITS=64
|
||||
endif
|
||||
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
SYSBITS=64
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifndef OPTOPT
|
||||
ifeq ($(PLATFORM), WII)
|
||||
OPTOPT=
|
||||
|
@ -304,24 +345,17 @@ endif
|
|||
|
||||
|
||||
|
||||
# compiler flags etc.
|
||||
BASECFLAGS=
|
||||
BASECONLYFLAGS=-Wimplicit -Wdeclaration-after-statement
|
||||
BASECXXFLAGS= -fno-exceptions -fno-rtti -Wno-write-strings
|
||||
BASEASFLAGS=-s #-g
|
||||
BASELDFLAGS=
|
||||
|
||||
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 1)))
|
||||
BASECFLAGS+= -Wno-attributes
|
||||
COMPILERFLAGS+= -Wno-attributes
|
||||
endif
|
||||
endif
|
||||
|
||||
# XXX: I (Helixhorned) only know that there's no -Wnarrowing on my OS X 10.6 using GCC 4.2.
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 3)))
|
||||
BASECXXFLAGS+= -Wno-narrowing
|
||||
CXXFLAGS+= -Wno-narrowing
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -336,29 +370,14 @@ ifeq ($(PLATFORM),DINGOO)
|
|||
override USE_LIBVPX = 0
|
||||
endif
|
||||
|
||||
BASELIBS=-lm
|
||||
BASELIBDIRS=
|
||||
ifneq (0,$(USE_LIBVPX))
|
||||
# On Windows, we link statically to libvpx
|
||||
BASELIBS+= -lvpx
|
||||
LIBS+= -lvpx
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(RELEASE)$(DEBUGANYWAY),10)
|
||||
# debug build or DEBUGANYWAY=1 --> -g flag
|
||||
ifneq (0,$(CLANG))
|
||||
debug=-g
|
||||
else ifeq ($(PLATFORM), WII)
|
||||
debug=-g
|
||||
else
|
||||
debug=-ggdb
|
||||
endif
|
||||
endif
|
||||
|
||||
debug+= -O$(OPTLEVEL)
|
||||
|
||||
ifneq ($(ALLOCACHE_AS_MALLOC),0)
|
||||
debug+= -DDEBUG_ALLOCACHE_AS_MALLOC
|
||||
COMPILERFLAGS += -DDEBUG_ALLOCACHE_AS_MALLOC
|
||||
endif
|
||||
|
||||
# See http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
|
||||
|
@ -373,7 +392,7 @@ endif
|
|||
ifneq (0,$(RELEASE))
|
||||
# Debugging disabled
|
||||
ifeq (0,$(CLANG))
|
||||
debug+= -funswitch-loops
|
||||
COMMONFLAGS += -funswitch-loops
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \< 4)))
|
||||
LTO=0
|
||||
endif
|
||||
|
@ -384,49 +403,50 @@ ifneq (0,$(RELEASE))
|
|||
endif
|
||||
endif
|
||||
ifeq (0,$(DEBUGANYWAY))
|
||||
debug+= -fomit-frame-pointer -DNDEBUG
|
||||
COMMONFLAGS += -fomit-frame-pointer
|
||||
COMPILERFLAGS += -DNDEBUG
|
||||
else
|
||||
debug+= -DDEBUGGINGAIDS
|
||||
COMPILERFLAGS += -DDEBUGGINGAIDS
|
||||
ifneq (0,$(CLANG))
|
||||
debug+= $(CLANG_DEBUG_FLAGS)
|
||||
COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
|
||||
endif
|
||||
endif
|
||||
ifneq (0,$(LTO))
|
||||
BASELDFLAGS+= -flto
|
||||
debug+= -DUSING_LTO -flto
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 9)))
|
||||
BASELDFLAGS+= -ffat-lto-objects
|
||||
debug+= -ffat-lto-objects
|
||||
endif
|
||||
endif
|
||||
COMPILERFLAGS += -DUSING_LTO
|
||||
COMMONFLAGS += -flto
|
||||
# We don't need the following since we don't make intermediate .a files any more.
|
||||
# ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
||||
# ifeq (1,$(strip $(shell expr $(GCC_MINOR) \>= 9)))
|
||||
# COMMONFLAGS += -ffat-lto-objects
|
||||
# endif
|
||||
# endif
|
||||
endif
|
||||
else
|
||||
# Debugging enabled
|
||||
ifeq (0,$(DEBUGANYWAY))
|
||||
debug+= -DDEBUGGINGAIDS
|
||||
COMPILERFLAGS += -DDEBUGGINGAIDS
|
||||
else
|
||||
debug+= -DDEBUGGINGAIDS=2
|
||||
COMPILERFLAGS += -DDEBUGGINGAIDS=2
|
||||
endif
|
||||
|
||||
ifneq (0,$(CLANG))
|
||||
debug+= $(CLANG_DEBUG_FLAGS)
|
||||
COMMONFLAGS += $(CLANG_DEBUG_FLAGS)
|
||||
endif
|
||||
ifeq ($(SUBPLATFORM),LINUX)
|
||||
BASELIBS+=-rdynamic
|
||||
LIBS+=-rdynamic
|
||||
endif
|
||||
ifneq (0,$(MUDFLAP))
|
||||
BASELIBS+= -lmudflapth
|
||||
debug+= -fmudflapth
|
||||
LIBS+= -lmudflapth
|
||||
COMMONFLAGS += -fmudflapth
|
||||
endif
|
||||
ifneq (0,$(PROFILER))
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
BASELIBS+= -lprofiler
|
||||
LIBS+= -lprofiler
|
||||
endif
|
||||
debug+= -pg
|
||||
COMMONFLAGS += -pg
|
||||
endif
|
||||
ifneq (0,$(KRANDDEBUG))
|
||||
debug+=-DKRANDDEBUG=1
|
||||
COMPILERFLAGS += -DKRANDDEBUG=1
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -444,49 +464,26 @@ endif
|
|||
CWARNS := -W -Wall -Werror-implicit-function-declaration \
|
||||
-Wpointer-arith \
|
||||
-Wextra \
|
||||
-Wno-char-subscripts \
|
||||
#-Wstrict-prototypes \
|
||||
#-Waggregate-return \
|
||||
#-Wwrite-strings \
|
||||
#-Wcast-qual -Wcast-align \
|
||||
#-Waddress -Wlogical-op
|
||||
|
||||
BASECOMMONFLAGS=$(debug) $(OPTOPT) $(CWARNS) \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2 \
|
||||
$(F_JUMP_TABLES) $(W_NO_UNUSED_RESULT) $(ARCH)
|
||||
ifneq (0,$(CLANG))
|
||||
BASECOMMONFLAGS+= -Wno-unused-value -Wno-parentheses
|
||||
CWARNS+= -Wno-unused-value -Wno-parentheses
|
||||
endif
|
||||
BASECOMMONFLAGS+= -Wno-char-subscripts
|
||||
|
||||
COMMONFLAGS+= -funsigned-char -fno-strict-aliasing $(F_JUMP_TABLES)
|
||||
|
||||
COMPILERFLAGS+= $(CWARNS) $(W_NO_UNUSED_RESULT) -DNO_GCC_BUILTINS -D_FORTIFY_SOURCE=2
|
||||
|
||||
ifeq (0,$(NETCODE))
|
||||
BASECOMMONFLAGS+= -DNETCODE_DISABLE
|
||||
COMPILERFLAGS+= -DNETCODE_DISABLE
|
||||
endif
|
||||
|
||||
|
||||
# Set up target-specific headers and libs that work across all Makefiles
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
BASELIBDIRS+= -L$(abspath $(MAKEFILE_COMMON_DIR)/platform/Windows/lib$(WINLIB))
|
||||
BASECOMMONFLAGS+= -I$(abspath $(MAKEFILE_COMMON_DIR)/platform/Windows/include)
|
||||
BASELDFLAGS+= -static-libgcc
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
# include port and brew
|
||||
BASELIBDIRS+= -L$(abspath $(MAKEFILE_COMMON_DIR)/platform/Apple/lib) \
|
||||
-L/opt/local/lib -L/usr/local/lib
|
||||
BASECOMMONFLAGS+= -I$(abspath $(MAKEFILE_COMMON_DIR)/platform/Apple/include) \
|
||||
-I/opt/local/include -I/sw/include -I/usr/local/include
|
||||
endif
|
||||
ifeq ($(PLATFORM),WII)
|
||||
BASELIBDIRS+= -L$(abspath $(MAKEFILE_COMMON_DIR)/platform/Wii/lib)
|
||||
BASECOMMONFLAGS+= -I$(abspath $(MAKEFILE_COMMON_DIR)/platform/Wii/include)
|
||||
endif
|
||||
ifeq ($(PLATFORM),GCW)
|
||||
BASECOMMONFLAGS += -D__OPENDINGUX__
|
||||
endif
|
||||
ifeq ($(PLATFORM),DINGOO)
|
||||
BASECOMMONFLAGS += -D__OPENDINGUX__
|
||||
endif
|
||||
|
||||
#### Lunatic development
|
||||
# LuaJIT standalone interpreter executable:
|
||||
LUAJIT:=luajit
|
||||
|
@ -494,10 +491,10 @@ LUAJIT:=luajit
|
|||
# the native LuaJIT to emit PE object files.
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
LUAJIT_BCOPTS := -o windows
|
||||
ifeq (32,$(WINBITS))
|
||||
ifeq (32,$(SYSBITS))
|
||||
LUAJIT_BCOPTS += -a x86
|
||||
endif
|
||||
ifeq (64,$(WINBITS))
|
||||
ifeq (64,$(SYSBITS))
|
||||
LUAJIT_BCOPTS += -a x64
|
||||
endif
|
||||
endif
|
||||
|
@ -510,76 +507,517 @@ ifneq ($(LUNATIC),0)
|
|||
ifneq ($(CPLUSPLUS),0)
|
||||
# FIXME: Lunatic C++ doesn't build because otherwise it doesn't find
|
||||
# INT32_MIN and the like.
|
||||
BASECFLAGS+= -D__STDC_LIMIT_MACROS
|
||||
COMPILERFLAGS+= -D__STDC_LIMIT_MACROS
|
||||
endif
|
||||
|
||||
BASECOMMONFLAGS+= -I$(MAKEFILE_COMMON_DIR)/source/lunatic -DLUNATIC
|
||||
COMPILERFLAGS+= -Isource/lunatic -DLUNATIC
|
||||
ifneq ($(USE_LUAJIT_2_1),0)
|
||||
BASECOMMONFLAGS+= -DUSE_LUAJIT_2_1
|
||||
COMPILERFLAGS+= -DUSE_LUAJIT_2_1
|
||||
endif
|
||||
|
||||
# Determine size of defs.ilua bytecode once.
|
||||
ifndef DEFS_BC_SIZE
|
||||
DEFS_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(MAKEFILE_COMMON_DIR)/source/lunatic/defs.ilua -)
|
||||
DEFS_BC_SIZE := $(shell $(LUAJIT) -bg -t h source/lunatic/defs.ilua -)
|
||||
DEFS_BC_SIZE := $(word 3, $(DEFS_BC_SIZE))
|
||||
# Pass it to the sub-makes, too.
|
||||
export DEFS_BC_SIZE
|
||||
endif
|
||||
# Determine size of defs_m32.ilua bytecode once.
|
||||
ifndef DEFS_M32_BC_SIZE
|
||||
DEFS_M32_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(MAKEFILE_COMMON_DIR)/source/lunatic/defs_m32.ilua -)
|
||||
DEFS_M32_BC_SIZE := $(shell $(LUAJIT) -bg -t h source/lunatic/defs_m32.ilua -)
|
||||
DEFS_M32_BC_SIZE := $(word 3, $(DEFS_M32_BC_SIZE))
|
||||
export DEFS_M32_BC_SIZE
|
||||
endif
|
||||
BASECOMMONFLAGS+= -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE) -DLUNATIC_DEFS_M32_BC_SIZE=$(DEFS_M32_BC_SIZE)
|
||||
COMPILERFLAGS+= -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE) -DLUNATIC_DEFS_M32_BC_SIZE=$(DEFS_M32_BC_SIZE)
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
BASELIBS+= -lluajit
|
||||
LIBS+= -lluajit
|
||||
else
|
||||
BASELIBS+= -lluajit-5.1
|
||||
LIBS+= -lluajit-5.1
|
||||
endif
|
||||
endif
|
||||
|
||||
####
|
||||
|
||||
ifneq (0,$(DISABLEINLINING))
|
||||
BASECOMMONFLAGS+= -DDISABLE_INLINING
|
||||
COMPILERFLAGS+= -DDISABLE_INLINING
|
||||
endif
|
||||
ifneq (0,$(FORCEWARNINGS))
|
||||
BASECOMMONFLAGS+= -DFORCE_WARNINGS
|
||||
COMPILERFLAGS+= -DFORCE_WARNINGS
|
||||
endif
|
||||
|
||||
BASELDFLAGS+= $(OPTOPT)
|
||||
LINKERFLAGS+= $(OPTOPT)
|
||||
|
||||
# This should come from the environment:
|
||||
ifdef EDUKE32_MY_DEVELOPER_ID
|
||||
BASECOMMONFLAGS+= -DMY_DEVELOPER_ID=$(EDUKE32_MY_DEVELOPER_ID)
|
||||
COMPILERFLAGS+= -DMY_DEVELOPER_ID=$(EDUKE32_MY_DEVELOPER_ID)
|
||||
endif
|
||||
|
||||
ifneq (0,$(USE_LIBPNG))
|
||||
BASECOMMONFLAGS+= -DUSE_LIBPNG
|
||||
COMPILERFLAGS+= -DUSE_LIBPNG
|
||||
endif
|
||||
ifneq (0,$(USE_LIBVPX))
|
||||
BASECOMMONFLAGS+= -DUSE_LIBVPX
|
||||
COMPILERFLAGS+= -DUSE_LIBVPX
|
||||
endif
|
||||
|
||||
ifneq (0,$(EFENCE))
|
||||
BASELIBS+= -lefence
|
||||
BASECOMMONFLAGS+= -DEFENCE
|
||||
LIBS+= -lefence
|
||||
COMPILERFLAGS+= -DEFENCE
|
||||
endif
|
||||
ifneq (0,$(DMALLOC))
|
||||
BASELIBS+= -ldmalloc
|
||||
BASECOMMONFLAGS+= -DDMALLOC
|
||||
LIBS+= -ldmalloc
|
||||
COMPILERFLAGS+= -DDMALLOC
|
||||
endif
|
||||
|
||||
# Misc. stuff that is constant between Makefiles
|
||||
EROOT:=build
|
||||
|
||||
# will be potentially overridden in build/Makefile.shared
|
||||
# may be overridden
|
||||
EXESUFFIX=
|
||||
DLLSUFFIX=.so
|
||||
|
||||
|
||||
SDL_TARGET ?= 2
|
||||
SDL_FRAMEWORK ?= 1
|
||||
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
||||
L_SSP := -lssp
|
||||
endif
|
||||
|
||||
# NOTE: If your setup doesn't have libstdc++, you can try using libsupc++.
|
||||
# Search for STDCPPLIB below and change it to -lsupc++.
|
||||
|
||||
SDL_INCLUDES=-I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
SDL_LIB=-l$(SDLNAME)
|
||||
SDL_MIXER_LIB=-l$(SDLNAME)_mixer
|
||||
|
||||
ifeq ($(SUBPLATFORM),LINUX)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
COMPILERFLAGS+= -DHAVE_INTTYPES
|
||||
GTKCOMPAT32=0
|
||||
SDL_FRAMEWORK=0
|
||||
|
||||
# On Linux, we don't need to specify libstdc++ manually, the linker will
|
||||
# presumably take care for us.
|
||||
STDCPPLIB:=
|
||||
|
||||
ifeq ($(PLATFORM),GCW)
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
endif
|
||||
ifeq ($(PLATFORM),DINGOO)
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
endif
|
||||
|
||||
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
ifeq (1,$(BUILD32_ON_64))
|
||||
# On my 64bit Gentoo these are the 32bit emulation libs
|
||||
LIBS+= -m32
|
||||
LIBDIRS+= -L/emul/linux/x86/usr/lib
|
||||
COMMONFLAGS+= -m32
|
||||
# Override WITHOUT_GTK=0
|
||||
GTKCOMPAT32=1
|
||||
else
|
||||
override NOASM=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
COMPILERFLAGS+= -DUNDERSCORES
|
||||
ASFORMAT=macho$(SYSBITS)
|
||||
ASFLAGS+= -DUNDERSCORES
|
||||
|
||||
# include port and brew
|
||||
LIBDIRS+= -Lplatform/Apple/lib -L/opt/local/lib -L/usr/local/lib
|
||||
COMPILERFLAGS+= -Iplatform/Apple/include -I/opt/local/include -I/sw/include -I/usr/local/include
|
||||
|
||||
RENDERTYPE = SDL
|
||||
MIXERTYPE = SDL
|
||||
STDCPPLIB:=-lstdc++
|
||||
COMPILERFLAGS += -DHAVE_INTTYPES
|
||||
DLLSUFFIX=.dylib # ???
|
||||
GTKCOMPAT32 = 0
|
||||
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
SDL_INCLUDES=-I$(APPLE_FRAMEWORKS)/SDL.framework/Headers -I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
||||
SDL_LIB=-l$(SDLNAME)main -Wl,-framework,SDL -Wl,-rpath -Wl,"@loader_path/../Frameworks"
|
||||
SDL_MIXER_LIB=-Wl,-framework,SDL_mixer
|
||||
endif
|
||||
|
||||
ifeq (1,$(DARWIN9))
|
||||
COMPILERFLAGS += -DDARWIN9
|
||||
endif
|
||||
|
||||
ifeq (1,$(BUILD32_ON_64))
|
||||
ARCH=-arch i386
|
||||
else
|
||||
# ASM won't work on PowerPC or x86_64
|
||||
override NOASM=1
|
||||
endif
|
||||
|
||||
ifneq ($(findstring x86_64,$(ARCH)),x86_64)
|
||||
ifeq (,$(ARCH))
|
||||
ifneq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
LINKERFLAGS += -read_only_relocs suppress
|
||||
endif
|
||||
else
|
||||
LINKERFLAGS += -read_only_relocs suppress
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
COMPILERFLAGS+= -DUNDERSCORES -DHAVE_INTTYPES -Iplatform/Windows/include
|
||||
LINKERFLAGS+= -static-libgcc
|
||||
ASFORMAT=win$(SYSBITS)
|
||||
ASFLAGS+= -DUNDERSCORES
|
||||
|
||||
# Windows types can be SDL or WIN
|
||||
RENDERTYPE?=SDL
|
||||
MIXERTYPE?=WIN
|
||||
ifneq ($(RENDERTYPE),SDL)
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
MIXERTYPE:=WIN
|
||||
endif
|
||||
endif
|
||||
|
||||
SDL_INCLUDES=
|
||||
ifeq ($(SDL_TARGET),1)
|
||||
SDL_MIXER_LIB=platform/Windows/lib$(WINLIB)/SDL_mixer.lib
|
||||
endif
|
||||
|
||||
WITHOUT_GTK?=1
|
||||
SDLCONFIG=
|
||||
SDL_FRAMEWORK=1
|
||||
EXESUFFIX=.exe
|
||||
DLLSUFFIX=.dll
|
||||
LIBDIRS+= -Lplatform/Windows/lib$(WINLIB)
|
||||
LIBS+= -Wl,--enable-auto-import -lmingwex -lgdi32 -lcomctl32 -lwinmm $(L_SSP) -lwsock32 -lws2_32 -lshlwapi
|
||||
ifeq (0,$(CLANG))
|
||||
LIBS+= -mwindows
|
||||
endif
|
||||
#-lshfolder
|
||||
STDCPPLIB:=-lstdc++
|
||||
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
ifneq (1,$(BUILD32_ON_64))
|
||||
override NOASM=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),BSD)
|
||||
COMPILERFLAGS+= -I/usr/X11R6/include
|
||||
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
COMPILERFLAGS+= -DHAVE_INTTYPES
|
||||
ifneq ($(findstring i386,$(SYSARCH)),i386)
|
||||
override NOASM=1
|
||||
endif
|
||||
STDCPPLIB:=-lstdc++
|
||||
endif
|
||||
ifeq ($(PLATFORM),BEOS)
|
||||
override NOASM=1
|
||||
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
STDCPPLIB:=-lstdc++
|
||||
endif
|
||||
ifeq ($(PLATFORM),SKYOS)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
EXESUFFIX=.app
|
||||
override NOASM=1
|
||||
COMPILERFLAGS+= -DUNDERSCORES -I/boot/programs/sdk/include/sdl
|
||||
SDLCONFIG=
|
||||
LIBS+= -lSDL -lnet
|
||||
endif
|
||||
ifeq ($(PLATFORM),WII)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
SDL_INCLUDES=
|
||||
EXESUFFIX=.elf
|
||||
override USE_OPENGL=0
|
||||
override POLYMER=0
|
||||
override NOASM=1
|
||||
override WITHOUT_GTK=1
|
||||
# -msdata=eabi
|
||||
COMMONFLAGS+= -g -mtune=750 -meabi -mhard-float
|
||||
COMPILERFLAGS+= -DGEKKO -DHAVE_INTTYPES -D__POWERPC__ -I$(LIBOGC_INC) -I$(PORTLIBS)/include -Iplatform/Wii/include
|
||||
SDLCONFIG=
|
||||
SDL_TARGET=1
|
||||
SDL_FRAMEWORK=1
|
||||
LIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -Lplatform/Wii/lib
|
||||
endif
|
||||
ifeq ($(PLATFORM),QNX)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
STDCPPLIB:=-lstdc++
|
||||
LIBS+= -lsocket
|
||||
endif
|
||||
ifeq ($(PLATFORM),SUNOS)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
STDCPPLIB:=-lstdc++
|
||||
LIBS+= -lsocket -lnsl
|
||||
endif
|
||||
ifeq ($(PLATFORM),SYLLABLE)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
endif
|
||||
ifeq ($(PLATFORM),GCW)
|
||||
COMPILERFLAGS += -D__OPENDINGUX__
|
||||
endif
|
||||
ifeq ($(PLATFORM),DINGOO)
|
||||
COMPILERFLAGS += -D__OPENDINGUX__
|
||||
endif
|
||||
|
||||
ifneq ($(EXESUFFIX_OVERRIDE),)
|
||||
EXESUFFIX=$(EXESUFFIX_OVERRIDE)
|
||||
endif
|
||||
|
||||
ifneq (0,$(CLANG))
|
||||
ifneq (,$(STDCPPLIB))
|
||||
STDCPPLIB:=-Xlinker $(STDCPPLIB)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SDL_TARGET),2)
|
||||
SDLCONFIG ?= sdl2-config
|
||||
SDLNAME ?= SDL2
|
||||
endif
|
||||
ifeq ($(SDL_TARGET),1)
|
||||
SDLCONFIG ?= sdl-config
|
||||
SDLNAME ?= SDL
|
||||
endif
|
||||
|
||||
ifneq ($(SDLCONFIG),)
|
||||
SDLVERSION:=$(strip $(shell $(SDLCONFIG) --version))
|
||||
ifneq ($(SDLVERSION),)
|
||||
SDLROOT:=$(strip $(shell $(SDLCONFIG) --prefix))
|
||||
endif
|
||||
endif
|
||||
|
||||
SDL_STATIC?=1
|
||||
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
COMPILERFLAGS += -DSDL_TARGET=$(SDL_TARGET)
|
||||
|
||||
ifeq ($(SDL_FRAMEWORK),1)
|
||||
COMPILERFLAGS += -DSDL_FRAMEWORK
|
||||
endif
|
||||
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(SDL_FRAMEWORK),1)
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
LIBS += -Wl,-framework,SDL
|
||||
COMPILERFLAGS+= -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
||||
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
||||
endif
|
||||
else
|
||||
ifneq ($(SDLCONFIG),)
|
||||
SDLCONFIG_COMMONFLAGS:=$(subst -Dmain=SDL_main,,$(strip $(shell $(SDLCONFIG) --cflags)))
|
||||
SDLCONFIG_LIBS:=$(strip $(shell $(SDLCONFIG) --libs))
|
||||
|
||||
LIBS+= $(SDLCONFIG_LIBS)
|
||||
COMMONFLAGS+= $(SDLCONFIG_COMMONFLAGS)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
COMPILERFLAGS += -D_GNU_SOURCE=1
|
||||
ifneq ($(SDL_STATIC),0)
|
||||
ifneq ($(SDL_TARGET),1) # Since SDL2 is under the zlib license, link statically if possible.
|
||||
LIBS+= -static
|
||||
endif
|
||||
endif
|
||||
LIBS+= -l$(SDLNAME)main -l$(SDLNAME) -lmingw32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lversion
|
||||
endif
|
||||
|
||||
ifeq (1,$(WITHOUT_GTK))
|
||||
HAVE_GTK2=0
|
||||
else
|
||||
ifneq (No,$(shell pkg-config --exists gtk+-2.0 || echo No))
|
||||
HAVE_GTK2=1
|
||||
# On my 64bit Gentoo box I have Cairo enabled which means the libs list includes
|
||||
# -lpangocairo-1.0 and -lcairo, however the 32bit compatibility libraries don't
|
||||
# include cairo, so we need to filter out those -l switches in order to link
|
||||
ifneq ($(LINKED_GTK),0)
|
||||
ifeq ($(GTKCOMPAT32),1)
|
||||
LIBS+= $(shell pkg-config --libs gtk+-2.0 | sed 's/\s-l\(pango\)\{0,1\}cairo\S*\s/ /g')
|
||||
else
|
||||
LIBS+= $(shell pkg-config --libs gtk+-2.0)
|
||||
endif
|
||||
endif
|
||||
COMPILERFLAGS += -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
|
||||
else
|
||||
HAVE_GTK2=0
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPILERFLAGS += $(SDL_INCLUDES)
|
||||
ifneq ($(MIXERTYPE),WIN)
|
||||
LIBS += $(SDL_MIXER_LIB)
|
||||
endif
|
||||
LIBS += $(SDL_LIB)
|
||||
endif
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
LIBS+= -ldxguid
|
||||
endif
|
||||
|
||||
# SDL depends on these
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
SDL_LIB:=-l$(SDLNAME)main $(SDL_LIB)
|
||||
ifeq ($(MIXERTYPE),WIN)
|
||||
LIBS+= -ldxguid_sdl
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),WII)
|
||||
LIBS+= -laesnd_tueidj -lpng -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
|
||||
endif
|
||||
|
||||
COMPILERFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 -DMIXERTYPE$(MIXERTYPE)=1 $(W_STRICT_OVERFLOW)
|
||||
|
||||
ifneq (0,$(USE_OPENGL))
|
||||
COMPILERFLAGS+= -DUSE_OPENGL
|
||||
endif
|
||||
ifneq (0,$(NOASM))
|
||||
COMPILERFLAGS+= -DNOASM
|
||||
endif
|
||||
ifneq (0,$(USE_ASM64))
|
||||
COMPILERFLAGS+= -DUSE_ASM64
|
||||
endif
|
||||
ifneq (0,$(LINKED_GTK))
|
||||
COMPILERFLAGS+= -DLINKED_GTK
|
||||
endif
|
||||
|
||||
ifneq (0,$(POLYMER))
|
||||
ifneq (0,$(USE_OPENGL))
|
||||
COMPILERFLAGS+= -DPOLYMER
|
||||
endif
|
||||
endif
|
||||
|
||||
STATICSTDCPP?=
|
||||
ifeq (1,$(STATICSTDCPP))
|
||||
STATICSTDCPP= -static
|
||||
endif
|
||||
ifeq (0,$(STATICSTDCPP))
|
||||
STATICSTDCPP= -shared
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(PLATFORM),WII)
|
||||
LIBS+= -ldl
|
||||
endif
|
||||
LIBS+= -pthread
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(USE_LIBPNG),0)
|
||||
LIBS+= -lpng_mini -lz_mini
|
||||
endif
|
||||
else
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(USE_LIBPNG),0)
|
||||
LIBS+= -lpng # -lz
|
||||
endif
|
||||
else
|
||||
ifneq ($(USE_LIBPNG),0)
|
||||
LIBS+= -lpng -lz
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(findstring x86_64,$(COMPILERTARGET)),x86_64)
|
||||
LINKERFLAGS+= -Wl,--large-address-aware
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (0,$(MEMMAP))
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
LINKERFLAGS+=-Wl,-map -Wl,$@.memmap
|
||||
else
|
||||
LINKERFLAGS+=-Wl,-Map=$@.memmap
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (0,$(PROFILER))
|
||||
LINKERFLAGS+=-pg
|
||||
endif
|
||||
ifeq ($(PLATFORM),WII)
|
||||
LINKERFLAGS+= -mrvl -meabi -mhard-float -Wl,--gc-sections
|
||||
# -msdata=eabi
|
||||
endif
|
||||
|
||||
COMPILER=$(CC) $(CONLYFLAGS)
|
||||
LINKER=$(L_CC)
|
||||
ifneq ($(CPLUSPLUS),0)
|
||||
COMPILER=$(CXX) $(CXXFLAGS)
|
||||
LINKER=$(L_CXX)
|
||||
endif
|
||||
|
||||
ifneq (,$(CUSTOMOPT))
|
||||
BASECOMMONFLAGS+= $(CUSTOMOPT)
|
||||
BASELDFLAGS+= $(CUSTOMOPT)
|
||||
COMMONFLAGS+= $(CUSTOMOPT)
|
||||
endif
|
||||
ifneq (,$(CFLAGS))
|
||||
COMMONFLAGS+= $(CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
RECIPE_IF = if
|
||||
BUILD_SETTINGS_COMPILER = \033[1;36mcompiler: \033[0;36m\"$(COMPILER) $(COMMONFLAGS) $(COMPILERFLAGS)\"
|
||||
BUILD_SETTINGS_ASSEMBLER = \033[1;36massembler: \033[0;36m\"$(AS) $(ASFLAGS)\"
|
||||
BUILD_SETTINGS_LINKER = \033[1;36mlinker: \033[0;36m\"$(LINKER) $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB)\"
|
||||
ifeq (0,$(NOASM))
|
||||
BUILD_SETTINGS = printf "$(BUILD_SETTINGS_COMPILER)\n$(BUILD_SETTINGS_ASSEMBLER)\n$(BUILD_SETTINGS_LINKER)\033[0m\n"
|
||||
else
|
||||
BUILD_SETTINGS = printf "$(BUILD_SETTINGS_COMPILER)\n$(BUILD_SETTINGS_LINKER)\033[0m\n"
|
||||
endif
|
||||
BUILD_STARTED = printf "\033[K\033[1;36mBuild started using:\033[0m\n"; $(BUILD_SETTINGS)
|
||||
BUILD_ECHOFLAGS = printf "\033[K\033[1;36mEnded compilation in this directory using:\n$(BUILD_SETTINGS_COMPILER)\033[0m\n"
|
||||
BUILD_FINISHED = printf "\033[K\033[1;36mBuild successful:\033[0m\n"
|
||||
COMPILE_STATUS = printf "\033[K\033[0mBuilding object \033[1m$@\033[0m...\033[0m\r"
|
||||
COMPILE_OK = printf "\033[K\033[0;32mBuilt object \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
COMPILE_FAILED = printf "\033[K\033[0;31mFailed building \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
|
||||
RECIPE_RESULT_COMPILE = ; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
ONESTEP_STATUS = printf "\033[K\033[0mBuilding executable \033[1m$@\033[0m...\033[0m\r"
|
||||
ONESTEP_OK = printf "\033[K\033[0;32mBuilt executable \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
ONESTEP_FAILED = printf "\033[K\033[0;31mFailed building executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
|
||||
RECIPE_RESULT_ONESTEP = ; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
ARCHIVE_STATUS = printf "\033[K\033[0mCreating library archive \033[1m$@\033[0m...\033[0m\r"
|
||||
ARCHIVE_OK = printf "\033[K\033[0;32mCreated library archive \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
ARCHIVE_FAILED = printf "\033[K\033[0;31mFailed creating library archive \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
|
||||
RECIPE_RESULT_ARCHIVE = ; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
|
||||
LINK_STATUS = printf "\033[K\033[0;0mLinking executable \033[1m$@\033[0;0m...\033[0m\r"
|
||||
LINK_OK = printf "\033[K\033[0;32mLinked executable \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
LINK_FAILED = printf "\033[K\033[0;31mFailed linking executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
|
||||
RECIPE_RESULT_LINK = ; then $(LINK_OK); else $(LINK_FAILED); fi
|
||||
else
|
||||
RECIPE_IF =
|
||||
BUILD_STARTED =
|
||||
BUILD_ECHOFLAGS =
|
||||
BUILD_FINISHED =
|
||||
COMPILE_STATUS =
|
||||
COMPILE_OK = true
|
||||
COMPILE_FAILED = false; exit 1
|
||||
RECIPE_RESULT_COMPILE =
|
||||
ONESTEP_STATUS =
|
||||
ONESTEP_OK = true
|
||||
ONESTEP_FAILED = false; exit 1
|
||||
RECIPE_RESULT_ONESTEP =
|
||||
ARCHIVE_STATUS =
|
||||
ARCHIVE_OK = true
|
||||
ARCHIVE_FAILED = false; exit 1
|
||||
RECIPE_RESULT_ARCHIVE =
|
||||
LINK_STATUS =
|
||||
LINK_OK = true
|
||||
LINK_FAILED = false; exit 1
|
||||
RECIPE_RESULT_LINK =
|
||||
endif
|
||||
|
|
|
@ -1,132 +1,132 @@
|
|||
duke3d_h=\
|
||||
$(EINC)/compat.h \
|
||||
$(EINC)/pragmas.h \
|
||||
$(EINC)/build.h \
|
||||
$(EINC)/baselayer.h \
|
||||
$(EINC)/polymer.h \
|
||||
$(EINC)/polymost.h \
|
||||
$(EINC)/texcache.h \
|
||||
$(EINC)/cache1d.h \
|
||||
$(SRC)/jmact/file_lib.h \
|
||||
$(SRC)/jmact/keyboard.h \
|
||||
$(SRC)/jmact/mouse.h \
|
||||
$(SRC)/jmact/joystick.h \
|
||||
$(SRC)/jmact/control.h \
|
||||
$(SRC)/jmact/mathutil.h \
|
||||
$(SRC)/macros.h \
|
||||
$(INC)/gamedefs.h \
|
||||
$(INC)/function.h \
|
||||
$(INC)/config.h \
|
||||
$(INC)/sounds.h \
|
||||
$(INC)/sounds_common.h \
|
||||
$(INC)/soundsdyn.h \
|
||||
$(INC)/rts.h \
|
||||
$(INC)/_rts.h \
|
||||
$(INC)/soundefs.h \
|
||||
$(JAUDIOLIBDIR)/include/fx_man.h \
|
||||
$(JAUDIOLIBDIR)/include/music.h \
|
||||
$(INC)/namesdyn.h \
|
||||
$(INC)/duke3d.h \
|
||||
$(INC)/player.h \
|
||||
$(INC)/sector.h \
|
||||
$(INC)/game.h \
|
||||
$(INC)/actors.h
|
||||
$(ENGINE_INC)/compat.h \
|
||||
$(ENGINE_INC)/pragmas.h \
|
||||
$(ENGINE_INC)/build.h \
|
||||
$(ENGINE_INC)/baselayer.h \
|
||||
$(ENGINE_INC)/polymer.h \
|
||||
$(ENGINE_INC)/polymost.h \
|
||||
$(ENGINE_INC)/texcache.h \
|
||||
$(ENGINE_INC)/cache1d.h \
|
||||
$(DUKE3D_SRC)/jmact/file_lib.h \
|
||||
$(DUKE3D_SRC)/jmact/keyboard.h \
|
||||
$(DUKE3D_SRC)/jmact/mouse.h \
|
||||
$(DUKE3D_SRC)/jmact/joystick.h \
|
||||
$(DUKE3D_SRC)/jmact/control.h \
|
||||
$(DUKE3D_SRC)/jmact/mathutil.h \
|
||||
$(DUKE3D_SRC)/macros.h \
|
||||
$(DUKE3D_INC)/gamedefs.h \
|
||||
$(DUKE3D_INC)/function.h \
|
||||
$(DUKE3D_INC)/config.h \
|
||||
$(DUKE3D_INC)/sounds.h \
|
||||
$(DUKE3D_INC)/sounds_common.h \
|
||||
$(DUKE3D_INC)/soundsdyn.h \
|
||||
$(DUKE3D_INC)/rts.h \
|
||||
$(DUKE3D_INC)/_rts.h \
|
||||
$(DUKE3D_INC)/soundefs.h \
|
||||
$(AUDIOLIB_ROOT)/include/fx_man.h \
|
||||
$(AUDIOLIB_ROOT)/include/music.h \
|
||||
$(DUKE3D_INC)/namesdyn.h \
|
||||
$(DUKE3D_INC)/duke3d.h \
|
||||
$(DUKE3D_INC)/player.h \
|
||||
$(DUKE3D_INC)/sector.h \
|
||||
$(DUKE3D_INC)/game.h \
|
||||
$(DUKE3D_INC)/actors.h
|
||||
|
||||
gamedef_h=$(SRC)/gamedef.h $(SRC)/gameexec.h $(SRC)/gamevars.h
|
||||
gamedef_h=$(DUKE3D_SRC)/gamedef.h $(DUKE3D_SRC)/gameexec.h $(DUKE3D_SRC)/gamevars.h
|
||||
|
||||
game_defs_dep=$(SRC)/lunatic/defs.ilua
|
||||
game_defs_dep=$(DUKE3D_SRC)/lunatic/defs.ilua
|
||||
|
||||
$(OBJ)/game.$o: $(SRC)/game.c $(game_defs_dep) $(SRC)/jmact/scriplib.h $(duke3d_h) $(SRC)/input.h $(INC)/osdfuncs.h $(INC)/osdcmds.h $(INC)/grpscan.h $(INC)/demo.h $(EINC)/hightile.h
|
||||
$(OBJ)/actors.$o: $(SRC)/actors.c $(duke3d_h)
|
||||
$(OBJ)/anim.$o: $(SRC)/anim.c $(duke3d_h) $(SRC)/input.h $(SRC)/jmact/animlib.h $(SRC)/animvpx.h
|
||||
$(OBJ)/demo.$o: $(SRC)/demo.c $(duke3d_h) $(SRC)/input.h
|
||||
$(OBJ)/gamedef.$o: $(SRC)/gamedef.c $(duke3d_h) $(gamedef_h) $(SRC)/savegame.h
|
||||
$(OBJ)/gameexec.$o: $(SRC)/gameexec.c $(SRC)/gamestructures.c $(duke3d_h) $(gamedef_h)
|
||||
$(OBJ)/gamestructures.$o: $(SRC)/gamestructures.c $(duke3d_h) $(gamedef_h)
|
||||
$(OBJ)/gamevars.$o: $(SRC)/gamevars.c $(SRC)/gamestructures.c $(duke3d_h) $(gamedef_h) $(SRC)/savegame.h
|
||||
$(OBJ)/global.$o: $(SRC)/*.c $(SRC)/global.c $(duke3d_h)
|
||||
$(OBJ)/input.$o: $(SRC)/input.c $(duke3d_h) $(SRC)/input.h
|
||||
$(OBJ)/mdump.$o: $(SRC)/mdump.cpp $(SRC)/mdump.h
|
||||
$(OBJ)/menus.$o: $(SRC)/menus.c $(duke3d_h) $(SRC)/input.h $(SRC)/jmact/mouse.h
|
||||
$(OBJ)/namesdyn.$o: $(SRC)/namesdyn.c $(duke3d_h)
|
||||
$(OBJ)/net.$o: $(SRC)/net.c $(duke3d_h)
|
||||
$(OBJ)/player.$o: $(SRC)/player.c $(duke3d_h)
|
||||
$(OBJ)/premap.$o: $(SRC)/premap.c $(duke3d_h) $(EINC)/osd.h
|
||||
$(OBJ)/savegame.$o: $(SRC)/savegame.c $(duke3d_h) $(SRC)/savegame.h
|
||||
$(OBJ)/sector.$o: $(SRC)/sector.c $(duke3d_h) $(SRC)/input.h
|
||||
$(OBJ)/sounds.$o: $(SRC)/sounds.c $(duke3d_h)
|
||||
$(OBJ)/soundsdyn.$o: $(SRC)/soundsdyn.c $(duke3d_h)
|
||||
$(OBJ)/rts.$o: $(SRC)/rts.c $(duke3d_h)
|
||||
$(OBJ)/config.$o: $(SRC)/config.c $(duke3d_h) $(SRC)/jmact/scriplib.h $(INC)/_functio.h
|
||||
$(OBJ)/winbits.$o: $(SRC)/winbits.c
|
||||
$(OBJ)/osdfuncs.$o: $(SRC)/names.h $(EINC)/build.h $(EINC)/osd.h
|
||||
$(OBJ)/osdcmds.$o: $(SRC)/osdcmds.c $(INC)/osdcmds.h $(EINC)/osd.h $(duke3d_h)
|
||||
$(OBJ)/animvpx.$o: $(SRC)/animvpx.c $(SRC)/animvpx.h $(duke3d_h) $(EINC)/glbuild.h
|
||||
$(OBJ)/rev.$o: $(SRC)/rev.h
|
||||
$(DUKE3D_OBJ)/game.$o: $(DUKE3D_SRC)/game.c $(game_defs_dep) $(DUKE3D_SRC)/jmact/scriplib.h $(duke3d_h) $(DUKE3D_SRC)/input.h $(DUKE3D_INC)/osdfuncs.h $(DUKE3D_INC)/osdcmds.h $(DUKE3D_INC)/grpscan.h $(DUKE3D_INC)/demo.h $(ENGINE_INC)/hightile.h
|
||||
$(DUKE3D_OBJ)/actors.$o: $(DUKE3D_SRC)/actors.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/anim.$o: $(DUKE3D_SRC)/anim.c $(duke3d_h) $(DUKE3D_SRC)/input.h $(DUKE3D_SRC)/jmact/animlib.h $(DUKE3D_SRC)/animvpx.h
|
||||
$(DUKE3D_OBJ)/demo.$o: $(DUKE3D_SRC)/demo.c $(duke3d_h) $(DUKE3D_SRC)/input.h
|
||||
$(DUKE3D_OBJ)/gamedef.$o: $(DUKE3D_SRC)/gamedef.c $(duke3d_h) $(gamedef_h) $(DUKE3D_SRC)/savegame.h
|
||||
$(DUKE3D_OBJ)/gameexec.$o: $(DUKE3D_SRC)/gameexec.c $(DUKE3D_SRC)/gamestructures.c $(duke3d_h) $(gamedef_h)
|
||||
$(DUKE3D_OBJ)/gamestructures.$o: $(DUKE3D_SRC)/gamestructures.c $(duke3d_h) $(gamedef_h)
|
||||
$(DUKE3D_OBJ)/gamevars.$o: $(DUKE3D_SRC)/gamevars.c $(DUKE3D_SRC)/gamestructures.c $(duke3d_h) $(gamedef_h) $(DUKE3D_SRC)/savegame.h
|
||||
$(DUKE3D_OBJ)/global.$o: $(DUKE3D_SRC)/*.c $(DUKE3D_SRC)/global.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/input.$o: $(DUKE3D_SRC)/input.c $(duke3d_h) $(DUKE3D_SRC)/input.h
|
||||
$(DUKE3D_OBJ)/mdump.$o: $(DUKE3D_SRC)/mdump.cpp $(DUKE3D_SRC)/mdump.h
|
||||
$(DUKE3D_OBJ)/menus.$o: $(DUKE3D_SRC)/menus.c $(duke3d_h) $(DUKE3D_SRC)/input.h $(DUKE3D_SRC)/jmact/mouse.h
|
||||
$(DUKE3D_OBJ)/namesdyn.$o: $(DUKE3D_SRC)/namesdyn.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/net.$o: $(DUKE3D_SRC)/net.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/player.$o: $(DUKE3D_SRC)/player.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/premap.$o: $(DUKE3D_SRC)/premap.c $(duke3d_h) $(ENGINE_INC)/osd.h
|
||||
$(DUKE3D_OBJ)/savegame.$o: $(DUKE3D_SRC)/savegame.c $(duke3d_h) $(DUKE3D_SRC)/savegame.h
|
||||
$(DUKE3D_OBJ)/sector.$o: $(DUKE3D_SRC)/sector.c $(duke3d_h) $(DUKE3D_SRC)/input.h
|
||||
$(DUKE3D_OBJ)/sounds.$o: $(DUKE3D_SRC)/sounds.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/soundsdyn.$o: $(DUKE3D_SRC)/soundsdyn.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/rts.$o: $(DUKE3D_SRC)/rts.c $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/config.$o: $(DUKE3D_SRC)/config.c $(duke3d_h) $(DUKE3D_SRC)/jmact/scriplib.h $(DUKE3D_INC)/_functio.h
|
||||
$(DUKE3D_OBJ)/winbits.$o: $(DUKE3D_SRC)/winbits.c
|
||||
$(DUKE3D_OBJ)/osdfuncs.$o: $(DUKE3D_SRC)/names.h $(ENGINE_INC)/build.h $(ENGINE_INC)/osd.h
|
||||
$(DUKE3D_OBJ)/osdcmds.$o: $(DUKE3D_SRC)/osdcmds.c $(DUKE3D_INC)/osdcmds.h $(ENGINE_INC)/osd.h $(duke3d_h)
|
||||
$(DUKE3D_OBJ)/animvpx.$o: $(DUKE3D_SRC)/animvpx.c $(DUKE3D_SRC)/animvpx.h $(duke3d_h) $(ENGINE_INC)/glbuild.h
|
||||
$(DUKE3D_OBJ)/rev.$o: $(DUKE3D_SRC)/rev.h
|
||||
|
||||
$(OBJ)/lunatic_game.$o: $(EINC)/lunatic.h $(SRC)/lunatic/lunatic_game.c $(SRC)/lunatic/lunatic_game.h $(SRC)/gamedef.h $(SRC)/gameexec.h $(EINC)/cache1d.h $(EINC)/osd.h
|
||||
$(OBJ)/lunatic_m32.$o: $(EINC)/lunatic.h $(SRC)/lunatic/lunatic_m32.c $(SRC)/lunatic/lunatic_m32.h $(EINC)/cache1d.h $(EINC)/osd.h
|
||||
$(DUKE3D_OBJ)/lunatic_game.$o: $(ENGINE_INC)/lunatic.h $(DUKE3D_SRC)/lunatic/lunatic_game.c $(DUKE3D_SRC)/lunatic/lunatic_game.h $(DUKE3D_SRC)/gamedef.h $(DUKE3D_SRC)/gameexec.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/osd.h
|
||||
$(DUKE3D_OBJ)/lunatic_m32.$o: $(ENGINE_INC)/lunatic.h $(DUKE3D_SRC)/lunatic/lunatic_m32.c $(DUKE3D_SRC)/lunatic/lunatic_m32.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/osd.h
|
||||
|
||||
# editor objects
|
||||
m32_script_hs=$(EINC)/m32script.h $(SRC)/m32def.h
|
||||
$(OBJ)/astub.$o: $(SRC)/astub.c \
|
||||
$(EINC)/compat.h \
|
||||
$(EINC)/build.h \
|
||||
$(EINC)/editor.h \
|
||||
$(EINC)/pragmas.h \
|
||||
$(EINC)/baselayer.h \
|
||||
$(EINC)/osd.h \
|
||||
$(EINC)/cache1d.h \
|
||||
$(EINC)/crc32.h \
|
||||
$(EINC)/scriptfile.h \
|
||||
$(EINC)/lz4.h \
|
||||
$(SRC)/macros.h \
|
||||
$(SRC)/osdfuncs.h \
|
||||
$(SRC)/names.h \
|
||||
$(SRC)/mapster32.h \
|
||||
$(SRC)/keys.h \
|
||||
m32_script_hs=$(ENGINE_INC)/m32script.h $(DUKE3D_SRC)/m32def.h
|
||||
$(DUKE3D_OBJ)/astub.$o: $(DUKE3D_SRC)/astub.c \
|
||||
$(ENGINE_INC)/compat.h \
|
||||
$(ENGINE_INC)/build.h \
|
||||
$(ENGINE_INC)/editor.h \
|
||||
$(ENGINE_INC)/pragmas.h \
|
||||
$(ENGINE_INC)/baselayer.h \
|
||||
$(ENGINE_INC)/osd.h \
|
||||
$(ENGINE_INC)/cache1d.h \
|
||||
$(ENGINE_INC)/crc32.h \
|
||||
$(ENGINE_INC)/scriptfile.h \
|
||||
$(ENGINE_INC)/lz4.h \
|
||||
$(DUKE3D_SRC)/macros.h \
|
||||
$(DUKE3D_SRC)/osdfuncs.h \
|
||||
$(DUKE3D_SRC)/names.h \
|
||||
$(DUKE3D_SRC)/mapster32.h \
|
||||
$(DUKE3D_SRC)/keys.h \
|
||||
$(m32_script_hs)
|
||||
$(OBJ)/sounds_mapster32.$o: $(SRC)/sounds_mapster32.c \
|
||||
$(SRC)/sounds_mapster32.h \
|
||||
$(SRC)/sounds_common.h \
|
||||
$(EINC)/compat.h \
|
||||
$(EINC)/baselayer.h \
|
||||
$(EINC)/cache1d.h \
|
||||
$(EINC)/build.h \
|
||||
$(EINC)/editor.h \
|
||||
$(EINC)/osd.h \
|
||||
$(SRC)/macros.h \
|
||||
$(JAUDIOLIBDIR)/include/fx_man.h \
|
||||
$(SRC)/jmact/mathutil.h
|
||||
$(DUKE3D_OBJ)/sounds_mapster32.$o: $(DUKE3D_SRC)/sounds_mapster32.c \
|
||||
$(DUKE3D_SRC)/sounds_mapster32.h \
|
||||
$(DUKE3D_SRC)/sounds_common.h \
|
||||
$(ENGINE_INC)/compat.h \
|
||||
$(ENGINE_INC)/baselayer.h \
|
||||
$(ENGINE_INC)/cache1d.h \
|
||||
$(ENGINE_INC)/build.h \
|
||||
$(ENGINE_INC)/editor.h \
|
||||
$(ENGINE_INC)/osd.h \
|
||||
$(DUKE3D_SRC)/macros.h \
|
||||
$(AUDIOLIB_ROOT)/include/fx_man.h \
|
||||
$(DUKE3D_SRC)/jmact/mathutil.h
|
||||
|
||||
$(OBJ)/m32def.$o: $(SRC)/m32def.c $(m32_script_hs) $(EINC)/cache1d.h $(SRC)/sounds_mapster32.h $(SRC)/sounds_common.h $(SRC)/keys.h
|
||||
$(OBJ)/m32exec.$o: $(SRC)/m32exec.c $(m32_script_hs) $(SRC)/sounds_mapster32.h $(SRC)/sounds_common.h $(EINC)/osd.h $(SRC)/keys.h $(JAUDIOLIBDIR)/include/fx_man.h
|
||||
$(OBJ)/m32structures.$o: $(SRC)/m32structures.c $(m32_script_hs) $(EINC)/compat.h $(EINC)/prlights.h
|
||||
$(OBJ)/m32vars.$o: $(SRC)/m32vars.c $(SRC)/m32structures.c $(m32_script_hs) $(EINC)/osd.h $(SRC)/keys.h $(EINC)/polymer.h
|
||||
$(DUKE3D_OBJ)/m32def.$o: $(DUKE3D_SRC)/m32def.c $(m32_script_hs) $(ENGINE_INC)/cache1d.h $(DUKE3D_SRC)/sounds_mapster32.h $(DUKE3D_SRC)/sounds_common.h $(DUKE3D_SRC)/keys.h
|
||||
$(DUKE3D_OBJ)/m32exec.$o: $(DUKE3D_SRC)/m32exec.c $(m32_script_hs) $(DUKE3D_SRC)/sounds_mapster32.h $(DUKE3D_SRC)/sounds_common.h $(ENGINE_INC)/osd.h $(DUKE3D_SRC)/keys.h $(AUDIOLIB_ROOT)/include/fx_man.h
|
||||
$(DUKE3D_OBJ)/m32structures.$o: $(DUKE3D_SRC)/m32structures.c $(m32_script_hs) $(ENGINE_INC)/compat.h $(ENGINE_INC)/prlights.h
|
||||
$(DUKE3D_OBJ)/m32vars.$o: $(DUKE3D_SRC)/m32vars.c $(DUKE3D_SRC)/m32structures.c $(m32_script_hs) $(ENGINE_INC)/osd.h $(DUKE3D_SRC)/keys.h $(ENGINE_INC)/polymer.h
|
||||
|
||||
# misc objects
|
||||
$(OBJ)/game_icon.$o: $(RSRC)/game_icon.c
|
||||
$(OBJ)/build_icon.$o: $(RSRC)/build_icon.c
|
||||
$(DUKE3D_OBJ)/game_icon.$o: $(DUKE3D_RSRC)/game_icon.c
|
||||
$(DUKE3D_OBJ)/build_icon.$o: $(DUKE3D_RSRC)/build_icon.c
|
||||
|
||||
$(OBJ)/grpscan.$o: $(SRC)/grpscan.c $(EINC)/compat.h $(EINC)/baselayer.h $(EINC)/scriptfile.h $(EINC)/cache1d.h $(EINC)/crc32.h $(INC)/grpscan.h
|
||||
$(OBJ)/gameres.$o: $(SRC)/misc/gameres.rc $(SRC)/startwin.game.h $(RSRC)/game.bmp $(RSRC)/game_icon.ico
|
||||
$(OBJ)/buildres.$o: $(SRC)/misc/buildres.rc $(EINC)/startwin.editor.h $(RSRC)/build.bmp $(RSRC)/build_icon.ico
|
||||
$(OBJ)/startwin.game.$o: $(SRC)/startwin.game.c $(duke3d_h) $(EINC)/build.h $(EINC)/winlayer.h $(EINC)/compat.h $(INC)/grpscan.h
|
||||
$(OBJ)/startgtk.game.$o: $(SRC)/startgtk.game.c $(duke3d_h) $(EINC)/dynamicgtk.h $(EINC)/build.h $(EINC)/baselayer.h $(EINC)/compat.h
|
||||
$(DUKE3D_OBJ)/grpscan.$o: $(DUKE3D_SRC)/grpscan.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/scriptfile.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/crc32.h $(DUKE3D_INC)/grpscan.h
|
||||
$(DUKE3D_OBJ)/gameres.$o: $(DUKE3D_SRC)/misc/gameres.rc $(DUKE3D_SRC)/startwin.game.h $(DUKE3D_RSRC)/game.bmp $(DUKE3D_RSRC)/game_icon.ico
|
||||
$(DUKE3D_OBJ)/buildres.$o: $(DUKE3D_SRC)/misc/buildres.rc $(ENGINE_INC)/startwin.editor.h $(DUKE3D_RSRC)/build.bmp $(DUKE3D_RSRC)/build_icon.ico
|
||||
$(DUKE3D_OBJ)/startwin.game.$o: $(DUKE3D_SRC)/startwin.game.c $(duke3d_h) $(ENGINE_INC)/build.h $(ENGINE_INC)/winlayer.h $(ENGINE_INC)/compat.h $(DUKE3D_INC)/grpscan.h
|
||||
$(DUKE3D_OBJ)/startgtk.game.$o: $(DUKE3D_SRC)/startgtk.game.c $(duke3d_h) $(ENGINE_INC)/dynamicgtk.h $(ENGINE_INC)/build.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/compat.h
|
||||
|
||||
|
||||
# jMACT objects
|
||||
$(OBJ)/animlib.$o: $(SRC)/jmact/animlib.c $(SRC)/jmact/animlib.h $(EINC)/compat.h
|
||||
$(OBJ)/file_lib.$o: $(SRC)/jmact/file_lib.c $(SRC)/jmact/file_lib.h
|
||||
$(OBJ)/control.$o: $(SRC)/jmact/control.c $(SRC)/jmact/control.h $(SRC)/jmact/keyboard.h $(SRC)/jmact/mouse.h $(SRC)/jmact/joystick.h $(EINC)/baselayer.h
|
||||
$(OBJ)/keyboard.$o: $(SRC)/jmact/keyboard.c $(SRC)/jmact/keyboard.h $(EINC)/compat.h $(EINC)/baselayer.h
|
||||
$(OBJ)/mouse.$o: $(SRC)/jmact/mouse.c $(SRC)/jmact/mouse.h $(EINC)/baselayer.h
|
||||
$(OBJ)/joystick.$o: $(SRC)/jmact/joystick.c $(SRC)/jmact/joystick.h $(EINC)/baselayer.h
|
||||
$(OBJ)/mathutil.$o: $(SRC)/jmact/mathutil.c $(EINC)/compat.h $(EINC)/pragmas.h
|
||||
$(OBJ)/scriplib.$o: $(SRC)/jmact/scriplib.c $(SRC)/jmact/scriplib.h $(SRC)/jmact/_scrplib.h $(EINC)/compat.h
|
||||
$(DUKE3D_OBJ)/animlib.$o: $(DUKE3D_SRC)/jmact/animlib.c $(DUKE3D_SRC)/jmact/animlib.h $(ENGINE_INC)/compat.h
|
||||
$(DUKE3D_OBJ)/file_lib.$o: $(DUKE3D_SRC)/jmact/file_lib.c $(DUKE3D_SRC)/jmact/file_lib.h
|
||||
$(DUKE3D_OBJ)/control.$o: $(DUKE3D_SRC)/jmact/control.c $(DUKE3D_SRC)/jmact/control.h $(DUKE3D_SRC)/jmact/keyboard.h $(DUKE3D_SRC)/jmact/mouse.h $(DUKE3D_SRC)/jmact/joystick.h $(ENGINE_INC)/baselayer.h
|
||||
$(DUKE3D_OBJ)/keyboard.$o: $(DUKE3D_SRC)/jmact/keyboard.c $(DUKE3D_SRC)/jmact/keyboard.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h
|
||||
$(DUKE3D_OBJ)/mouse.$o: $(DUKE3D_SRC)/jmact/mouse.c $(DUKE3D_SRC)/jmact/mouse.h $(ENGINE_INC)/baselayer.h
|
||||
$(DUKE3D_OBJ)/joystick.$o: $(DUKE3D_SRC)/jmact/joystick.c $(DUKE3D_SRC)/jmact/joystick.h $(ENGINE_INC)/baselayer.h
|
||||
$(DUKE3D_OBJ)/mathutil.$o: $(DUKE3D_SRC)/jmact/mathutil.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/pragmas.h
|
||||
$(DUKE3D_OBJ)/scriplib.$o: $(DUKE3D_SRC)/jmact/scriplib.c $(DUKE3D_SRC)/jmact/scriplib.h $(DUKE3D_SRC)/jmact/_scrplib.h $(ENGINE_INC)/compat.h
|
||||
|
||||
$(OBJ)/midi.$o: $(SRC)/midi.c $(SRC)/_midi.h $(SRC)/midi.h $(JAUDIOLIBDIR)/include/music.h
|
||||
$(OBJ)/mpu401.$o: $(SRC)/mpu401.c $(SRC)/mpu401.h $(JAUDIOLIBDIR)/include/music.h
|
||||
$(OBJ)/music.$o: $(SRC)/music.c $(SRC)/midi.h $(SRC)/mpu401.h $(JAUDIOLIBDIR)/include/music.h
|
||||
$(DUKE3D_OBJ)/midi.$o: $(DUKE3D_SRC)/midi.c $(DUKE3D_SRC)/_midi.h $(DUKE3D_SRC)/midi.h $(AUDIOLIB_ROOT)/include/music.h
|
||||
$(DUKE3D_OBJ)/mpu401.$o: $(DUKE3D_SRC)/mpu401.c $(DUKE3D_SRC)/mpu401.h $(AUDIOLIB_ROOT)/include/music.h
|
||||
$(DUKE3D_OBJ)/music.$o: $(DUKE3D_SRC)/music.c $(DUKE3D_SRC)/midi.h $(DUKE3D_SRC)/mpu401.h $(AUDIOLIB_ROOT)/include/music.h
|
||||
|
||||
$(OBJ)/ivfrate.$o: $(SRC)/util/ivfrate.c $(SRC)/animvpx.h
|
||||
$(DUKE3D_OBJ)/ivfrate.$o: $(DUKE3D_SRC)/util/ivfrate.c $(DUKE3D_SRC)/animvpx.h
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# EDuke32 Makefile for Microsoft NMake
|
||||
CPLUSPLUS=1
|
||||
SRC=source
|
||||
OBJ=$(SRC)\obj_win
|
||||
EROOT=build
|
||||
EINC=$(EROOT)\include
|
||||
EOBJ=$(SRC)\eobj_win
|
||||
INC=$(SRC)
|
||||
RSRC=rsrc
|
||||
DUKE3D_SRC=source
|
||||
DUKE3D_OBJ=$(DUKE3D_SRC)\obj_win
|
||||
ENGINE_ROOT=build
|
||||
ENGINE_INC=$(ENGINE_ROOT)\include
|
||||
ENGINE_OBJ=$(DUKE3D_SRC)\eobj_win
|
||||
DUKE3D_INC=$(DUKE3D_SRC)
|
||||
DUKE3D_RSRC=rsrc
|
||||
o=obj
|
||||
|
||||
!ifndef WINBITS
|
||||
|
@ -21,10 +21,10 @@ WINMACHINE=/MACHINE:X86
|
|||
WINMACHINE=/MACHINE:X64
|
||||
!endif
|
||||
|
||||
JAUDIOLIBDIR=$(SRC)\jaudiolib
|
||||
AUDIOLIB_ROOT=$(DUKE3D_SRC)\jaudiolib
|
||||
JAUDIOLIB=libjfaudiolib.lib
|
||||
|
||||
ENETDIR=$(SRC)\enet
|
||||
ENETDIR=$(DUKE3D_SRC)\enet
|
||||
ENETLIB=libenet.lib
|
||||
|
||||
ENGINELIB=engine.lib
|
||||
|
@ -72,7 +72,7 @@ AS=ml
|
|||
LINK=link /nologo /opt:ref
|
||||
MT=mt
|
||||
CFLAGS= /MT /J /nologo $(flags_cl) \
|
||||
/I$(INC) /I$(EINC)\msvc /I$(EINC)\ /I$(SRC)\jmact /I$(JAUDIOLIBDIR)\include /I$(ENETDIR)\include \
|
||||
/I$(DUKE3D_INC) /I$(ENGINE_INC)\msvc /I$(ENGINE_INC)\ /I$(DUKE3D_SRC)\jmact /I$(AUDIOLIB_ROOT)\include /I$(ENETDIR)\include \
|
||||
/W2 $(ENGINEOPTS) \
|
||||
/I$(PLATFORM)\include /I$(AUDIOINC)\include /DRENDERTYPE$(RENDERTYPE)=1 /DMIXERTYPE$(MIXERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /DUSE_LIBVPX
|
||||
|
||||
|
@ -102,75 +102,75 @@ LIBS=$(LIBS) msvcrtd.lib
|
|||
LIBS=$(LIBS) msvcrt.lib # msvcrt_winxp.obj
|
||||
!endif
|
||||
|
||||
JMACTOBJ=$(OBJ)\file_lib.$o \
|
||||
$(OBJ)\control.$o \
|
||||
$(OBJ)\keyboard.$o \
|
||||
$(OBJ)\mouse.$o \
|
||||
$(OBJ)\joystick.$o \
|
||||
$(OBJ)\mathutil.$o \
|
||||
$(OBJ)\scriplib.$o
|
||||
JMACTOBJ=$(DUKE3D_OBJ)\file_lib.$o \
|
||||
$(DUKE3D_OBJ)\control.$o \
|
||||
$(DUKE3D_OBJ)\keyboard.$o \
|
||||
$(DUKE3D_OBJ)\mouse.$o \
|
||||
$(DUKE3D_OBJ)\joystick.$o \
|
||||
$(DUKE3D_OBJ)\mathutil.$o \
|
||||
$(DUKE3D_OBJ)\scriplib.$o
|
||||
|
||||
GAMEOBJS=$(OBJ)\game.$o \
|
||||
$(OBJ)\game_inline.$o \
|
||||
$(OBJ)\actors.$o \
|
||||
$(OBJ)\actors_inline.$o \
|
||||
$(OBJ)\anim.$o \
|
||||
$(OBJ)\animvpx.$o \
|
||||
$(OBJ)\common.$o \
|
||||
$(OBJ)\demo.$o \
|
||||
$(OBJ)\gamedef.$o \
|
||||
$(OBJ)\gameexec.$o \
|
||||
$(OBJ)\gamevars.$o \
|
||||
$(OBJ)\global.$o \
|
||||
$(OBJ)\input.$o \
|
||||
$(OBJ)\menus.$o \
|
||||
$(OBJ)\namesdyn.$o \
|
||||
$(OBJ)\net.$o \
|
||||
$(OBJ)\player.$o \
|
||||
$(OBJ)\premap.$o \
|
||||
$(OBJ)\savegame.$o \
|
||||
$(OBJ)\sector.$o \
|
||||
$(OBJ)\sector_inline.$o \
|
||||
$(OBJ)\rev.$o \
|
||||
$(OBJ)\rts.$o \
|
||||
$(OBJ)\config.$o \
|
||||
$(OBJ)\animlib.$o\
|
||||
$(OBJ)\osdfuncs.$o \
|
||||
$(OBJ)\osdcmds.$o \
|
||||
$(OBJ)\grpscan.$o \
|
||||
$(OBJ)\winbits.$o \
|
||||
$(OBJ)\gameres.res \
|
||||
$(OBJ)\startwin.game.$o \
|
||||
GAMEOBJS=$(DUKE3D_OBJ)\game.$o \
|
||||
$(DUKE3D_OBJ)\game_inline.$o \
|
||||
$(DUKE3D_OBJ)\actors.$o \
|
||||
$(DUKE3D_OBJ)\actors_inline.$o \
|
||||
$(DUKE3D_OBJ)\anim.$o \
|
||||
$(DUKE3D_OBJ)\animvpx.$o \
|
||||
$(DUKE3D_OBJ)\common.$o \
|
||||
$(DUKE3D_OBJ)\demo.$o \
|
||||
$(DUKE3D_OBJ)\gamedef.$o \
|
||||
$(DUKE3D_OBJ)\gameexec.$o \
|
||||
$(DUKE3D_OBJ)\gamevars.$o \
|
||||
$(DUKE3D_OBJ)\global.$o \
|
||||
$(DUKE3D_OBJ)\input.$o \
|
||||
$(DUKE3D_OBJ)\menus.$o \
|
||||
$(DUKE3D_OBJ)\namesdyn.$o \
|
||||
$(DUKE3D_OBJ)\net.$o \
|
||||
$(DUKE3D_OBJ)\player.$o \
|
||||
$(DUKE3D_OBJ)\premap.$o \
|
||||
$(DUKE3D_OBJ)\savegame.$o \
|
||||
$(DUKE3D_OBJ)\sector.$o \
|
||||
$(DUKE3D_OBJ)\sector_inline.$o \
|
||||
$(DUKE3D_OBJ)\rev.$o \
|
||||
$(DUKE3D_OBJ)\rts.$o \
|
||||
$(DUKE3D_OBJ)\config.$o \
|
||||
$(DUKE3D_OBJ)\animlib.$o\
|
||||
$(DUKE3D_OBJ)\osdfuncs.$o \
|
||||
$(DUKE3D_OBJ)\osdcmds.$o \
|
||||
$(DUKE3D_OBJ)\grpscan.$o \
|
||||
$(DUKE3D_OBJ)\winbits.$o \
|
||||
$(DUKE3D_OBJ)\gameres.res \
|
||||
$(DUKE3D_OBJ)\startwin.game.$o \
|
||||
$(JMACTOBJ) \
|
||||
$(OBJ)\sounds.$o \
|
||||
$(OBJ)\soundsdyn.$o \
|
||||
$(DUKE3D_OBJ)\sounds.$o \
|
||||
$(DUKE3D_OBJ)\soundsdyn.$o \
|
||||
!ifdef DEBUG
|
||||
$(OBJ)\mdump.$o
|
||||
$(DUKE3D_OBJ)\mdump.$o
|
||||
!endif
|
||||
|
||||
EDITOROBJS=$(OBJ)\astub.$o \
|
||||
$(OBJ)\common.$o \
|
||||
$(OBJ)\mathutil.$o \
|
||||
$(OBJ)\m32def.$o \
|
||||
$(OBJ)\m32vars.$o \
|
||||
$(OBJ)\m32exec.$o \
|
||||
$(OBJ)\sounds_mapster32.$o \
|
||||
$(OBJ)\rev.$o \
|
||||
$(OBJ)\buildres.res \
|
||||
EDITOROBJS=$(DUKE3D_OBJ)\astub.$o \
|
||||
$(DUKE3D_OBJ)\common.$o \
|
||||
$(DUKE3D_OBJ)\mathutil.$o \
|
||||
$(DUKE3D_OBJ)\m32def.$o \
|
||||
$(DUKE3D_OBJ)\m32vars.$o \
|
||||
$(DUKE3D_OBJ)\m32exec.$o \
|
||||
$(DUKE3D_OBJ)\sounds_mapster32.$o \
|
||||
$(DUKE3D_OBJ)\rev.$o \
|
||||
$(DUKE3D_OBJ)\buildres.res \
|
||||
!ifdef DEBUG
|
||||
$(OBJ)\mdump.$o
|
||||
$(DUKE3D_OBJ)\mdump.$o
|
||||
!endif
|
||||
|
||||
!if ("$(RENDERTYPE)"=="SDL")
|
||||
GAMEOBJS=$(GAMEOBJS) $(OBJ)\game_icon.$o
|
||||
EDITOROBJS=$(EDITOROBJS) $(OBJ)\build_icon.$o
|
||||
GAMEOBJS=$(GAMEOBJS) $(DUKE3D_OBJ)\game_icon.$o
|
||||
EDITOROBJS=$(EDITOROBJS) $(DUKE3D_OBJ)\build_icon.$o
|
||||
!endif
|
||||
|
||||
!if ("$(MIXERTYPE)"=="WIN")
|
||||
GAMEOBJS=$(GAMEOBJS) $(OBJ)\midi.$o $(OBJ)\music.$o $(OBJ)\mpu401.$o
|
||||
GAMEOBJS=$(GAMEOBJS) $(DUKE3D_OBJ)\midi.$o $(DUKE3D_OBJ)\music.$o $(DUKE3D_OBJ)\mpu401.$o
|
||||
!endif
|
||||
!if ("$(MIXERTYPE)"=="SDL")
|
||||
GAMEOBJS=$(GAMEOBJS) $(OBJ)\sdlmusic.$o
|
||||
GAMEOBJS=$(GAMEOBJS) $(DUKE3D_OBJ)\sdlmusic.$o
|
||||
!endif
|
||||
|
||||
GAMEOBJS=$(GAMEOBJS) $(MUSICOBJ)
|
||||
|
@ -180,54 +180,54 @@ EDITOROBJS=$(EDITOROBJS) $(MUSICOBJ)
|
|||
# RULES
|
||||
.SUFFIXES: .masm
|
||||
|
||||
{$(SRC)\}.masm{$(OBJ)\}.$o:
|
||||
{$(DUKE3D_SRC)\}.masm{$(DUKE3D_OBJ)\}.$o:
|
||||
$(AS) /c $(ASFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\jmact}.c{$(OBJ)\}.$o:
|
||||
{$(DUKE3D_SRC)\jmact}.c{$(DUKE3D_OBJ)\}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\util}.c{$(OBJ)\}.$o:
|
||||
{$(DUKE3D_SRC)\util}.c{$(DUKE3D_OBJ)\}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\}.c{$(OBJ)\}.$o:
|
||||
{$(DUKE3D_SRC)\}.c{$(DUKE3D_OBJ)\}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(RSRC)\}.c{$(OBJ)\}.$o:
|
||||
{$(DUKE3D_RSRC)\}.c{$(DUKE3D_OBJ)\}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\}.cpp{$(OBJ)\}.$o:
|
||||
{$(DUKE3D_SRC)\}.cpp{$(DUKE3D_OBJ)\}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\misc}.rc{$(OBJ)\}.res:
|
||||
$(RC) /i$(EINC)\ /i$(SRC)\ /DPOLYMER /fo$@ /r $<
|
||||
{$(DUKE3D_SRC)\misc}.rc{$(DUKE3D_OBJ)\}.res:
|
||||
$(RC) /i$(ENGINE_INC)\ /i$(DUKE3D_SRC)\ /DPOLYMER /fo$@ /r $<
|
||||
|
||||
|
||||
# TARGETS
|
||||
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
|
||||
|
||||
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)\$(ENGINELIB) $(JAUDIOLIBDIR)\$(JAUDIOLIB) $(ENETDIR)\$(ENETLIB)
|
||||
eduke32$(EXESUFFIX): $(GAMEOBJS) $(ENGINE_OBJ)\$(ENGINELIB) $(AUDIOLIB_ROOT)\$(JAUDIOLIB) $(ENETDIR)\$(ENETLIB)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) /LIBPATH:$(AUDIOPLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $(RSRC)$(WINLIB)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
||||
$(MT) -manifest $(DUKE3D_RSRC)$(WINLIB)\manifest.game.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
||||
|
||||
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)\$(ENGINELIB) $(EOBJ)\$(EDITORLIB) $(JAUDIOLIBDIR)\$(JAUDIOLIB)
|
||||
mapster32$(EXESUFFIX): $(EDITOROBJS) $(ENGINE_OBJ)\$(ENGINELIB) $(ENGINE_OBJ)\$(EDITORLIB) $(AUDIOLIB_ROOT)\$(JAUDIOLIB)
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:WINDOWS $(WINMACHINE) /LIBPATH:$(PLATFORM)\lib$(WINLIB) /LIBPATH:$(AUDIOPLATFORM)\lib$(WINLIB) $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $(RSRC)$(WINLIB)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
||||
$(MT) -manifest $(DUKE3D_RSRC)$(WINLIB)\manifest.build.xml -hashupdate -outputresource:$@ -out:$@.manifest
|
||||
|
||||
!include Makefile.deps
|
||||
|
||||
enginelib editorlib: AlwaysBuild
|
||||
-mkdir $(EOBJ)
|
||||
echo OBJ=$(MAKEDIR)\$(EOBJ)\ > $(EOBJ)\overrides.mak
|
||||
echo CFLAGS=$(ENGINEOPTS) >> $(EOBJ)\overrides.mak
|
||||
echo WINBITS=$(WINBITS) >> $(EOBJ)\overrides.mak
|
||||
echo RENDERTYPE=$(RENDERTYPE) >> $(EOBJ)\overrides.mak
|
||||
echo MIXERTYPE=$(MIXERTYPE) >> $(EOBJ)\overrides.mak
|
||||
cd $(EROOT)
|
||||
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(EOBJ)\overrides.mak" $@
|
||||
-mkdir $(ENGINE_OBJ)
|
||||
echo DUKE3D_OBJ=$(MAKEDIR)\$(ENGINE_OBJ)\ > $(ENGINE_OBJ)\overrides.mak
|
||||
echo CFLAGS=$(ENGINEOPTS) >> $(ENGINE_OBJ)\overrides.mak
|
||||
echo WINBITS=$(WINBITS) >> $(ENGINE_OBJ)\overrides.mak
|
||||
echo RENDERTYPE=$(RENDERTYPE) >> $(ENGINE_OBJ)\overrides.mak
|
||||
echo MIXERTYPE=$(MIXERTYPE) >> $(ENGINE_OBJ)\overrides.mak
|
||||
cd $(ENGINE_ROOT)
|
||||
nmake /f Makefile.msvc "OVERRIDES=$(MAKEDIR)\$(ENGINE_OBJ)\overrides.mak" $@
|
||||
cd $(MAKEDIR)
|
||||
|
||||
jaudiolib:
|
||||
cd $(JAUDIOLIBDIR)
|
||||
cd $(AUDIOLIB_ROOT)
|
||||
nmake /f Makefile.msvc "MIXERTYPE=$(MIXERTYPE)" "WINBITS=$(WINBITS)"
|
||||
cd $(MAKEDIR)
|
||||
|
||||
|
@ -237,22 +237,22 @@ enet:
|
|||
cd $(MAKEDIR)
|
||||
|
||||
AlwaysBuild: ;
|
||||
$(EOBJ)\$(EDITORLIB): editorlib ;
|
||||
$(EOBJ)\$(ENGINELIB): enginelib ;
|
||||
$(JAUDIOLIBDIR)\$(JAUDIOLIB): jaudiolib ;
|
||||
$(ENGINE_OBJ)\$(EDITORLIB): editorlib ;
|
||||
$(ENGINE_OBJ)\$(ENGINELIB): enginelib ;
|
||||
$(AUDIOLIB_ROOT)\$(JAUDIOLIB): jaudiolib ;
|
||||
$(ENETDIR)\$(ENETLIB): enet ;
|
||||
|
||||
# PHONIES
|
||||
clean:
|
||||
-del /Q $(OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) \
|
||||
-del /Q $(DUKE3D_OBJ)\* eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) \
|
||||
*.pdb *.map *.manifest
|
||||
-copy /y nul $(OBJ)\keep.me
|
||||
cd $(JAUDIOLIBDIR)
|
||||
-copy /y nul $(DUKE3D_OBJ)\keep.me
|
||||
cd $(AUDIOLIB_ROOT)
|
||||
nmake /f Makefile.msvc clean
|
||||
cd $(MAKEDIR)\$(ENETDIR)
|
||||
nmake /f Makefile.msvc clean
|
||||
cd $(MAKEDIR)
|
||||
|
||||
veryclean: clean
|
||||
-del /Q $(EOBJ)\*
|
||||
-copy /y nul $(EOBJ)\keep.me
|
||||
-del /Q $(ENGINE_OBJ)\*
|
||||
-copy /y nul $(ENGINE_OBJ)\keep.me
|
||||
|
|
|
@ -1,400 +0,0 @@
|
|||
#
|
||||
# Build Makefile for GNU Make
|
||||
#
|
||||
|
||||
include ../Makefile.common
|
||||
|
||||
|
||||
# Build locations - OBJ gets overridden to the game-specific objects dir
|
||||
#
|
||||
OBJ?=obj.gnu
|
||||
SRC=src
|
||||
RSRC=rsrc
|
||||
INC=include
|
||||
|
||||
# ENETROOT=$(SRC)/enet
|
||||
|
||||
# Filename extensions - these won't need to change
|
||||
#
|
||||
o=o
|
||||
res=o
|
||||
asm=nasm
|
||||
|
||||
# Debugging and release
|
||||
#
|
||||
ifneq ($(RELEASE),0)
|
||||
# Debugging disabled
|
||||
debug+= $(F_NO_STACK_PROTECTOR)
|
||||
else
|
||||
# Debugging enabled
|
||||
debug+= -DNOSDLPARACHUTE
|
||||
endif
|
||||
|
||||
include Makefile.shared
|
||||
|
||||
OURCOMMONFLAGS=$(BASECOMMONFLAGS) -I$(INC) -I$(SRC)
|
||||
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
|
||||
OURCONLYFLAGS=$(BASECONLYFLAGS)
|
||||
OURCXXFLAGS=$(BASECXXFLAGS)
|
||||
OURASFLAGS=$(BASEASFLAGS)
|
||||
PRINTLDFLAGS=$(BASELDFLAGS)
|
||||
OURLDFLAGS=$(OURCOMMONFLAGS) $(PRINTLDFLAGS)
|
||||
|
||||
ifneq ($(LUNATIC),0)
|
||||
OURCOMMONFLAGS+= -DLUNATIC
|
||||
endif
|
||||
|
||||
UTILLIBS= -lm # -lpthread
|
||||
UTILADDOBJS=
|
||||
|
||||
ENGINEOBJS=
|
||||
ifeq (0,$(NOASM))
|
||||
ENGINEOBJS+= $(OBJ)/a.$o
|
||||
else
|
||||
ENGINEOBJS+= $(OBJ)/a-c.$o
|
||||
ifneq (0,$(USE_ASM64))
|
||||
ENGINEOBJS+= $(OBJ)/a64.$o
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
ENGINEOBJS+= \
|
||||
$(OBJ)/baselayer.$o \
|
||||
$(OBJ)/cache1d.$o \
|
||||
$(OBJ)/compat.$o \
|
||||
$(OBJ)/crc32.$o \
|
||||
$(OBJ)/defs.$o \
|
||||
$(OBJ)/engine.$o \
|
||||
$(OBJ)/polymost.$o \
|
||||
$(OBJ)/texcache.$o \
|
||||
$(OBJ)/dxtfilter.$o \
|
||||
$(OBJ)/hightile.$o \
|
||||
$(OBJ)/textfont.$o \
|
||||
$(OBJ)/smalltextfont.$o \
|
||||
$(OBJ)/kplib.$o \
|
||||
$(OBJ)/lz4.$o \
|
||||
$(OBJ)/osd.$o \
|
||||
$(OBJ)/pragmas.$o \
|
||||
$(OBJ)/scriptfile.$o \
|
||||
$(OBJ)/mutex.$o \
|
||||
$(OBJ)/xxhash.$o
|
||||
|
||||
ifeq (1,$(USE_OPENGL))
|
||||
ENGINEOBJS+= $(OBJ)/mdsprite.$o
|
||||
ENGINEOBJS+= $(OBJ)/glbuild.$o
|
||||
endif
|
||||
|
||||
ifeq (1,$(POLYMER))
|
||||
ENGINEOBJS+= $(OBJ)/polymer.$o
|
||||
endif
|
||||
|
||||
ifeq (1,$(LUNATIC))
|
||||
ENGINEOBJS+= $(OBJ)/lunatic.$o
|
||||
endif
|
||||
|
||||
EDITOROBJS=$(OBJ)/build.$o \
|
||||
$(OBJ)/config.$o \
|
||||
$(OBJ)/defs.$o
|
||||
|
||||
# PLATFORM SPECIFIC SETTINGS
|
||||
|
||||
ifeq ($(SUBPLATFORM),LINUX)
|
||||
OURASFLAGS+= -f elf
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ENGINEOBJS += $(OBJ)/osxbits.$o
|
||||
ifneq (0,$(OSX_STARTUPWINDOW))
|
||||
ENGINEOBJS += $(OBJ)/startosx.editor.$o
|
||||
endif
|
||||
OURASFLAGS += -f macho -DUNDERSCORES
|
||||
OURCOMMONFLAGS += -fno-pic -DUNDERSCORES
|
||||
endif
|
||||
ifeq ($(PLATFORM),BSD)
|
||||
OURASFLAGS+= -f elf
|
||||
OURCOMMONFLAGS+= -I/usr/X11R6/include
|
||||
endif
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS+= -DUNDERSCORES -I$(DXROOT) -I$(DXROOT)/include # -I$(ENETROOT)/include
|
||||
OURASFLAGS+= -DUNDERSCORES -f win32
|
||||
ENGINEOBJS+= $(OBJ)/winbits.$o
|
||||
EDITOROBJS+= $(OBJ)/startwin.editor.$o
|
||||
endif
|
||||
ifeq ($(PLATFORM),BEOS)
|
||||
OURASFLAGS+= -f elf
|
||||
TARGETOPTS+= -DNOASM
|
||||
endif
|
||||
ifeq ($(PLATFORM),SYLLABLE)
|
||||
OURASFLAGS+= -f elf
|
||||
endif
|
||||
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
ENGINEOBJS+= $(OBJ)/sdlayer.$o
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(findstring x86_64,$(ARCH)),x86_64)
|
||||
ifeq (,$(ARCH))
|
||||
ifneq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
UTILLIBS += -read_only_relocs suppress
|
||||
endif
|
||||
else
|
||||
UTILLIBS += -read_only_relocs suppress
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers
|
||||
else
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq (1,$(HAVE_GTK2))
|
||||
OURCOMMONFLAGS+= -DHAVE_GTK2 $(shell pkg-config --cflags gtk+-2.0)
|
||||
ENGINEOBJS+= $(OBJ)/gtkbits.$o
|
||||
ifeq ($(LINKED_GTK),0)
|
||||
ENGINEOBJS+= $(OBJ)/dynamicgtk.$o
|
||||
endif
|
||||
EDITOROBJS+= $(OBJ)/startgtk.editor.$o
|
||||
endif
|
||||
endif
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
ENGINEOBJS+= $(OBJ)/winlayer.$o $(OBJ)/rawinput.$o
|
||||
endif
|
||||
|
||||
OURCOMMONFLAGS+= $(BUILDCOMMONFLAGS)
|
||||
|
||||
COMPILER=$(CC) $(OURCONLYFLAGS)
|
||||
LINKER=$(L_CC)
|
||||
ifneq ($(CPLUSPLUS),0)
|
||||
COMPILER=$(CXX) $(OURCXXFLAGS)
|
||||
LINKER=$(L_CXX)
|
||||
endif
|
||||
|
||||
.SILENT:
|
||||
.PHONY: clean cleanutils veryclean all utils dxutils sdlutils printutils printsdlutils printdxutils enginelib editorlib
|
||||
|
||||
# TARGETS
|
||||
|
||||
UTILOBJS=$(OBJ)/kextract.$o $(OBJ)/kgroup.$o $(OBJ)/transpal.$o $(OBJ)/wad2art.$o $(OBJ)/wad2map.$o $(OBJ)/kmd2tool.$o \
|
||||
$(OBJ)/md2tool.$o \
|
||||
$(OBJ)/generateicon.$o $(OBJ)/cacheinfo.$o $(OBJ)/arttool.$o $(OBJ)/givedepth.$o $(OBJ)/mkpalette.$o \
|
||||
$(OBJ)/unpackssi.$o $(OBJ)/bsuite.$o \
|
||||
$(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(OBJ)/pragmas.$o $(OBJ)/kplib.$o $(OBJ)/cache1d.$o
|
||||
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) kmd2tool$(EXESUFFIX) \
|
||||
md2tool$(EXESUFFIX) \
|
||||
generateicon$(EXESUFFIX) cacheinfo$(EXESUFFIX) arttool$(EXESUFFIX) givedepth$(EXESUFFIX) mkpalette$(EXESUFFIX) \
|
||||
unpackssi$(EXESUFFIX) bsuite$(EXESUFFIX)
|
||||
|
||||
DXUTILOBJS=$(OBJ)/enumdisplay.$o $(OBJ)/getdxdidf.$o
|
||||
DXUTILS=enumdisplay$(EXESUFFIX) getdxdidf$(EXESUFFIX)
|
||||
|
||||
SDLUTILOBJS=$(OBJ)/makesdlkeytrans.$o
|
||||
SDLUTILS=makesdlkeytrans$(EXESUFFIX)
|
||||
|
||||
# all: $(OBJ)/$(ENGINELIB) $(OBJ)/$(EDITORLIB)
|
||||
utils: start $(UTILS) finish
|
||||
@ls -l $(UTILS)
|
||||
|
||||
dxutils: start $(DXUTILS) finish
|
||||
@ls -l $(DXUTILS)
|
||||
|
||||
sdlutils: start $(SDLUTILS) finish
|
||||
@ls -l $(SDLUTILS)
|
||||
|
||||
start:
|
||||
$(BUILD_STARTED)
|
||||
|
||||
finish:
|
||||
$(BUILD_FINISHED)
|
||||
|
||||
enginelib: $(OBJ)/$(ENGINELIB)
|
||||
$(OBJ)/$(ENGINELIB): $(ENGINEOBJS)
|
||||
$(BUILD_ECHOFLAGS)
|
||||
$(ARCHIVE_STATUS)
|
||||
if $(AR) rc $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
|
||||
$(RANLIB) $@
|
||||
|
||||
editorlib: $(OBJ)/$(EDITORLIB)
|
||||
$(OBJ)/$(EDITORLIB): $(EDITOROBJS)
|
||||
$(BUILD_ECHOFLAGS)
|
||||
$(ARCHIVE_STATUS)
|
||||
if $(AR) rc $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
|
||||
$(RANLIB) $@
|
||||
|
||||
#pragmacheck$(EXESUFFIX): $(OBJ)/pragmacheck.$o $(OBJ)/pragmas.$o
|
||||
# $(CC) $(subst -Dmain=app_main,,$(OURCFLAGS)) -o $@ $^
|
||||
|
||||
kextract$(EXESUFFIX): $(OBJ)/kextract.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
kgroup$(EXESUFFIX): $(OBJ)/kgroup.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
transpal$(EXESUFFIX): $(OBJ)/transpal.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
wad2art$(EXESUFFIX): $(OBJ)/wad2art.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
wad2map$(EXESUFFIX): $(OBJ)/wad2map.$o $(OBJ)/pragmas.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
kmd2tool$(EXESUFFIX): $(OBJ)/kmd2tool.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
md2tool$(EXESUFFIX): $(OBJ)/md2tool.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
generateicon$(EXESUFFIX): $(OBJ)/generateicon.$o $(OBJ)/compat.$o $(OBJ)/pragmas.$o $(OBJ)/kplib.$o \
|
||||
$(OBJ)/cache1d.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
cacheinfo$(EXESUFFIX): $(OBJ)/cacheinfo.$o $(OBJ)/compat.$o $(OBJ)/compat_tools.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
enumdisplay$(EXESUFFIX): $(OBJ)/enumdisplay.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT) -I$(DXROOT)/include -lgdi32; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
getdxdidf$(EXESUFFIX): $(OBJ)/getdxdidf.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(DXROOT) -I$(DXROOT)/include -ldinput; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
makesdlkeytrans$(EXESUFFIX): $(OBJ)/makesdlkeytrans.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS) -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL; then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
arttool$(EXESUFFIX): $(OBJ)/arttool.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(L_CXX) -o $@ $^ $(OURLDFLAGS) $(STATICSTDCPP) $(STDCPPLIB) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
givedepth$(EXESUFFIX): $(OBJ)/givedepth.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
mkpalette$(EXESUFFIX): $(OBJ)/mkpalette.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
unpackssi$(EXESUFFIX): $(OBJ)/unpackssi.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
bsuite$(EXESUFFIX): $(OBJ)/bsuite.$o $(UTILADDOBJS)
|
||||
$(ONESTEP_STATUS)
|
||||
if $(LINKER) -o $@ $^ $(OURLDFLAGS) $(UTILLIBS); then $(ONESTEP_OK); else $(ONESTEP_FAILED); fi
|
||||
|
||||
# DEPENDENCIES
|
||||
include Makefile.deps
|
||||
|
||||
# RULES
|
||||
$(OBJ)/%.$o: $(SRC)/%.nasm
|
||||
$(COMPILE_STATUS)
|
||||
if $(AS) $(OURASFLAGS) $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
# TODO: Makefile vars...
|
||||
$(OBJ)/%.$o: $(SRC)/%.yasm
|
||||
$(COMPILE_STATUS)
|
||||
if yasm -f elf64 $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
# Comment out the following rule to debug a-c.o
|
||||
$(OBJ)/a-c.$o: $(SRC)/a-c.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(subst -O$(OPTLEVEL),-O2,$(subst $(CLANG_DEBUG_FLAGS),,$(OURCFLAGS))) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.m
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.cc
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.cpp
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/%.cxx
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/misc/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/misc/%.rc
|
||||
$(COMPILE_STATUS)
|
||||
if $(RC) -i $< -o $@ --include-dir=$(INC) --include-dir=$(SRC); then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/util/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/util/%.cc
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/util/%.cpp
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(SRC)/util/%.cxx
|
||||
$(COMPILE_STATUS)
|
||||
if $(CXX) $(OURCXXFLAGS) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/%.$o: $(RSRC)/%.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
libcache1d.so: $(SRC)/cache1d.c
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) -Wall -Wextra -DCACHE1D_COMPRESS_ONLY -shared -fPIC $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
$(OBJ)/editor_banner.$o: $(RSRC)/editor_banner.c
|
||||
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
|
||||
echo "extern const GdkPixdata startbanner_pixdata;" >> $@
|
||||
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
|
||||
$(RSRC)/editor_banner.c: $(RSRC)/build.bmp
|
||||
echo "#include <gdk-pixbuf/gdk-pixdata.h>" > $@
|
||||
echo "extern const GdkPixdata startbanner_pixdata;" >> $@
|
||||
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $^ | sed 's/load_inc//' >> $@
|
||||
|
||||
# PHONIES
|
||||
|
||||
clean:
|
||||
-rm -f $(OBJ)/*
|
||||
echo -n "" > $(OBJ)/keep.me
|
||||
|
||||
cleanutils:
|
||||
-rm -f $(UTILS) $(UTILOBJS) $(DXUTILS) $(DXUTILOBJS) $(SDLUTILS) $(SDLUTILOBJS) $(UTILADDOBJS)
|
||||
|
||||
veryclean: clean cleanutils
|
||||
-rm -f $(ENGINELIB) $(EDITORLIB)
|
||||
|
||||
printutils:
|
||||
echo "$(UTILS)"
|
||||
|
||||
printdxutils:
|
||||
echo "$(DXUTILS)"
|
||||
|
||||
printsdlutils:
|
||||
echo "$(SDLUTILS)"
|
||||
|
||||
.PHONY: fixlineends
|
||||
fixlineends:
|
||||
for a in `find . -type f \( -name '*.c' -o -name '*.h' -o -name 'Makefile*' \) \! -path '*/.svn/*'`; do \
|
||||
echo Fixing $$a && tr -d "\015" < $$a > $$a.fix && mv $$a.fix $$a; \
|
||||
done
|
||||
|
||||
# DO NOT DELETE
|
||||
|
||||
|
|
@ -1,62 +1,62 @@
|
|||
# Build Engine dependencies
|
||||
#
|
||||
$(OBJ)/a-c.$o: $(SRC)/a-c.c $(INC)/a.h
|
||||
$(OBJ)/a.$o: $(SRC)/a.$(asm)
|
||||
$(OBJ)/baselayer.$o: $(SRC)/baselayer.c $(INC)/compat.h $(INC)/baselayer.h $(INC)/build.h $(INC)/osd.h
|
||||
$(OBJ)/build.$o: $(SRC)/build.c $(INC)/build.h $(INC)/pragmas.h $(INC)/compat.h $(INC)/baselayer.h $(INC)/editor.h
|
||||
$(OBJ)/cache1d.$o: $(SRC)/cache1d.c $(INC)/compat.h $(INC)/cache1d.h $(INC)/pragmas.h $(INC)/baselayer.h
|
||||
$(OBJ)/compat.$o: $(SRC)/compat.c $(INC)/compat.h
|
||||
$(OBJ)/config.$o: $(SRC)/config.c $(INC)/compat.h $(INC)/osd.h $(INC)/editor.h
|
||||
$(OBJ)/crc32.$o: $(SRC)/crc32.c $(INC)/crc32.h
|
||||
$(OBJ)/defs.$o: $(SRC)/defs.c $(INC)/build.h $(INC)/baselayer.h $(INC)/scriptfile.h $(INC)/compat.h
|
||||
$(OBJ)/engine.$o: $(SRC)/engine.c $(INC)/compat.h $(INC)/build.h $(INC)/pragmas.h $(INC)/cache1d.h $(INC)/a.h $(INC)/osd.h $(INC)/baselayer.h $(SRC)/engine_priv.h $(SRC)/engine_oldmap.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h $(INC)/polymer.h
|
||||
$(OBJ)/polymost.$o: $(SRC)/polymost.c $(INC)/lz4.h $(INC)/lzwnew.h $(INC)/compat.h $(INC)/build.h $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h $(INC)/texcache.h
|
||||
$(OBJ)/texcache.$o: $(SRC)/texcache.c $(INC)/texcache.h $(INC)/polymost.h $(INC)/dxtfilter.h
|
||||
$(OBJ)/dxtfilter.$o: $(SRC)/dxtfilter.c $(INC)/dxtfilter.h $(INC)/texcache.h
|
||||
$(OBJ)/hightile.$o: $(SRC)/hightile.c $(INC)/kplib.h $(INC)/hightile.h
|
||||
$(OBJ)/mdsprite.$o: $(SRC)/mdsprite.c $(SRC)/engine_priv.h $(INC)/polymost.h $(INC)/hightile.h $(INC)/mdsprite.h $(INC)/texcache.h
|
||||
$(OBJ)/textfont.$o: $(SRC)/textfont.c
|
||||
$(OBJ)/smalltextfont.$o: $(SRC)/smalltextfont.c
|
||||
$(OBJ)/glbuild.$o: $(SRC)/glbuild.c $(INC)/glbuild.h $(INC)/baselayer.h
|
||||
$(OBJ)/kplib.$o: $(SRC)/kplib.c $(INC)/compat.h
|
||||
$(OBJ)/lz4.$o: $(SRC)/lz4.c $(INC)/lz4.h
|
||||
$(OBJ)/lzwnew.$o: $(SRC)/lzwnew.c
|
||||
$(OBJ)/osd.$o: $(SRC)/osd.c $(INC)/build.h $(INC)/osd.h $(INC)/compat.h $(INC)/baselayer.h
|
||||
$(OBJ)/pragmas.$o: $(SRC)/pragmas.c $(INC)/compat.h
|
||||
$(OBJ)/scriptfile.$o: $(SRC)/scriptfile.c $(INC)/scriptfile.h $(INC)/cache1d.h $(INC)/compat.h
|
||||
$(OBJ)/sdlayer.$o: $(SRC)/sdlayer.c $(INC)/compat.h $(INC)/sdlayer.h $(INC)/baselayer.h $(INC)/cache1d.h $(INC)/pragmas.h $(INC)/a.h $(INC)/build.h $(INC)/osd.h $(INC)/glbuild.h
|
||||
$(OBJ)/winlayer.$o: $(SRC)/winlayer.c $(INC)/compat.h $(INC)/winlayer.h $(INC)/baselayer.h $(INC)/pragmas.h $(INC)/build.h $(INC)/a.h $(INC)/osd.h $(INC)/dxdidf.h $(INC)/glbuild.h $(INC)/rawinput.h $(INC)/winbits.h
|
||||
$(OBJ)/gtkbits.$o: $(SRC)/gtkbits.c $(INC)/baselayer.h $(INC)/build.h $(INC)/dynamicgtk.h
|
||||
$(OBJ)/dynamicgtk.$o: $(SRC)/dynamicgtk.c $(INC)/dynamicgtk.h
|
||||
$(OBJ)/polymer.$o: $(SRC)/polymer.c $(INC)/polymer.h $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/osd.h $(INC)/pragmas.h $(INC)/mdsprite.h $(INC)/polymost.h
|
||||
$(OBJ)/mutex.$o: $(SRC)/mutex.c $(INC)/mutex.h
|
||||
$(OBJ)/rawinput.$o: $(SRC)/rawinput.c $(INC)/rawinput.h
|
||||
$(OBJ)/winbits.$o: $(SRC)/winbits.c $(INC)/winbits.h
|
||||
$(OBJ)/xxhash.$o: $(SRC)/xxhash.c $(INC)/xxhash.h
|
||||
$(ENGINE_OBJ)/a-c.$o: $(ENGINE_SRC)/a-c.c $(ENGINE_INC)/a.h
|
||||
$(ENGINE_OBJ)/a.$o: $(ENGINE_SRC)/a.$(asm)
|
||||
$(ENGINE_OBJ)/baselayer.$o: $(ENGINE_SRC)/baselayer.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/build.h $(ENGINE_INC)/osd.h
|
||||
$(ENGINE_OBJ)/build.$o: $(ENGINE_SRC)/build.c $(ENGINE_INC)/build.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/editor.h
|
||||
$(ENGINE_OBJ)/cache1d.$o: $(ENGINE_SRC)/cache1d.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/baselayer.h
|
||||
$(ENGINE_OBJ)/compat.$o: $(ENGINE_SRC)/compat.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/config.$o: $(ENGINE_SRC)/config.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/editor.h
|
||||
$(ENGINE_OBJ)/crc32.$o: $(ENGINE_SRC)/crc32.c $(ENGINE_INC)/crc32.h
|
||||
$(ENGINE_OBJ)/defs.$o: $(ENGINE_SRC)/defs.c $(ENGINE_INC)/build.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/scriptfile.h $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/engine.$o: $(ENGINE_SRC)/engine.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/a.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/baselayer.h $(ENGINE_SRC)/engine_priv.h $(ENGINE_SRC)/engine_oldmap.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/polymer.h
|
||||
$(ENGINE_OBJ)/polymost.$o: $(ENGINE_SRC)/polymost.c $(ENGINE_INC)/lz4.h $(ENGINE_INC)/lzwnew.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_SRC)/engine_priv.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/texcache.h
|
||||
$(ENGINE_OBJ)/texcache.$o: $(ENGINE_SRC)/texcache.c $(ENGINE_INC)/texcache.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/dxtfilter.h
|
||||
$(ENGINE_OBJ)/dxtfilter.$o: $(ENGINE_SRC)/dxtfilter.c $(ENGINE_INC)/dxtfilter.h $(ENGINE_INC)/texcache.h
|
||||
$(ENGINE_OBJ)/hightile.$o: $(ENGINE_SRC)/hightile.c $(ENGINE_INC)/kplib.h $(ENGINE_INC)/hightile.h
|
||||
$(ENGINE_OBJ)/mdsprite.$o: $(ENGINE_SRC)/mdsprite.c $(ENGINE_SRC)/engine_priv.h $(ENGINE_INC)/polymost.h $(ENGINE_INC)/hightile.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/texcache.h
|
||||
$(ENGINE_OBJ)/textfont.$o: $(ENGINE_SRC)/textfont.c
|
||||
$(ENGINE_OBJ)/smalltextfont.$o: $(ENGINE_SRC)/smalltextfont.c
|
||||
$(ENGINE_OBJ)/glbuild.$o: $(ENGINE_SRC)/glbuild.c $(ENGINE_INC)/glbuild.h $(ENGINE_INC)/baselayer.h
|
||||
$(ENGINE_OBJ)/kplib.$o: $(ENGINE_SRC)/kplib.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/lz4.$o: $(ENGINE_SRC)/lz4.c $(ENGINE_INC)/lz4.h
|
||||
$(ENGINE_OBJ)/lzwnew.$o: $(ENGINE_SRC)/lzwnew.c
|
||||
$(ENGINE_OBJ)/osd.$o: $(ENGINE_SRC)/osd.c $(ENGINE_INC)/build.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/baselayer.h
|
||||
$(ENGINE_OBJ)/pragmas.$o: $(ENGINE_SRC)/pragmas.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/scriptfile.$o: $(ENGINE_SRC)/scriptfile.c $(ENGINE_INC)/scriptfile.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/sdlayer.$o: $(ENGINE_SRC)/sdlayer.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/sdlayer.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/a.h $(ENGINE_INC)/build.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/glbuild.h
|
||||
$(ENGINE_OBJ)/winlayer.$o: $(ENGINE_SRC)/winlayer.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/winlayer.h $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/build.h $(ENGINE_INC)/a.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/dxdidf.h $(ENGINE_INC)/glbuild.h $(ENGINE_INC)/rawinput.h $(ENGINE_INC)/winbits.h
|
||||
$(ENGINE_OBJ)/gtkbits.$o: $(ENGINE_SRC)/gtkbits.c $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/build.h $(ENGINE_INC)/dynamicgtk.h
|
||||
$(ENGINE_OBJ)/dynamicgtk.$o: $(ENGINE_SRC)/dynamicgtk.c $(ENGINE_INC)/dynamicgtk.h
|
||||
$(ENGINE_OBJ)/polymer.$o: $(ENGINE_SRC)/polymer.c $(ENGINE_INC)/polymer.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/glbuild.h $(ENGINE_INC)/osd.h $(ENGINE_INC)/pragmas.h $(ENGINE_INC)/mdsprite.h $(ENGINE_INC)/polymost.h
|
||||
$(ENGINE_OBJ)/mutex.$o: $(ENGINE_SRC)/mutex.c $(ENGINE_INC)/mutex.h
|
||||
$(ENGINE_OBJ)/rawinput.$o: $(ENGINE_SRC)/rawinput.c $(ENGINE_INC)/rawinput.h
|
||||
$(ENGINE_OBJ)/winbits.$o: $(ENGINE_SRC)/winbits.c $(ENGINE_INC)/winbits.h
|
||||
$(ENGINE_OBJ)/xxhash.$o: $(ENGINE_SRC)/xxhash.c $(ENGINE_INC)/xxhash.h
|
||||
|
||||
$(OBJ)/lunatic.$o: $(SRC)/lunatic.c $(INC)/lunatic.h $(INC)/cache1d.h $(INC)/osd.h
|
||||
$(ENGINE_OBJ)/lunatic.$o: $(ENGINE_SRC)/lunatic.c $(ENGINE_INC)/lunatic.h $(ENGINE_INC)/cache1d.h $(ENGINE_INC)/osd.h
|
||||
|
||||
$(OBJ)/buildres.$(res): $(SRC)/misc/buildres.rc $(INC)/startwin.editor.h
|
||||
$(OBJ)/startwin.editor.$o: $(SRC)/startwin.editor.c $(INC)/build.h $(INC)/editor.h $(INC)/winlayer.h $(INC)/compat.h $(INC)/startwin.editor.h
|
||||
$(OBJ)/startgtk.editor.$o: $(SRC)/startgtk.editor.c $(INC)/baselayer.h $(INC)/build.h $(INC)/editor.h $(INC)/compat.h
|
||||
$(ENGINE_OBJ)/buildres.$(res): $(ENGINE_SRC)/misc/buildres.rc $(ENGINE_INC)/startwin.editor.h
|
||||
$(ENGINE_OBJ)/startwin.editor.$o: $(ENGINE_SRC)/startwin.editor.c $(ENGINE_INC)/build.h $(ENGINE_INC)/editor.h $(ENGINE_INC)/winlayer.h $(ENGINE_INC)/compat.h $(ENGINE_INC)/startwin.editor.h
|
||||
$(ENGINE_OBJ)/startgtk.editor.$o: $(ENGINE_SRC)/startgtk.editor.c $(ENGINE_INC)/baselayer.h $(ENGINE_INC)/build.h $(ENGINE_INC)/editor.h $(ENGINE_INC)/compat.h
|
||||
|
||||
$(OBJ)/build_icon.$o: $(RSRC)/build_icon.c
|
||||
$(ENGINE_OBJ)/build_icon.$o: $(DUKE3D_RSRC)/build_icon.c
|
||||
|
||||
$(OBJ)/compat_tools.$o: $(SRC)/util/compat_tools.c
|
||||
$(OBJ)/kextract.$o: $(SRC)/util/kextract.c $(INC)/compat.h
|
||||
$(OBJ)/kgroup.$o: $(SRC)/util/kgroup.c $(INC)/compat.h
|
||||
$(OBJ)/transpal.$o: $(SRC)/util/transpal.c $(INC)/compat.h $(INC)/pragmas.h
|
||||
$(OBJ)/wad2art.$o: $(SRC)/util/wad2art.c $(INC)/compat.h $(INC)/pragmas.h
|
||||
$(OBJ)/wad2map.$o: $(SRC)/util/wad2map.c $(INC)/compat.h $(INC)/pragmas.h
|
||||
$(OBJ)/kmd2tool.$o: $(SRC)/util/kmd2tool.c $(INC)/compat.h
|
||||
$(OBJ)/md2tool.$o: $(SRC)/util/md2tool.c $(INC)/compat.h $(INC)/build.h $(INC)/glbuild.h $(INC)/mdsprite.h
|
||||
$(OBJ)/generateicon.$o: $(SRC)/util/generateicon.c $(INC)/kplib.h $(INC)/compat.h
|
||||
$(OBJ)/cacheinfo.$o: $(SRC)/util/cacheinfo.c $(INC)/compat.h
|
||||
$(OBJ)/enumdisplay.$o: $(SRC)/misc/enumdisplay.c $(INC)/compat.h
|
||||
$(OBJ)/getdxdidf.$o: $(SRC)/misc/getdxdidf.c $(INC)/compat.h
|
||||
$(OBJ)/makesdlkeytrans.$o: $(SRC)/misc/makesdlkeytrans.c
|
||||
$(OBJ)/arttool.$o: $(SRC)/util/arttool.cc
|
||||
$(OBJ)/givedepth.$o: $(SRC)/util/givedepth.c
|
||||
$(OBJ)/mkpalette.$o: $(SRC)/util/mkpalette.c
|
||||
$(OBJ)/unpackssi.$o: $(SRC)/util/unpackssi.c
|
||||
$(OBJ)/bsuite.$o: $(SRC)/util/bsuite.c
|
||||
$(ENGINE_OBJ)/compat_tools.$o: $(ENGINE_SRC)/util/compat_tools.c
|
||||
$(ENGINE_OBJ)/kextract.$o: $(ENGINE_SRC)/util/kextract.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/kgroup.$o: $(ENGINE_SRC)/util/kgroup.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/transpal.$o: $(ENGINE_SRC)/util/transpal.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/pragmas.h
|
||||
$(ENGINE_OBJ)/wad2art.$o: $(ENGINE_SRC)/util/wad2art.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/pragmas.h
|
||||
$(ENGINE_OBJ)/wad2map.$o: $(ENGINE_SRC)/util/wad2map.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/pragmas.h
|
||||
$(ENGINE_OBJ)/kmd2tool.$o: $(ENGINE_SRC)/util/kmd2tool.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/md2tool.$o: $(ENGINE_SRC)/util/md2tool.c $(ENGINE_INC)/compat.h $(ENGINE_INC)/build.h $(ENGINE_INC)/glbuild.h $(ENGINE_INC)/mdsprite.h
|
||||
$(ENGINE_OBJ)/generateicon.$o: $(ENGINE_SRC)/util/generateicon.c $(ENGINE_INC)/kplib.h $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/cacheinfo.$o: $(ENGINE_SRC)/util/cacheinfo.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/enumdisplay.$o: $(ENGINE_SRC)/misc/enumdisplay.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/getdxdidf.$o: $(ENGINE_SRC)/misc/getdxdidf.c $(ENGINE_INC)/compat.h
|
||||
$(ENGINE_OBJ)/makesdlkeytrans.$o: $(ENGINE_SRC)/misc/makesdlkeytrans.c
|
||||
$(ENGINE_OBJ)/arttool.$o: $(ENGINE_SRC)/util/arttool.cc
|
||||
$(ENGINE_OBJ)/givedepth.$o: $(ENGINE_SRC)/util/givedepth.c
|
||||
$(ENGINE_OBJ)/mkpalette.$o: $(ENGINE_SRC)/util/mkpalette.c
|
||||
$(ENGINE_OBJ)/unpackssi.$o: $(ENGINE_SRC)/util/unpackssi.c
|
||||
$(ENGINE_OBJ)/bsuite.$o: $(ENGINE_SRC)/util/bsuite.c
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
RENDERTYPE=WIN
|
||||
!endif
|
||||
|
||||
SRC=src
|
||||
!ifndef OBJ
|
||||
OBJ=obj.msc
|
||||
ENGINE_SRC=src
|
||||
!ifndef ENGINE_OBJ
|
||||
ENGINE_OBJ=obj.msc
|
||||
!endif
|
||||
INC=include\ #
|
||||
ENGINE_INC=include\ #
|
||||
!ifndef CFLAGS
|
||||
CFLAGS=/DUSE_OPENGL /DPOLYMER /DUSE_LIBPNG
|
||||
!endif
|
||||
|
@ -60,7 +60,7 @@ CC=cl
|
|||
AS=ml
|
||||
RC=rc
|
||||
LINK=link /opt:ref /nologo
|
||||
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(INC)
|
||||
CFLAGS=$(CFLAGS) /nologo /MT /J $(flags_cl) $(TARGETOPTS) /I$(ENGINE_INC)
|
||||
ASFLAGS=/nologo /coff /c
|
||||
EXESUFFIX=.exe
|
||||
!ifdef DEBUG
|
||||
|
@ -69,44 +69,44 @@ CFLAGS=$(CFLAGS) /DDEBUGGINGAIDS /D "_CRT_SECURE_NO_DEPRECATE"
|
|||
|
||||
ENGINEOBJS= \
|
||||
!ifdef NOASM
|
||||
$(OBJ)\a-c.$o \
|
||||
$(ENGINE_OBJ)\a-c.$o \
|
||||
!else
|
||||
$(OBJ)\a.$o \
|
||||
$(ENGINE_OBJ)\a.$o \
|
||||
!endif
|
||||
$(OBJ)\baselayer.$o \
|
||||
$(OBJ)\cache1d.$o \
|
||||
$(OBJ)\compat.$o \
|
||||
$(OBJ)\crc32.$o \
|
||||
$(OBJ)\defs.$o \
|
||||
$(OBJ)\engine.$o \
|
||||
$(OBJ)\polymost.$o \
|
||||
$(OBJ)\texcache.$o \
|
||||
$(OBJ)\dxtfilter.$o \
|
||||
$(OBJ)\hightile.$o \
|
||||
$(OBJ)\mdsprite.$o \
|
||||
$(OBJ)\textfont.$o \
|
||||
$(OBJ)\smalltextfont.$o \
|
||||
$(OBJ)\glbuild.$o \
|
||||
$(OBJ)\kplib.$o \
|
||||
$(OBJ)\lz4.$o \
|
||||
$(OBJ)\lzwnew.$o \
|
||||
$(OBJ)\osd.$o \
|
||||
$(OBJ)\pragmas.$o \
|
||||
$(OBJ)\scriptfile.$o \
|
||||
$(OBJ)\polymer.$o \
|
||||
$(OBJ)\mutex.$o \
|
||||
$(OBJ)\winbits.$o \
|
||||
$(OBJ)\xxhash.$o
|
||||
$(ENGINE_OBJ)\baselayer.$o \
|
||||
$(ENGINE_OBJ)\cache1d.$o \
|
||||
$(ENGINE_OBJ)\compat.$o \
|
||||
$(ENGINE_OBJ)\crc32.$o \
|
||||
$(ENGINE_OBJ)\defs.$o \
|
||||
$(ENGINE_OBJ)\engine.$o \
|
||||
$(ENGINE_OBJ)\polymost.$o \
|
||||
$(ENGINE_OBJ)\texcache.$o \
|
||||
$(ENGINE_OBJ)\dxtfilter.$o \
|
||||
$(ENGINE_OBJ)\hightile.$o \
|
||||
$(ENGINE_OBJ)\mdsprite.$o \
|
||||
$(ENGINE_OBJ)\textfont.$o \
|
||||
$(ENGINE_OBJ)\smalltextfont.$o \
|
||||
$(ENGINE_OBJ)\glbuild.$o \
|
||||
$(ENGINE_OBJ)\kplib.$o \
|
||||
$(ENGINE_OBJ)\lz4.$o \
|
||||
$(ENGINE_OBJ)\lzwnew.$o \
|
||||
$(ENGINE_OBJ)\osd.$o \
|
||||
$(ENGINE_OBJ)\pragmas.$o \
|
||||
$(ENGINE_OBJ)\scriptfile.$o \
|
||||
$(ENGINE_OBJ)\polymer.$o \
|
||||
$(ENGINE_OBJ)\mutex.$o \
|
||||
$(ENGINE_OBJ)\winbits.$o \
|
||||
$(ENGINE_OBJ)\xxhash.$o
|
||||
|
||||
EDITOROBJS=$(OBJ)\build.$o \
|
||||
$(OBJ)\startwin.editor.$o \
|
||||
$(OBJ)\config.$o
|
||||
EDITOROBJS=$(ENGINE_OBJ)\build.$o \
|
||||
$(ENGINE_OBJ)\startwin.editor.$o \
|
||||
$(ENGINE_OBJ)\config.$o
|
||||
|
||||
!if ("$(RENDERTYPE)"=="WIN")
|
||||
ENGINEOBJS=$(ENGINEOBJS) $(OBJ)\winlayer.$o $(OBJ)\rawinput.$o
|
||||
ENGINEOBJS=$(ENGINEOBJS) $(ENGINE_OBJ)\winlayer.$o $(ENGINE_OBJ)\rawinput.$o
|
||||
!endif
|
||||
!if ("$(RENDERTYPE)"=="SDL")
|
||||
ENGINEOBJS=$(ENGINEOBJS) $(OBJ)\sdlayer.$o
|
||||
ENGINEOBJS=$(ENGINEOBJS) $(ENGINE_OBJ)\sdlayer.$o
|
||||
!endif
|
||||
|
||||
LIBS=$(LIBS) user32.lib gdi32.lib shell32.lib wsock32.lib comctl32.lib dxguid.lib
|
||||
|
@ -115,98 +115,95 @@ CFLAGS=$(CFLAGS) /DRENDERTYPE$(RENDERTYPE)=1 /DSDL_FRAMEWORK /DSDL_TARGET=2 /W2
|
|||
# RULES
|
||||
.SUFFIXES: .masm
|
||||
|
||||
{$(SRC)}.masm{$(OBJ)}.$o:
|
||||
{$(ENGINE_SRC)}.masm{$(ENGINE_OBJ)}.$o:
|
||||
$(AS) /c $(ASFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\tmp}.c{$(OBJ)}.$o:
|
||||
{$(ENGINE_SRC)\util}.c{$(ENGINE_OBJ)}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\util}.c{$(OBJ)}.$o:
|
||||
{$(ENGINE_SRC)\misc}.rc{$(ENGINE_OBJ)}.$(res):
|
||||
$(RC) /i$(ENGINE_INC)\ /fo$@ /r $<
|
||||
|
||||
{$(ENGINE_SRC)}.c{$(ENGINE_OBJ)}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)\misc}.rc{$(OBJ)}.$(res):
|
||||
$(RC) /i$(INC)\ /fo$@ /r $<
|
||||
|
||||
{$(SRC)}.c{$(OBJ)}.$o:
|
||||
{$(ENGINE_SRC)}.cc{$(ENGINE_OBJ)}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)}.cc{$(OBJ)}.$o:
|
||||
{$(ENGINE_SRC)}.cpp{$(ENGINE_OBJ)}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)}.cpp{$(OBJ)}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
{$(SRC)}.cxx{$(OBJ)}.$o:
|
||||
{$(ENGINE_SRC)}.cxx{$(ENGINE_OBJ)}.$o:
|
||||
$(CC) /c $(CFLAGS) /Fo$@ $<
|
||||
|
||||
# TARGETS
|
||||
UTILS=kextract$(EXESUFFIX) kgroup$(EXESUFFIX) transpal$(EXESUFFIX) wad2art$(EXESUFFIX) wad2map$(EXESUFFIX) kmd2tool$(EXESUFFIX) md2tool$(EXESUFFIX) generateicon$(EXESUFFIX) cacheinfo$(EXESUFFIX) arttool$(EXESUFFIX) givedepth$(EXESUFFIX) mkpalette$(EXESUFFIX) unpackssi$(EXESUFFIX) bsuite$(EXESUFFIX)
|
||||
|
||||
all: $(OBJ)\$(ENGINELIB) $(OBJ)\$(EDITORLIB);
|
||||
all: $(ENGINE_OBJ)\$(ENGINELIB) $(ENGINE_OBJ)\$(EDITORLIB);
|
||||
utils: $(UTILS) ;
|
||||
|
||||
enginelib: $(OBJ)\$(ENGINELIB) ;
|
||||
$(OBJ)\$(ENGINELIB): $(ENGINEOBJS)
|
||||
enginelib: $(ENGINE_OBJ)\$(ENGINELIB) ;
|
||||
$(ENGINE_OBJ)\$(ENGINELIB): $(ENGINEOBJS)
|
||||
lib $(flags_lib) /out:$@ /nologo $**
|
||||
|
||||
editorlib: $(OBJ)\$(EDITORLIB) ;
|
||||
$(OBJ)\$(EDITORLIB): $(EDITOROBJS)
|
||||
editorlib: $(ENGINE_OBJ)\$(EDITORLIB) ;
|
||||
$(ENGINE_OBJ)\$(EDITORLIB): $(EDITOROBJS)
|
||||
lib $(flags_lib) /out:$@ /nologo $**
|
||||
|
||||
# the tools
|
||||
kextract$(EXESUFFIX): $(OBJ)\kextract.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o
|
||||
kextract$(EXESUFFIX): $(ENGINE_OBJ)\kextract.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
kgroup$(EXESUFFIX): $(OBJ)\kgroup.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o
|
||||
kgroup$(EXESUFFIX): $(ENGINE_OBJ)\kgroup.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
transpal$(EXESUFFIX): $(OBJ)\transpal.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o
|
||||
transpal$(EXESUFFIX): $(ENGINE_OBJ)\transpal.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
wad2map$(EXESUFFIX): $(OBJ)\wad2map.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o
|
||||
wad2map$(EXESUFFIX): $(ENGINE_OBJ)\wad2map.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
wad2art$(EXESUFFIX): $(OBJ)\wad2art.$o $(OBJ)\pragmas.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o
|
||||
wad2art$(EXESUFFIX): $(ENGINE_OBJ)\wad2art.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
kmd2tool$(EXESUFFIX): $(OBJ)\kmd2tool.$o
|
||||
kmd2tool$(EXESUFFIX): $(ENGINE_OBJ)\kmd2tool.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
md2tool$(EXESUFFIX): $(OBJ)\md2tool.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o
|
||||
md2tool$(EXESUFFIX): $(ENGINE_OBJ)\md2tool.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
generateicon$(EXESUFFIX): $(OBJ)\generateicon.$o $(OBJ)\compat.$o $(OBJ)\pragmas.$o $(OBJ)\kplib.$o $(OBJ)\cache1d.$o $(OBJ)\compat_tools.$o
|
||||
generateicon$(EXESUFFIX): $(ENGINE_OBJ)\generateicon.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\kplib.$o $(ENGINE_OBJ)\cache1d.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
cacheinfo$(EXESUFFIX): $(OBJ)\cacheinfo.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o
|
||||
cacheinfo$(EXESUFFIX): $(ENGINE_OBJ)\cacheinfo.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
arttool$(EXESUFFIX): $(OBJ)\arttool.$o
|
||||
arttool$(EXESUFFIX): $(ENGINE_OBJ)\arttool.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
givedepth$(EXESUFFIX): $(OBJ)\givedepth.$o
|
||||
givedepth$(EXESUFFIX): $(ENGINE_OBJ)\givedepth.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
mkpalette$(EXESUFFIX): $(OBJ)\mkpalette.$o
|
||||
mkpalette$(EXESUFFIX): $(ENGINE_OBJ)\mkpalette.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
unpackssi$(EXESUFFIX): $(OBJ)\unpackssi.$o
|
||||
unpackssi$(EXESUFFIX): $(ENGINE_OBJ)\unpackssi.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
bsuite$(EXESUFFIX): $(OBJ)\bsuite.$o
|
||||
bsuite$(EXESUFFIX): $(ENGINE_OBJ)\bsuite.$o
|
||||
$(LINK) /OUT:$@ /SUBSYSTEM:CONSOLE $(flags_link) /MAP $** $(LIBS)
|
||||
$(MT) -manifest $@.manifest -outputresource:$@
|
||||
|
||||
|
@ -215,7 +212,7 @@ bsuite$(EXESUFFIX): $(OBJ)\bsuite.$o
|
|||
|
||||
# PHONIES
|
||||
clean:
|
||||
-del /Q $(ENGINEOBJS) $(EDITOROBJS) $(OBJ)\kextract.$o $(OBJ)\kgroup.$o $(OBJ)\transpal.$o $(OBJ)\wad2art.$o $(OBJ)\wad2map.$o $(OBJ)\kmd2tool.$o $(OBJ)\md2tool.$o $(OBJ)\generateicon.$o $(OBJ)\cacheinfo.$o $(OBJ)\arttool.$o $(OBJ)\givedepth.$o $(OBJ)\mkpalette.$o $(OBJ)\unpackssi.$o $(OBJ)\bsuite.$o $(OBJ)\compat.$o $(OBJ)\compat_tools.$o $(OBJ)\pragmas.$o $(OBJ)\kplib.$o $(OBJ)\cache1d.$o
|
||||
-del /Q $(ENGINEOBJS) $(EDITOROBJS) $(ENGINE_OBJ)\kextract.$o $(ENGINE_OBJ)\kgroup.$o $(ENGINE_OBJ)\transpal.$o $(ENGINE_OBJ)\wad2art.$o $(ENGINE_OBJ)\wad2map.$o $(ENGINE_OBJ)\kmd2tool.$o $(ENGINE_OBJ)\md2tool.$o $(ENGINE_OBJ)\generateicon.$o $(ENGINE_OBJ)\cacheinfo.$o $(ENGINE_OBJ)\arttool.$o $(ENGINE_OBJ)\givedepth.$o $(ENGINE_OBJ)\mkpalette.$o $(ENGINE_OBJ)\unpackssi.$o $(ENGINE_OBJ)\bsuite.$o $(ENGINE_OBJ)\compat.$o $(ENGINE_OBJ)\compat_tools.$o $(ENGINE_OBJ)\pragmas.$o $(ENGINE_OBJ)\kplib.$o $(ENGINE_OBJ)\cache1d.$o
|
||||
veryclean: clean
|
||||
-del /Q $(OBJ)\$(ENGINELIB) $(OBJ)\$(EDITORLIB) $(UTILS) *.map *.manifest *.pdb
|
||||
-del /Q $(ENGINE_OBJ)\$(ENGINELIB) $(ENGINE_OBJ)\$(EDITORLIB) $(UTILS) *.map *.manifest *.pdb
|
||||
|
||||
|
|
|
@ -1,369 +0,0 @@
|
|||
# Shared make information between Build engine and games
|
||||
|
||||
MAKEFILE_SHARED:=$(lastword $(MAKEFILE_LIST))
|
||||
|
||||
ENGINELIB=libengine.a
|
||||
EDITORLIB=libbuild.a
|
||||
|
||||
|
||||
# SDK locations - adjust to match your setup
|
||||
# Overrides must use absolute paths since this Makefile is included at different directory levels
|
||||
#
|
||||
DXROOT=$(abspath $(dir $(MAKEFILE_COMMON))../sdk/dx)
|
||||
#DXROOT=/c/sdks/directx/dx8
|
||||
SDLROOT=$(abspath $(dir $(MAKEFILE_COMMON))../sdk/SDL)
|
||||
|
||||
DXROOT_OVERRIDE ?=
|
||||
SDLROOT_OVERRIDE ?=
|
||||
ifneq ($(DXROOT_OVERRIDE),)
|
||||
DXROOT=$(DXROOT_OVERRIDE)
|
||||
endif
|
||||
ifneq ($(SDLROOT_OVERRIDE),)
|
||||
SDLROOT=$(SDLROOT_OVERRIDE)
|
||||
endif
|
||||
|
||||
SDL_TARGET ?= 2
|
||||
SDL_FRAMEWORK ?= 1
|
||||
|
||||
ifeq (1,$(strip $(shell expr $(GCC_MAJOR) \>= 4)))
|
||||
L_SSP := -lssp
|
||||
endif
|
||||
|
||||
BUILDCOMMONFLAGS=$(ARCH)
|
||||
BUILDLIBS=
|
||||
BUILDLIBDIRS=
|
||||
|
||||
# NOTE: If your setup doesn't have libstdc++, you can try using libsupc++.
|
||||
# Search for STDCPPLIB below and change it to -lsupc++.
|
||||
|
||||
ifeq ($(SUBPLATFORM),LINUX)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
|
||||
GTKCOMPAT32=0
|
||||
SDL_FRAMEWORK=0
|
||||
|
||||
# On Linux, we don't need to specify libstdc++ manually, the linker will
|
||||
# presumably take care for us.
|
||||
STDCPPLIB:=
|
||||
|
||||
ifeq ($(PLATFORM),GCW)
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
endif
|
||||
ifeq ($(PLATFORM),DINGOO)
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
endif
|
||||
|
||||
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
ifeq (1,$(BUILD32_ON_64))
|
||||
# On my 64bit Gentoo these are the 32bit emulation libs
|
||||
BUILDLIBS+= -m32
|
||||
BUILDLIBDIRS+= -L/emul/linux/x86/usr/lib
|
||||
BUILDCOMMONFLAGS+= -m32
|
||||
# Override WITHOUT_GTK=0
|
||||
GTKCOMPAT32=1
|
||||
else
|
||||
override NOASM=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
RENDERTYPE = SDL
|
||||
MIXERTYPE = SDL
|
||||
STDCPPLIB:=-lstdc++
|
||||
BUILDCOMMONFLAGS += -DHAVE_INTTYPES
|
||||
GTKCOMPAT32 = 0
|
||||
|
||||
ifeq (1,$(DARWIN9))
|
||||
BUILDCOMMONFLAGS += -DDARWIN9
|
||||
endif
|
||||
|
||||
ifeq (1,$(BUILD32_ON_64))
|
||||
ARCH=-arch i386
|
||||
else
|
||||
# ASM won't work on PowerPC or x86_64
|
||||
override NOASM=1
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
# Windows types can be SDL or WIN
|
||||
RENDERTYPE?=SDL
|
||||
MIXERTYPE?=WIN
|
||||
ifneq ($(RENDERTYPE),SDL)
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
MIXERTYPE:=WIN
|
||||
endif
|
||||
endif
|
||||
|
||||
WITHOUT_GTK?=1
|
||||
SDLCONFIG=
|
||||
SDL_FRAMEWORK=1
|
||||
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
|
||||
EXESUFFIX=.exe
|
||||
BUILDLIBS+= -Wl,--enable-auto-import -lmingwex -lgdi32 -lcomctl32 -lwinmm $(L_SSP) -lwsock32 -lws2_32 -lshlwapi
|
||||
ifeq (0,$(CLANG))
|
||||
BUILDLIBS+= -mwindows
|
||||
endif
|
||||
#-lshfolder
|
||||
#BUILDLIBDIRS+= -L$(ENETROOT)
|
||||
STDCPPLIB:=-lstdc++
|
||||
ifeq ($(findstring x86_64,$(SYSARCH)),x86_64)
|
||||
ifneq (1,$(BUILD32_ON_64))
|
||||
override NOASM=1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),BSD)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
BUILDCOMMONFLAGS+= -DHAVE_INTTYPES
|
||||
ifneq ($(findstring i386,$(SYSARCH)),i386)
|
||||
override NOASM=1
|
||||
endif
|
||||
STDCPPLIB:=-lstdc++
|
||||
endif
|
||||
ifeq ($(PLATFORM),BEOS)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
STDCPPLIB:=-lstdc++
|
||||
endif
|
||||
ifeq ($(PLATFORM),SKYOS)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
EXESUFFIX=.app
|
||||
override NOASM=1
|
||||
BUILDCOMMONFLAGS+= -DUNDERSCORES -I/boot/programs/sdk/include/sdl
|
||||
SDLCONFIG=
|
||||
BUILDLIBS+= -lSDL -lnet
|
||||
endif
|
||||
ifeq ($(PLATFORM),WII)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
EXESUFFIX=.elf
|
||||
override USE_OPENGL=0
|
||||
override POLYMER=0
|
||||
override NOASM=1
|
||||
override WITHOUT_GTK=1
|
||||
# -msdata=eabi
|
||||
BUILDCOMMONFLAGS+= -g -mtune=750 -meabi -mhard-float \
|
||||
-DGEKKO -DHAVE_INTTYPES -D__POWERPC__ \
|
||||
-I$(LIBOGC_INC) -I$(PORTLIBS)/include
|
||||
SDLCONFIG=
|
||||
SDL_TARGET=1
|
||||
SDL_FRAMEWORK=1
|
||||
BUILDLIBS+= -lSDL_mixer -lSDL -laesnd_tueidj -lpng -lvorbisidec -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
|
||||
BUILDLIBDIRS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib
|
||||
endif
|
||||
ifeq ($(PLATFORM),QNX)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
STDCPPLIB:=-lstdc++
|
||||
BUILDLIBS+= -lsocket
|
||||
endif
|
||||
ifeq ($(PLATFORM),SUNOS)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
STDCPPLIB:=-lstdc++
|
||||
BUILDLIBS+= -lsocket -lnsl
|
||||
endif
|
||||
ifeq ($(PLATFORM),SYLLABLE)
|
||||
RENDERTYPE=SDL
|
||||
MIXERTYPE=SDL
|
||||
override USE_OPENGL=0
|
||||
override NOASM=1
|
||||
endif
|
||||
|
||||
ifneq (0,$(CLANG))
|
||||
ifneq (,$(STDCPPLIB))
|
||||
STDCPPLIB:=-Xlinker $(STDCPPLIB)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SDL_TARGET),2)
|
||||
SDLCONFIG ?= sdl2-config
|
||||
SDLNAME ?= SDL2
|
||||
endif
|
||||
ifeq ($(SDL_TARGET),1)
|
||||
SDLCONFIG ?= sdl-config
|
||||
SDLNAME ?= SDL
|
||||
endif
|
||||
|
||||
ifneq ($(SDLCONFIG),)
|
||||
SDLVERSION:=$(strip $(shell $(SDLCONFIG) --version))
|
||||
ifneq ($(SDLVERSION),)
|
||||
SDLROOT:=$(strip $(shell $(SDLCONFIG) --prefix))
|
||||
endif
|
||||
endif
|
||||
|
||||
SDL_STATIC?=1
|
||||
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
BUILDCOMMONFLAGS += -DSDL_TARGET=$(SDL_TARGET)
|
||||
|
||||
ifeq ($(SDL_FRAMEWORK),1)
|
||||
BUILDCOMMONFLAGS += -DSDL_FRAMEWORK
|
||||
endif
|
||||
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(SDL_FRAMEWORK),1)
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
BUILDLIBS += -Wl,-framework,SDL
|
||||
BUILDCOMMONFLAGS+= -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers
|
||||
endif
|
||||
else
|
||||
ifneq ($(SDLCONFIG),)
|
||||
SDLCONFIG_COMMONFLAGS:=$(subst -Dmain=SDL_main,,$(strip $(shell $(SDLCONFIG) --cflags)))
|
||||
SDLCONFIG_LIBS:=$(strip $(shell $(SDLCONFIG) --libs))
|
||||
|
||||
BUILDLIBS+= $(SDLCONFIG_LIBS)
|
||||
BUILDCOMMONFLAGS+= $(SDLCONFIG_COMMONFLAGS)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
BUILDCOMMONFLAGS += -D_GNU_SOURCE=1
|
||||
ifneq ($(SDL_STATIC),0)
|
||||
ifneq ($(SDL_TARGET),1) # Since SDL2 is under the zlib license, link statically if possible.
|
||||
BUILDLIBS+= -static
|
||||
endif
|
||||
endif
|
||||
BUILDLIBS+= -l$(SDLNAME)main -l$(SDLNAME) -lmingw32 -lgdi32 -limm32 -lole32 -loleaut32 -lwinmm -lversion
|
||||
endif
|
||||
|
||||
ifeq (1,$(WITHOUT_GTK))
|
||||
HAVE_GTK2=0
|
||||
else
|
||||
ifneq (No,$(shell pkg-config --exists gtk+-2.0 || echo No))
|
||||
HAVE_GTK2=1
|
||||
# On my 64bit Gentoo box I have Cairo enabled which means the libs list includes
|
||||
# -lpangocairo-1.0 and -lcairo, however the 32bit compatibility libraries don't
|
||||
# include cairo, so we need to filter out those -l switches in order to link
|
||||
ifneq ($(LINKED_GTK),0)
|
||||
ifeq ($(GTKCOMPAT32),1)
|
||||
BUILDLIBS+= $(shell pkg-config --libs gtk+-2.0 | sed 's/\s-l\(pango\)\{0,1\}cairo\S*\s/ /g')
|
||||
else
|
||||
BUILDLIBS+= $(shell pkg-config --libs gtk+-2.0)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
HAVE_GTK2=0
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
ifeq ($(RENDERTYPE),WIN)
|
||||
BUILDLIBS+= -ldxguid
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(MIXERTYPE),WIN)
|
||||
ifeq ($(RENDERTYPE),SDL)
|
||||
BUILDLIBS+= -ldxguid_sdl
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
BUILDCOMMONFLAGS+= -DRENDERTYPE$(RENDERTYPE)=1 -DMIXERTYPE$(MIXERTYPE)=1 $(W_STRICT_OVERFLOW)
|
||||
|
||||
ifneq (0,$(USE_OPENGL))
|
||||
BUILDCOMMONFLAGS+= -DUSE_OPENGL
|
||||
endif
|
||||
ifneq (0,$(NOASM))
|
||||
BUILDCOMMONFLAGS+= -DNOASM
|
||||
endif
|
||||
ifneq (0,$(USE_ASM64))
|
||||
BUILDCOMMONFLAGS+= -DUSE_ASM64
|
||||
endif
|
||||
ifneq (0,$(LINKED_GTK))
|
||||
BUILDCOMMONFLAGS+= -DLINKED_GTK
|
||||
endif
|
||||
|
||||
ifneq (0,$(POLYMER))
|
||||
ifneq (0,$(USE_OPENGL))
|
||||
BUILDCOMMONFLAGS+= -DPOLYMER
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(EXESUFFIX_OVERRIDE),)
|
||||
EXESUFFIX=$(EXESUFFIX_OVERRIDE)
|
||||
endif
|
||||
|
||||
STATICSTDCPP?=
|
||||
ifeq (1,$(STATICSTDCPP))
|
||||
STATICSTDCPP= -static
|
||||
endif
|
||||
ifeq (0,$(STATICSTDCPP))
|
||||
STATICSTDCPP= -shared
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(PLATFORM),WII)
|
||||
BUILDLIBS+= -ldl
|
||||
endif
|
||||
BUILDLIBS+= -pthread
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(USE_LIBPNG),0)
|
||||
BUILDLIBS+= -lpng_mini -lz_mini
|
||||
endif
|
||||
BUILDLIBS+= -lcompat-from-mingw-w64
|
||||
else
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(USE_LIBPNG),0)
|
||||
BUILDLIBS+= -lpng # -lz
|
||||
endif
|
||||
else
|
||||
ifneq ($(USE_LIBPNG),0)
|
||||
BUILDLIBS+= -lpng -lz
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
BUILD_SETTINGS_COMPILER = \033[1;36mcompiler: \033[0;36m\"$(COMPILER) $(OURCFLAGS)\"
|
||||
BUILD_SETTINGS_ASSEMBLER = \033[1;36massembler: \033[0;36m\"$(AS) $(OURASFLAGS)\"
|
||||
BUILD_SETTINGS_LINKER = \033[1;36mlinker: \033[0;36m\"$(PRINTLDFLAGS) $(OURLIBS) $(STATICSTDCPP) $(STDCPPLIB)\"
|
||||
ifeq (0,$(NOASM))
|
||||
BUILD_SETTINGS = printf "$(BUILD_SETTINGS_COMPILER)\n$(BUILD_SETTINGS_ASSEMBLER)\n$(BUILD_SETTINGS_LINKER)\033[0m\n"
|
||||
else
|
||||
BUILD_SETTINGS = printf "$(BUILD_SETTINGS_COMPILER)\n$(BUILD_SETTINGS_LINKER)\033[0m\n"
|
||||
endif
|
||||
BUILD_STARTED = printf "\033[K\033[1;36mBuild started using:\033[0m\n"; $(BUILD_SETTINGS)
|
||||
BUILD_ECHOFLAGS = printf "\033[K\033[1;36mEnded compilation in this directory using:\n$(BUILD_SETTINGS_COMPILER)\033[0m\n"
|
||||
BUILD_FINISHED = printf "\033[K\033[1;36mBuild successful:\033[0m\n"
|
||||
COMPILE_STATUS = printf "\033[K\033[0mBuilding object \033[1m$@\033[0m...\033[0m\r"
|
||||
ONESTEP_STATUS = printf "\033[K\033[0mBuilding executable \033[1m$@\033[0m...\033[0m\r"
|
||||
COMPILE_OK = printf "\033[K\033[0;32mBuilt object \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
ONESTEP_OK = printf "\033[K\033[0;32mBuilt executable \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
COMPILE_FAILED = printf "\033[K\033[0;31mFailed building \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
|
||||
ONESTEP_FAILED = printf "\033[K\033[0;31mFailed building executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
|
||||
ARCHIVE_STATUS = printf "\033[K\033[0mCreating library archive \033[1m$@\033[0m...\033[0m\r"
|
||||
ARCHIVE_OK = printf "\033[K\033[0;32mCreated library archive \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
ARCHIVE_FAILED = printf "\033[K\033[0;31mFailed creating library archive \033[1;31m$@\033[0;31m from\033[0m \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1
|
||||
LINK_STATUS = printf "\033[K\033[0;0mLinking executable \033[1m$@\033[0;0m...\033[0m\r"
|
||||
LINK_OK = printf "\033[K\033[0;32mLinked executable \033[1;32m$@\033[0;32m \033[0m\n"
|
||||
LINK_FAILED = printf "\033[K\033[0;31mFailed linking executable \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1
|
||||
else
|
||||
BUILD_STARTED =
|
||||
BUILD_ECHOFLAGS =
|
||||
BUILD_FINISHED =
|
||||
COMPILE_STATUS =
|
||||
ONESTEP_STATUS =
|
||||
COMPILE_OK = true
|
||||
ONESTEP_OK = true
|
||||
COMPILE_FAILED = false; exit 1
|
||||
ONESTEP_FAILED = false; exit 1
|
||||
ARCHIVE_STATUS =
|
||||
ARCHIVE_OK = true
|
||||
ARCHIVE_FAILED = false; exit 1
|
||||
LINK_STATUS =
|
||||
LINK_OK = true
|
||||
LINK_FAILED = false; exit 1
|
||||
endif
|
|
@ -885,7 +885,7 @@ EXTERN char show2dsprite[(MAXSPRITES+7)>>3];
|
|||
|
||||
// In the editor, gotpic is only referenced from inline assembly;
|
||||
// the compiler needs that hint or building with LTO will discard it.
|
||||
#ifndef __clang__
|
||||
#if !defined __clang__ && !defined NOASM
|
||||
# define GOTPIC_USED ATTRIBUTE((used))
|
||||
#else
|
||||
# define GOTPIC_USED
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
#include <unistd.h>
|
||||
|
||||
/* For some reaon, Apple removed setAppleMenu from the headers in 10.4,
|
||||
/* For some reason, Apple removed setAppleMenu from the headers in 10.4,
|
||||
but the method still is there and works. To avoid warnings, we declare
|
||||
it ourselves here. */
|
||||
@interface NSApplication(SDL_Missing_Methods)
|
|
@ -1297,6 +1297,8 @@ next:
|
|||
/* do nothing */
|
||||
}
|
||||
i-=2;
|
||||
if (i < 0)
|
||||
i = 0;
|
||||
|
||||
// if there's a slash at the end, this is a directory entry
|
||||
if (toupperlookup[buf[i]] == '/') { ftype = CACHE1D_FIND_DIR; buf[i] = 0; }
|
||||
|
|
|
@ -429,7 +429,7 @@ int32_t initsystem(void)
|
|||
}
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO //| SDL_INIT_TIMER
|
||||
#ifdef NOSDLPARACHUTE
|
||||
#if defined NOSDLPARACHUTE && SDL_MAJOR_VERSION==1
|
||||
| SDL_INIT_NOPARACHUTE
|
||||
#endif
|
||||
))
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=32</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">nmake /f Makefile.msvc veryclean WINBITS=32</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
@ -115,7 +115,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f Makefile.msvc veryclean all WINBITS=32</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">nmake /f Makefile.msvc veryclean WINBITS=32</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
@ -127,7 +127,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=64</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">nmake /f Makefile.msvc veryclean WINBITS=64</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
@ -138,7 +138,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">nmake /f Makefile.msvc veryclean all WINBITS=64</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">nmake /f Makefile.msvc veryclean WINBITS=64</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
@ -149,7 +149,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=32 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">nmake /f Makefile.msvc veryclean WINBITS=32 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
@ -160,7 +160,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc veryclean all WINBITS=32 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">nmake /f Makefile.msvc veryclean WINBITS=32 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release-SDL|Win32'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
@ -172,7 +172,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc veryclean all DEBUG=1 WINBITS=64 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">nmake /f Makefile.msvc veryclean WINBITS=64 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Debug-SDL|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
@ -183,7 +183,7 @@
|
|||
<NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc veryclean all WINBITS=64 RENDERTYPE=SDL</NMakeReBuildCommandLine>
|
||||
<NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">nmake /f Makefile.msvc veryclean WINBITS=64 RENDERTYPE=SDL</NMakeCleanCommandLine>
|
||||
<NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">eduke32.exe</NMakeOutput>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">USE_OPENGL;POLYMER;POLYMOST;SUPERBUILD</NMakePreprocessorDefinitions>
|
||||
<NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">USE_OPENGL;POLYMER</NMakePreprocessorDefinitions>
|
||||
<NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">$(NMakeIncludeSearchPath);build\include;source\jmact;source\jaudiolib\include;source\enet\include;</NMakeIncludeSearchPath>
|
||||
<NMakeForcedIncludes Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">$(NMakeForcedIncludes)</NMakeForcedIncludes>
|
||||
<NMakeAssemblySearchPath Condition="'$(Configuration)|$(Platform)'=='Release-SDL|x64'">$(NMakeAssemblySearchPath)</NMakeAssemblySearchPath>
|
||||
|
|
|
@ -1,61 +0,0 @@
|
|||
include ../../Makefile.common
|
||||
include ../../$(EROOT)/Makefile.shared
|
||||
|
||||
OBJ=obj
|
||||
OBJNAME=libenet.a
|
||||
SRC=src
|
||||
INC=include
|
||||
|
||||
# for BUILD_ECHOFLAGS:
|
||||
OURCOMMONFLAGS=$(BASECOMMONFLAGS) $(BUILDCOMMONFLAGS) -I$(INC) -I$(SRC) -I../../$(EROOT)/include
|
||||
ifneq ($(RELEASE),0)
|
||||
# Debugging disabled
|
||||
debug+= $(F_NO_STACK_PROTECTOR)
|
||||
endif
|
||||
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
|
||||
OURCONLYFLAGS=$(BASECONLYFLAGS)
|
||||
OURCXXFLAGS=$(BASECXXFLAGS)
|
||||
PRINTLDFLAGS=$(BASELDFLAGS)
|
||||
OURASFLAGS=$(BASEASFLAGS)
|
||||
|
||||
COMPILER=$(CC) $(OURCONLYFLAGS)
|
||||
ifneq ($(CPLUSPLUS),0)
|
||||
COMPILER=$(CXX) $(OURCXXFLAGS)
|
||||
endif
|
||||
|
||||
|
||||
OBJECTS=$(OBJ)/callbacks.o \
|
||||
$(OBJ)/host.o \
|
||||
$(OBJ)/list.o \
|
||||
$(OBJ)/packet.o \
|
||||
$(OBJ)/peer.o \
|
||||
$(OBJ)/protocol.o \
|
||||
$(OBJ)/compress.o
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OBJECTS+= $(OBJ)/win32.o
|
||||
OBJNAME=libenet_win32.a
|
||||
OBJ=obj_win
|
||||
else
|
||||
OBJECTS+= $(OBJ)/unix.o
|
||||
OURCFLAGS+= -DHAS_SOCKLEN_T
|
||||
endif
|
||||
|
||||
# OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o)
|
||||
|
||||
$(OBJNAME): $(OBJECTS)
|
||||
$(BUILD_ECHOFLAGS)
|
||||
$(ARCHIVE_STATUS)
|
||||
if $(AR) cr $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
|
||||
|
||||
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c $(INC)/enet/*.h
|
||||
-mkdir -p $(OBJ)
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
.SILENT:
|
||||
endif
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f $(OBJECTS) $(OBJNAME)
|
|
@ -1,99 +0,0 @@
|
|||
include ../../Makefile.common
|
||||
include ../../$(EROOT)/Makefile.shared
|
||||
|
||||
OBJ=obj
|
||||
OBJNAME=libjfaudiolib.a
|
||||
SRC=src
|
||||
INC=include
|
||||
EINC=../../$(EROOT)/include
|
||||
|
||||
# for BUILD_ECHOFLAGS:
|
||||
OURCOMMONFLAGS=$(BASECOMMONFLAGS) $(BUILDCOMMONFLAGS) -I$(INC) -I$(EINC) -I$(SRC) -DHAVE_VORBIS
|
||||
ifneq ($(PLATFORM),WII)
|
||||
OURCOMMONFLAGS+= -DHAVE_FLAC
|
||||
endif
|
||||
ifneq ($(RELEASE),0)
|
||||
# Debugging disabled
|
||||
debug+= $(F_NO_STACK_PROTECTOR)
|
||||
endif
|
||||
OURCFLAGS=$(OURCOMMONFLAGS) $(BASECFLAGS)
|
||||
OURCONLYFLAGS=$(BASECONLYFLAGS)
|
||||
OURCXXFLAGS=$(BASECXXFLAGS)
|
||||
PRINTLDFLAGS=$(BASELDFLAGS)
|
||||
OURASFLAGS=$(BASEASFLAGS)
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
ifeq (1,$(SDL_FRAMEWORK))
|
||||
OURCOMMONFLAGS += -I$(APPLE_FRAMEWORKS)/SDL.framework/Headers \
|
||||
-I$(APPLE_FRAMEWORKS)/SDL_mixer.framework/Headers
|
||||
else
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
endif
|
||||
endif
|
||||
|
||||
COMPILER=$(CC) $(OURCONLYFLAGS)
|
||||
ifneq ($(CPLUSPLUS),0)
|
||||
COMPILER=$(CXX) $(OURCXXFLAGS)
|
||||
endif
|
||||
|
||||
|
||||
OBJECTS=$(OBJ)/drivers.o \
|
||||
$(OBJ)/fx_man.o \
|
||||
$(OBJ)/multivoc.o \
|
||||
$(OBJ)/mix.o \
|
||||
$(OBJ)/mixst.o \
|
||||
$(OBJ)/pitch.o \
|
||||
$(OBJ)/formats.o \
|
||||
$(OBJ)/vorbis.o \
|
||||
$(OBJ)/flac.o \
|
||||
$(OBJ)/xa.o \
|
||||
$(OBJ)/driver_nosound.o
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
OURCOMMONFLAGS+= -Ithird-party/common/include
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(MIXERTYPE),WIN)
|
||||
OURCOMMONFLAGS+= -DHAVE_DS -I$(DXROOT) -I$(DXROOT)/include
|
||||
OBJECTS+= $(OBJ)/driver_directsound.o
|
||||
endif
|
||||
|
||||
OURCOMMONFLAGS+= -Ithird-party/common/include
|
||||
OBJNAME=libjfaudiolib_win32.a
|
||||
OBJ=obj_win
|
||||
endif
|
||||
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
OURCOMMONFLAGS+= -DHAVE_SDL
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
OURCOMMONFLAGS += -I$(SDLROOT)/include -I$(SDLROOT)/include/SDL
|
||||
endif
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(PLATFORM),WII)
|
||||
OURCOMMONFLAGS+=`pkg-config --cflags vorbis`
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
OBJECTS+= $(OBJ)/driver_sdl.o
|
||||
endif
|
||||
|
||||
# OBJECTS=$(SOURCES:%.c=$(OBJ)/%.o)
|
||||
|
||||
$(OBJNAME): $(OBJECTS)
|
||||
$(BUILD_ECHOFLAGS)
|
||||
$(ARCHIVE_STATUS)
|
||||
if $(AR) cr $@ $^; then $(ARCHIVE_OK); else $(ARCHIVE_FAILED); fi
|
||||
|
||||
$(OBJECTS): $(OBJ)/%.o: $(SRC)/%.c
|
||||
-mkdir -p $(OBJ)
|
||||
$(COMPILE_STATUS)
|
||||
if $(COMPILER) $(OURCFLAGS) -c $< -o $@; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
|
||||
|
||||
ifeq ($(PRETTY_OUTPUT),1)
|
||||
.SILENT:
|
||||
endif
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f $(OBJECTS) $(OBJNAME)
|
Loading…
Reference in a new issue