2008-08-20 22:58:09 +00:00
|
|
|
#
|
2006-04-13 20:47:06 +00:00
|
|
|
# EDuke32 Makefile for GNU Make
|
2008-08-20 22:58:09 +00:00
|
|
|
#
|
|
|
|
|
2019-08-21 05:55:25 +00:00
|
|
|
### Global Profiles
|
|
|
|
ifeq ($(FURY),1)
|
|
|
|
APPNAME := Ion Fury
|
|
|
|
APPBASENAME := fury
|
|
|
|
STANDALONE := 1
|
|
|
|
POLYMER := 0
|
|
|
|
USE_LIBVPX := 0
|
|
|
|
NETCODE := 0
|
|
|
|
SIMPLE_MENU := 1
|
|
|
|
endif
|
|
|
|
|
|
|
|
### Platform and Toolchain Configuration
|
2017-02-01 10:20:54 +00:00
|
|
|
include Common.mak
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2017-06-09 06:38:52 +00:00
|
|
|
### File Extensions
|
2017-08-06 13:44:39 +00:00
|
|
|
asm := nasm
|
|
|
|
o := o
|
2017-06-09 06:38:52 +00:00
|
|
|
|
|
|
|
### Directories
|
2017-08-06 13:44:39 +00:00
|
|
|
source := source
|
|
|
|
obj := obj
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-06-09 06:38:52 +00:00
|
|
|
### Functions
|
2017-06-09 06:39:01 +00:00
|
|
|
define parent
|
|
|
|
$(word 1,$(subst _, ,$1))
|
|
|
|
endef
|
2017-03-23 20:46:50 +00:00
|
|
|
define expandobjs
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(addprefix $$($$(call parent,$1)_obj)/,$$(addsuffix .$$o,$$(basename $$($1_objs) $$($1_rsrc_objs) $$($1_gen_objs))))
|
2017-06-09 06:39:01 +00:00
|
|
|
endef
|
|
|
|
define expandsrcs
|
2017-08-06 13:44:49 +00:00
|
|
|
$(addprefix $($(call parent,$1)_src)/,$($1_objs)) $(addprefix $($(call parent,$1)_rsrc)/,$($1_rsrc_objs)) $(addprefix $($(call parent,$1)_obj)/,$($1_gen_objs))
|
2017-06-09 06:39:01 +00:00
|
|
|
endef
|
|
|
|
define expanddeps
|
2017-08-06 13:44:49 +00:00
|
|
|
$(strip $1 $(foreach j,$1,$(call $0,$($j_deps))))
|
2017-06-09 06:39:01 +00:00
|
|
|
endef
|
|
|
|
define getdeps
|
2017-08-06 13:44:49 +00:00
|
|
|
$(call expanddeps,$1_$2 $(common_$2_deps) engine)
|
2017-03-23 20:46:50 +00:00
|
|
|
endef
|
|
|
|
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-06-09 06:39:04 +00:00
|
|
|
##### External Library Definitions
|
|
|
|
|
2017-06-09 06:39:42 +00:00
|
|
|
#### libxmp-lite
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
libxmplite := libxmp-lite
|
2017-06-09 06:39:42 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
libxmplite_objs := \
|
2017-06-09 06:39:42 +00:00
|
|
|
control.c \
|
|
|
|
dataio.c \
|
|
|
|
effects.c \
|
|
|
|
filter.c \
|
|
|
|
format.c \
|
|
|
|
hio.c \
|
|
|
|
lfo.c \
|
|
|
|
load.c \
|
|
|
|
load_helpers.c \
|
|
|
|
memio.c \
|
|
|
|
mixer.c \
|
|
|
|
mix_all.c \
|
|
|
|
period.c \
|
|
|
|
player.c \
|
|
|
|
read_event.c \
|
|
|
|
scan.c \
|
|
|
|
smix.c \
|
|
|
|
virtual.c \
|
|
|
|
common.c \
|
|
|
|
itsex.c \
|
|
|
|
it_load.c \
|
|
|
|
mod_load.c \
|
2017-10-15 23:09:59 +00:00
|
|
|
mtm_load.c \
|
2017-06-09 06:39:42 +00:00
|
|
|
s3m_load.c \
|
|
|
|
sample.c \
|
|
|
|
xm_load.c \
|
2019-09-20 06:41:07 +00:00
|
|
|
win32.c \
|
2017-06-09 06:39:42 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
libxmplite_root := $(source)/$(libxmplite)
|
|
|
|
libxmplite_src := $(libxmplite_root)/src
|
|
|
|
libxmplite_inc := $(libxmplite_root)/include
|
|
|
|
libxmplite_obj := $(obj)/$(libxmplite)
|
2017-06-09 06:39:42 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
libxmplite_cflags := -DHAVE_ROUND -DLIBXMP_CORE_PLAYER -DBUILDING_STATIC -I$(libxmplite_inc)/libxmp-lite -Wno-unused-parameter -Wno-sign-compare
|
2017-06-09 06:39:42 +00:00
|
|
|
|
|
|
|
|
2017-06-09 06:39:21 +00:00
|
|
|
#### LPeg
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
lpeg := lpeg
|
2017-06-09 06:39:21 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
lpeg_objs := \
|
2017-06-09 06:39:21 +00:00
|
|
|
lpcap.c \
|
|
|
|
lpcode.c \
|
|
|
|
lpprint.c \
|
|
|
|
lptree.c \
|
|
|
|
lpvm.c \
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
lpeg_root := $(source)/$(lpeg)
|
|
|
|
lpeg_src := $(lpeg_root)/src
|
|
|
|
lpeg_inc := $(lpeg_root)/include
|
|
|
|
lpeg_obj := $(obj)/$(lpeg)
|
2017-06-09 06:39:21 +00:00
|
|
|
|
|
|
|
|
2019-03-01 08:51:50 +00:00
|
|
|
#### PhysicsFS
|
|
|
|
|
|
|
|
physfs := physfs
|
|
|
|
|
|
|
|
physfs_objs := \
|
|
|
|
physfs.c \
|
|
|
|
physfs_archiver_7z.c \
|
|
|
|
physfs_archiver_dir.c \
|
|
|
|
physfs_archiver_grp.c \
|
|
|
|
physfs_archiver_hog.c \
|
|
|
|
physfs_archiver_iso9660.c \
|
|
|
|
physfs_archiver_mvl.c \
|
|
|
|
physfs_archiver_qpak.c \
|
|
|
|
physfs_archiver_slb.c \
|
|
|
|
physfs_archiver_unpacked.c \
|
|
|
|
physfs_archiver_vdf.c \
|
|
|
|
physfs_archiver_wad.c \
|
|
|
|
physfs_archiver_zip.c \
|
|
|
|
physfs_byteorder.c \
|
|
|
|
physfs_unicode.c \
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),APPLE)
|
|
|
|
physfs_objs += physfs_platform_apple.m
|
|
|
|
else ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
physfs_objs += physfs_platform_windows.c
|
|
|
|
else
|
|
|
|
physfs_objs += physfs_platform_unix.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
physfs_root := $(source)/$(physfs)
|
|
|
|
physfs_src := $(physfs_root)/src
|
|
|
|
physfs_inc := $(physfs_root)/include
|
|
|
|
physfs_obj := $(obj)/$(physfs)
|
|
|
|
|
|
|
|
physfs_cflags :=
|
|
|
|
|
|
|
|
|
2017-06-09 06:39:04 +00:00
|
|
|
#### ENet
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
enet := enet
|
2017-06-09 06:39:04 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
enet_objs := \
|
2017-06-09 06:39:04 +00:00
|
|
|
callbacks.c \
|
|
|
|
host.c \
|
|
|
|
list.c \
|
|
|
|
packet.c \
|
|
|
|
peer.c \
|
|
|
|
protocol.c \
|
|
|
|
compress.c \
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
enet_root := $(source)/$(enet)
|
|
|
|
enet_src := $(enet_root)/src
|
|
|
|
enet_inc := $(enet_root)/include
|
|
|
|
enet_obj := $(obj)/$(enet)
|
2017-06-09 06:39:04 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
enet_cflags :=
|
2017-06-09 06:39:04 +00:00
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2017-08-06 13:44:49 +00:00
|
|
|
enet_objs += win32.c
|
2017-06-09 06:39:04 +00:00
|
|
|
else
|
2017-08-06 13:44:49 +00:00
|
|
|
enet_objs += unix.c
|
|
|
|
enet_cflags += -DHAS_SOCKLEN_T
|
2017-06-09 06:39:04 +00:00
|
|
|
endif
|
|
|
|
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2018-02-16 06:38:21 +00:00
|
|
|
#### glad
|
|
|
|
|
|
|
|
glad := glad
|
|
|
|
|
|
|
|
glad_objs := \
|
|
|
|
glad.c \
|
|
|
|
|
|
|
|
glad_root := $(source)/$(glad)
|
|
|
|
glad_src := $(glad_root)/src
|
|
|
|
glad_inc := $(glad_root)/include
|
|
|
|
glad_obj := $(obj)/$(glad)
|
|
|
|
|
2018-07-23 02:55:49 +00:00
|
|
|
glad_cflags :=
|
2018-02-16 08:33:39 +00:00
|
|
|
|
2018-02-16 06:38:21 +00:00
|
|
|
ifeq ($(RENDERTYPE),WIN)
|
|
|
|
glad_objs += glad_wgl.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
##### Component Definitions
|
|
|
|
|
|
|
|
#### EBacktrace
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
ifndef ebacktrace_dll
|
|
|
|
ebacktrace_dll := ebacktrace1.dll
|
2014-07-24 14:01:44 +00:00
|
|
|
ifeq ($(findstring x86_64,$(COMPILERTARGET)),x86_64)
|
2017-08-06 13:44:49 +00:00
|
|
|
ebacktrace_dll := ebacktrace1-64.dll
|
2014-07-24 14:01:44 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### BUILD Engine
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
engine := build
|
2016-05-23 04:46:57 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_root := $(source)/$(engine)
|
|
|
|
engine_src := $(engine_root)/src
|
|
|
|
engine_inc := $(engine_root)/include
|
|
|
|
engine_obj := $(obj)/$(engine)
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_cflags := -I$(engine_src)
|
2014-07-23 07:21:29 +00:00
|
|
|
|
2018-02-16 06:38:21 +00:00
|
|
|
engine_deps :=
|
|
|
|
|
2019-03-01 08:51:50 +00:00
|
|
|
ifneq (0,$(USE_PHYSFS))
|
|
|
|
engine_deps += physfs
|
|
|
|
endif
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
rev.cpp \
|
|
|
|
baselayer.cpp \
|
2019-03-01 08:51:50 +00:00
|
|
|
vfs.cpp \
|
2017-03-23 20:46:47 +00:00
|
|
|
cache1d.cpp \
|
2018-11-05 07:28:07 +00:00
|
|
|
klzw.cpp \
|
2017-03-23 20:46:47 +00:00
|
|
|
common.cpp \
|
|
|
|
compat.cpp \
|
|
|
|
crc32.cpp \
|
|
|
|
defs.cpp \
|
|
|
|
engine.cpp \
|
|
|
|
tiles.cpp \
|
|
|
|
clip.cpp \
|
|
|
|
2d.cpp \
|
|
|
|
hash.cpp \
|
|
|
|
palette.cpp \
|
2019-07-12 08:44:36 +00:00
|
|
|
polymost1Frag.glsl \
|
|
|
|
polymost1Vert.glsl \
|
2017-03-23 20:46:47 +00:00
|
|
|
polymost.cpp \
|
|
|
|
texcache.cpp \
|
|
|
|
dxtfilter.cpp \
|
|
|
|
hightile.cpp \
|
|
|
|
textfont.cpp \
|
|
|
|
smalltextfont.cpp \
|
|
|
|
kplib.cpp \
|
|
|
|
lz4.c \
|
|
|
|
osd.cpp \
|
|
|
|
pragmas.cpp \
|
|
|
|
scriptfile.cpp \
|
2018-07-14 21:36:44 +00:00
|
|
|
softsurface.cpp \
|
2017-03-23 20:46:47 +00:00
|
|
|
mmulti_null.cpp \
|
|
|
|
mutex.cpp \
|
2019-08-13 14:44:16 +00:00
|
|
|
timer.cpp \
|
2017-03-23 20:46:47 +00:00
|
|
|
xxhash.c \
|
|
|
|
md4.cpp \
|
|
|
|
colmatch.cpp \
|
|
|
|
screenshot.cpp \
|
|
|
|
mhk.cpp \
|
2017-07-18 20:53:00 +00:00
|
|
|
pngwrite.cpp \
|
|
|
|
miniz.c \
|
2018-04-23 06:35:34 +00:00
|
|
|
miniz_tinfl.c \
|
|
|
|
miniz_tdef.c \
|
2019-04-18 17:24:17 +00:00
|
|
|
fix16.cpp \
|
|
|
|
fix16_str.cpp \
|
2019-09-10 23:34:46 +00:00
|
|
|
sjson.cpp \
|
2016-05-23 04:47:18 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_editor_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
build.cpp \
|
|
|
|
config.cpp \
|
|
|
|
defs.cpp \
|
2016-05-23 04:47:18 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_tools_objs := \
|
2017-06-09 06:38:52 +00:00
|
|
|
compat.cpp \
|
|
|
|
pragmas.cpp \
|
|
|
|
kplib.cpp \
|
|
|
|
cache1d.cpp \
|
2018-11-05 07:28:07 +00:00
|
|
|
klzw.cpp \
|
2017-06-09 06:38:52 +00:00
|
|
|
crc32.cpp \
|
|
|
|
colmatch.cpp \
|
2018-06-14 17:49:53 +00:00
|
|
|
lz4.cpp \
|
2017-06-09 06:38:52 +00:00
|
|
|
|
2014-07-22 07:25:54 +00:00
|
|
|
ifeq (0,$(NOASM))
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += a.nasm
|
2014-07-22 07:25:54 +00:00
|
|
|
else
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += a-c.cpp
|
2014-07-22 07:25:54 +00:00
|
|
|
ifneq (0,$(USE_ASM64))
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += a64.yasm
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq (1,$(USE_OPENGL))
|
2018-06-13 19:15:16 +00:00
|
|
|
engine_objs += glsurface.cpp voxmodel.cpp mdsprite.cpp tilepacker.cpp
|
2018-02-16 06:38:21 +00:00
|
|
|
engine_deps += glad
|
2014-07-22 07:25:54 +00:00
|
|
|
ifeq (1,$(POLYMER))
|
2018-02-16 06:38:21 +00:00
|
|
|
engine_objs += glbuild.cpp polymer.cpp
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
endif
|
2014-09-07 18:10:17 +00:00
|
|
|
ifneq (0,$(LUNATIC))
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += lunatic.cpp
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += osxbits.mm
|
2017-08-06 13:44:57 +00:00
|
|
|
engine_tools_objs += osxbits.mm
|
2016-11-28 04:35:27 +00:00
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_editor_objs += startosx.editor.mm
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
2016-03-28 05:16:18 +00:00
|
|
|
ifeq ($(SDL_TARGET),1)
|
2016-06-15 07:08:35 +00:00
|
|
|
ifneq ($(SDL_FRAMEWORK),0)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += SDLMain.mm
|
2016-03-28 05:16:18 +00:00
|
|
|
endif
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += winbits.cpp
|
2016-11-28 04:35:34 +00:00
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_editor_objs += startwin.editor.cpp
|
2016-11-28 04:35:34 +00:00
|
|
|
endif
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
2014-12-17 13:01:58 +00:00
|
|
|
ifeq ($(PLATFORM),WII)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += wiibits.cpp
|
2017-08-06 13:44:39 +00:00
|
|
|
LINKERFLAGS += -Wl,-wrap,c_default_exceptionhandler
|
2014-12-17 13:01:58 +00:00
|
|
|
endif
|
2014-07-22 07:25:54 +00:00
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += sdlayer.cpp
|
2014-07-22 07:25:54 +00:00
|
|
|
|
|
|
|
ifeq (1,$(HAVE_GTK2))
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += gtkbits.cpp dynamicgtk.cpp
|
2016-11-28 04:35:31 +00:00
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_editor_objs += startgtk.editor.cpp
|
2016-11-28 04:35:31 +00:00
|
|
|
endif
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(RENDERTYPE),WIN)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += winlayer.cpp rawinput.cpp
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
ifneq ($(USE_LIBVPX),0)
|
2017-08-06 13:44:49 +00:00
|
|
|
engine_objs += animvpx.cpp
|
2017-02-01 10:20:54 +00:00
|
|
|
endif
|
|
|
|
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
#### mact
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
mact := mact
|
2016-05-23 04:46:57 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
mact_root := $(source)/$(mact)
|
|
|
|
mact_src := $(mact_root)/src
|
|
|
|
mact_inc := $(mact_root)/include
|
|
|
|
mact_obj := $(obj)/$(mact)
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
mact_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
control.cpp \
|
|
|
|
keyboard.cpp \
|
|
|
|
joystick.cpp \
|
|
|
|
scriplib.cpp \
|
|
|
|
animlib.cpp \
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### AudioLib
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
audiolib := audiolib
|
2016-05-23 04:46:57 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
audiolib_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
drivers.cpp \
|
|
|
|
fx_man.cpp \
|
|
|
|
multivoc.cpp \
|
|
|
|
mix.cpp \
|
|
|
|
mixst.cpp \
|
|
|
|
pitch.cpp \
|
|
|
|
formats.cpp \
|
|
|
|
vorbis.cpp \
|
|
|
|
flac.cpp \
|
|
|
|
xa.cpp \
|
|
|
|
xmp.cpp \
|
|
|
|
driver_nosound.cpp \
|
2019-06-08 12:25:39 +00:00
|
|
|
al_midi.cpp \
|
|
|
|
gmtimbre.cpp \
|
|
|
|
opl3.cpp \
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
audiolib_root := $(source)/$(audiolib)
|
|
|
|
audiolib_src := $(audiolib_root)/src
|
|
|
|
audiolib_inc := $(audiolib_root)/include
|
|
|
|
audiolib_obj := $(obj)/$(audiolib)
|
2017-08-06 13:44:39 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
audiolib_cflags :=
|
2017-08-06 13:44:39 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
audiolib_deps :=
|
2014-07-22 07:25:54 +00:00
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
ifeq ($(MIXERTYPE),WIN)
|
2019-06-08 12:25:39 +00:00
|
|
|
audiolib_objs += driver_directsound.cpp music.cpp midi.cpp mpu401.cpp
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MIXERTYPE),SDL)
|
2017-06-09 06:38:42 +00:00
|
|
|
ifeq (,$(filter $(PLATFORM),DARWIN WINDOWS WII))
|
2017-08-06 13:44:49 +00:00
|
|
|
audiolib_cflags += `$(PKG_CONFIG) --cflags vorbis`
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
2019-06-08 12:25:39 +00:00
|
|
|
audiolib_objs += driver_sdl.cpp sdlmusic.cpp
|
2014-07-22 07:25:54 +00:00
|
|
|
endif
|
|
|
|
|
2017-06-09 06:39:42 +00:00
|
|
|
ifneq (0,$(HAVE_XMP))
|
2017-08-06 13:44:49 +00:00
|
|
|
audiolib_cflags += -I$(libxmplite_inc)
|
|
|
|
audiolib_deps += libxmplite
|
2017-06-09 06:39:42 +00:00
|
|
|
endif
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:39 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### Tools
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
tools := tools
|
2017-02-01 10:20:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
tools_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
compat_tools.cpp \
|
2017-02-01 10:20:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
tools_root := $(source)/$(tools)
|
|
|
|
tools_src := $(tools_root)/src
|
|
|
|
tools_obj := $(obj)/$(tools)
|
2017-08-06 13:44:39 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
tools_cflags := $(engine_cflags)
|
2017-02-01 10:20:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
tools_deps := engine_tools
|
2017-03-23 03:03:37 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
tools_targets := \
|
2016-05-23 04:47:18 +00:00
|
|
|
kextract \
|
|
|
|
kgroup \
|
|
|
|
transpal \
|
|
|
|
wad2art \
|
|
|
|
wad2map \
|
|
|
|
kmd2tool \
|
|
|
|
md2tool \
|
|
|
|
generateicon \
|
|
|
|
cacheinfo \
|
|
|
|
arttool \
|
|
|
|
givedepth \
|
|
|
|
mkpalette \
|
|
|
|
unpackssi \
|
|
|
|
bsuite \
|
|
|
|
ivfrate \
|
2017-02-01 10:20:54 +00:00
|
|
|
map2stl \
|
2016-05-23 04:47:18 +00:00
|
|
|
|
2017-03-23 03:03:29 +00:00
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2017-08-06 13:44:49 +00:00
|
|
|
tools_targets += enumdisplay getdxdidf
|
2017-03-23 03:03:29 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
2017-08-06 13:44:49 +00:00
|
|
|
tools_targets += makesdlkeytrans
|
2017-03-23 03:03:29 +00:00
|
|
|
endif
|
2014-07-22 07:25:54 +00:00
|
|
|
|
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### KenBuild (Test Game)
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild := kenbuild
|
2016-05-23 04:46:57 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_root := $(source)/$(kenbuild)
|
|
|
|
kenbuild_src := $(kenbuild_root)/src
|
|
|
|
kenbuild_rsrc := $(kenbuild_root)/rsrc
|
|
|
|
kenbuild_obj := $(obj)/$(kenbuild)
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_cflags := -I$(kenbuild_src)
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game := ekenbuild
|
|
|
|
kenbuild_editor := ekenbuild-editor
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game_proper := EKenBuild
|
|
|
|
kenbuild_editor_proper := EKenBuild Editor
|
2016-05-23 04:46:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
game.cpp \
|
|
|
|
sound_stub.cpp \
|
|
|
|
common.cpp \
|
|
|
|
config.cpp \
|
2016-05-23 04:47:18 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_editor_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
bstub.cpp \
|
|
|
|
common.cpp \
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game_rsrc_objs :=
|
|
|
|
kenbuild_editor_rsrc_objs :=
|
|
|
|
kenbuild_game_gen_objs :=
|
|
|
|
kenbuild_editor_rsrc_objs :=
|
2017-03-23 20:46:52 +00:00
|
|
|
|
2017-06-09 06:38:42 +00:00
|
|
|
ifeq (1,$(HAVE_GTK2))
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game_objs += startgtk.game.cpp
|
|
|
|
kenbuild_game_gen_objs += game_banner.c
|
|
|
|
kenbuild_editor_gen_objs += build_banner.c
|
2017-06-09 06:38:42 +00:00
|
|
|
endif
|
2014-07-24 14:01:44 +00:00
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game_rsrc_objs += game_icon.c
|
|
|
|
kenbuild_editor_rsrc_objs += build_icon.c
|
2014-07-24 14:01:44 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game_objs += startwin.game.cpp
|
|
|
|
kenbuild_game_rsrc_objs += gameres.rc
|
|
|
|
kenbuild_editor_rsrc_objs += buildres.rc
|
2006-04-13 20:47:06 +00:00
|
|
|
endif
|
|
|
|
|
2016-05-23 04:46:37 +00:00
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
2016-11-28 04:35:27 +00:00
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
2017-08-06 13:44:49 +00:00
|
|
|
kenbuild_game_objs += StartupWinController.game.mm
|
2016-05-23 04:46:37 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### Duke Nukem 3D
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d := duke3d
|
2017-08-06 13:44:39 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_ldflags :=
|
|
|
|
duke3d_editor_ldflags :=
|
2016-05-23 04:46:57 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_stripflags :=
|
|
|
|
duke3d_editor_stripflags :=
|
2011-09-20 19:12:24 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_root := $(source)/$(duke3d)
|
|
|
|
duke3d_src := $(duke3d_root)/src
|
|
|
|
duke3d_rsrc := $(duke3d_root)/rsrc
|
|
|
|
duke3d_obj := $(obj)/$(duke3d)
|
2012-11-24 09:13:29 +00:00
|
|
|
|
2019-08-21 05:55:25 +00:00
|
|
|
ifeq ($(FURY),1)
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
duke3d_rsrc := $(duke3d_root)/rsrc/fury
|
|
|
|
endif
|
|
|
|
duke3d_obj := $(obj)/fury
|
|
|
|
endif
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_cflags := -I$(duke3d_src)
|
2016-05-23 04:47:03 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
common_editor_deps := duke3d_common_editor engine_editor
|
2017-08-06 13:44:39 +00:00
|
|
|
|
2019-06-08 12:25:39 +00:00
|
|
|
duke3d_game_deps := audiolib mact
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_editor_deps := audiolib
|
2017-08-06 13:44:39 +00:00
|
|
|
|
|
|
|
ifneq (0,$(NETCODE))
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_deps += enet
|
2017-08-06 13:44:39 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (0,$(LUNATIC))
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_deps += lunatic lunatic_game lpeg
|
|
|
|
duke3d_editor_deps += lunatic lunatic_editor lpeg
|
2017-08-06 13:44:39 +00:00
|
|
|
endif
|
2009-12-05 09:22:43 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game := eduke32
|
|
|
|
duke3d_editor := mapster32
|
2012-10-29 04:26:25 +00:00
|
|
|
|
2017-04-24 05:11:11 +00:00
|
|
|
ifneq (,$(APPBASENAME))
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game := $(APPBASENAME)
|
2017-04-24 05:11:11 +00:00
|
|
|
endif
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_proper := EDuke32
|
|
|
|
duke3d_editor_proper := Mapster32
|
2016-05-23 04:46:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_common_editor_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
m32common.cpp \
|
|
|
|
m32def.cpp \
|
|
|
|
m32exec.cpp \
|
|
|
|
m32vars.cpp \
|
2016-05-23 04:47:18 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
game.cpp \
|
|
|
|
global.cpp \
|
|
|
|
actors.cpp \
|
|
|
|
gamedef.cpp \
|
|
|
|
gameexec.cpp \
|
|
|
|
gamevars.cpp \
|
|
|
|
player.cpp \
|
|
|
|
premap.cpp \
|
|
|
|
sector.cpp \
|
|
|
|
anim.cpp \
|
|
|
|
common.cpp \
|
|
|
|
config.cpp \
|
|
|
|
demo.cpp \
|
|
|
|
input.cpp \
|
|
|
|
menus.cpp \
|
|
|
|
namesdyn.cpp \
|
2019-03-21 02:24:19 +00:00
|
|
|
network.cpp \
|
2017-03-23 20:46:47 +00:00
|
|
|
savegame.cpp \
|
|
|
|
rts.cpp \
|
|
|
|
osdfuncs.cpp \
|
|
|
|
osdcmds.cpp \
|
|
|
|
grpscan.cpp \
|
|
|
|
sounds.cpp \
|
|
|
|
soundsdyn.cpp \
|
|
|
|
cheats.cpp \
|
|
|
|
sbar.cpp \
|
|
|
|
screentext.cpp \
|
|
|
|
screens.cpp \
|
|
|
|
cmdline.cpp \
|
2016-05-23 04:47:18 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_editor_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
astub.cpp \
|
|
|
|
common.cpp \
|
|
|
|
grpscan.cpp \
|
|
|
|
sounds_mapster32.cpp \
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_rsrc_objs :=
|
|
|
|
duke3d_editor_rsrc_objs :=
|
|
|
|
duke3d_game_gen_objs :=
|
|
|
|
duke3d_editor_gen_objs :=
|
2017-03-23 20:46:52 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_miscdeps :=
|
|
|
|
duke3d_editor_miscdeps :=
|
|
|
|
duke3d_game_orderonlydeps :=
|
|
|
|
duke3d_editor_orderonlydeps :=
|
2011-12-04 18:09:50 +00:00
|
|
|
|
2011-12-03 13:12:51 +00:00
|
|
|
## Lunatic devel
|
2017-08-06 13:44:49 +00:00
|
|
|
lunatic := lunatic
|
|
|
|
lunatic_src := $(duke3d_src)/$(lunatic)
|
|
|
|
lunatic_obj := $(duke3d_obj)
|
2017-06-09 06:38:55 +00:00
|
|
|
|
2011-09-20 19:12:24 +00:00
|
|
|
ifneq (0,$(LUNATIC))
|
2017-08-06 13:44:49 +00:00
|
|
|
COMPILERFLAGS += -I$(lunatic_src) -DLUNATIC
|
2017-03-23 20:47:00 +00:00
|
|
|
|
|
|
|
# Determine size of _defs*.lua bytecode once.
|
|
|
|
ifndef DEFS_BC_SIZE
|
2017-08-06 13:44:49 +00:00
|
|
|
DEFS_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(lunatic_src)/_defs_game.lua -)
|
2017-03-23 20:47:00 +00:00
|
|
|
DEFS_BC_SIZE := $(word 3, $(DEFS_BC_SIZE))
|
|
|
|
endif
|
|
|
|
ifndef DEFS_M32_BC_SIZE
|
2017-08-06 13:44:49 +00:00
|
|
|
DEFS_M32_BC_SIZE := $(shell $(LUAJIT) -bg -t h $(lunatic_src)/_defs_editor.lua -)
|
2017-03-23 20:47:00 +00:00
|
|
|
DEFS_M32_BC_SIZE := $(word 3, $(DEFS_M32_BC_SIZE))
|
|
|
|
endif
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_cflags += -DLUNATIC_DEFS_BC_SIZE=$(DEFS_BC_SIZE) -DLUNATIC_DEFS_M32_BC_SIZE=$(DEFS_M32_BC_SIZE)
|
2017-03-23 20:47:00 +00:00
|
|
|
|
2017-03-23 20:46:44 +00:00
|
|
|
# Lunatic object base names. These are not used in targets directly.
|
2017-08-06 13:44:49 +00:00
|
|
|
lunatic_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
defs_common.lua \
|
|
|
|
engine_maptext.lua \
|
|
|
|
engine.lua \
|
|
|
|
bcarray.lua \
|
|
|
|
bcheck.lua \
|
|
|
|
bitar.lua \
|
|
|
|
xmath.lua \
|
|
|
|
v.lua \
|
|
|
|
dump.lua \
|
|
|
|
dis_x86.lua \
|
|
|
|
dis_x64.lua \
|
2017-03-23 20:46:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
lunatic_game_objs := \
|
2017-06-09 06:39:01 +00:00
|
|
|
lunatic_game.cpp \
|
2017-03-23 20:46:47 +00:00
|
|
|
_defs_game.lua \
|
|
|
|
con_lang.lua \
|
|
|
|
lunacon.lua \
|
|
|
|
randgen.lua \
|
|
|
|
stat.lua \
|
|
|
|
control.lua \
|
2017-06-07 05:56:35 +00:00
|
|
|
lunasave.lua \
|
2017-03-23 20:46:47 +00:00
|
|
|
fs.lua \
|
2017-03-23 20:46:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
lunatic_editor_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
lunatic_editor.cpp \
|
2017-06-09 06:39:01 +00:00
|
|
|
_defs_editor.lua \
|
2011-12-03 13:12:51 +00:00
|
|
|
|
2017-03-23 20:46:44 +00:00
|
|
|
# TODO: remove debugging modules from release build
|
2013-12-31 11:52:01 +00:00
|
|
|
|
2011-12-03 13:12:51 +00:00
|
|
|
# now, take care of having the necessary symbols (sector, wall, etc.) in the
|
|
|
|
# executable no matter what the debugging level
|
|
|
|
|
2011-10-11 16:53:15 +00:00
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
2011-12-03 13:12:51 +00:00
|
|
|
# strip on OSX says: removing global symbols from a final linked no longer supported.
|
|
|
|
# Use -exported_symbols_list at link time when building
|
|
|
|
# But, following _their_ directions does not give us the symbols! wtf?
|
2017-02-01 10:20:54 +00:00
|
|
|
# Instead of using -alias_list and -exported_symbols_list, prevent stripping them.
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_stripflags += -s $(duke3d_obj)/lunatic_dynsymlist_game_osx
|
|
|
|
duke3d_editor_stripflags += -s $(duke3d_obj)/lunatic_dynsymlist_editor_osx
|
2011-12-03 13:12:51 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_orderonlydeps += $(duke3d_obj)/lunatic_dynsymlist_game_osx
|
|
|
|
duke3d_editor_orderonlydeps += $(duke3d_obj)/lunatic_dynsymlist_editor_osx
|
2017-08-06 13:44:39 +00:00
|
|
|
LINKERFLAGS += -pagezero_size 10000 -image_base 100000000
|
2011-12-03 13:12:51 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2017-08-06 13:44:39 +00:00
|
|
|
override STRIP :=
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_miscdeps += $(duke3d_obj)/lunatic_dynsymlist_game.def
|
|
|
|
duke3d_editor_miscdeps += $(duke3d_obj)/lunatic_dynsymlist_editor.def
|
2011-12-03 13:12:51 +00:00
|
|
|
endif
|
2012-12-13 02:32:59 +00:00
|
|
|
ifeq ($(SUBPLATFORM),LINUX)
|
2017-08-06 13:44:39 +00:00
|
|
|
override STRIP :=
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_ldflags += -Wl,--dynamic-list=$(lunatic_src)/dynsymlist_game.lds
|
|
|
|
duke3d_editor_ldflags += -Wl,--dynamic-list=$(lunatic_src)/dynsymlist_editor.lds
|
2011-10-11 16:53:15 +00:00
|
|
|
endif
|
2011-09-20 19:12:24 +00:00
|
|
|
endif
|
|
|
|
|
2012-12-13 02:32:59 +00:00
|
|
|
ifeq ($(SUBPLATFORM),LINUX)
|
2015-03-02 07:54:24 +00:00
|
|
|
LIBS += -lFLAC -lvorbisfile -lvorbis -logg
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),BSD)
|
|
|
|
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lexecinfo
|
2008-08-20 22:58:09 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
2014-07-22 07:25:54 +00:00
|
|
|
LIBS += -lFLAC -lvorbisfile -lvorbis -logg -lm \
|
|
|
|
-Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,OpenGL \
|
2015-03-24 00:40:43 +00:00
|
|
|
-Wl,-framework,CoreMIDI -Wl,-framework,AudioUnit \
|
2014-07-22 11:19:45 +00:00
|
|
|
-Wl,-framework,AudioToolbox -Wl,-framework,IOKit -Wl,-framework,AGL
|
|
|
|
ifneq (00,$(DARWIN9)$(DARWIN10))
|
|
|
|
LIBS += -Wl,-framework,QuickTime -lm
|
|
|
|
endif
|
2012-03-26 05:04:21 +00:00
|
|
|
|
2016-11-28 04:35:27 +00:00
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_objs += GrpFile.game.mm GameListSource.game.mm startosx.game.mm
|
2012-03-08 06:07:10 +00:00
|
|
|
endif
|
2008-08-20 22:58:09 +00:00
|
|
|
endif
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2015-09-08 02:58:03 +00:00
|
|
|
LIBS += -lFLAC -lvorbisfile -lvorbis -logg
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_objs += winbits.cpp
|
|
|
|
duke3d_game_rsrc_objs += gameres.rc
|
|
|
|
duke3d_editor_rsrc_objs += buildres.rc
|
2016-11-09 22:51:33 +00:00
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_objs += startwin.game.cpp
|
2016-11-09 22:51:33 +00:00
|
|
|
endif
|
2013-10-07 10:05:03 +00:00
|
|
|
ifeq ($(MIXERTYPE),WIN)
|
2017-08-06 13:44:39 +00:00
|
|
|
LIBS += -ldsound
|
2012-11-24 09:13:29 +00:00
|
|
|
endif
|
|
|
|
endif
|
2014-07-22 07:25:54 +00:00
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WII)
|
|
|
|
LIBS += -lvorbisidec
|
|
|
|
endif
|
|
|
|
|
2017-06-09 06:38:42 +00:00
|
|
|
ifeq (11,$(HAVE_GTK2)$(STARTUP_WINDOW))
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_objs += startgtk.game.cpp
|
|
|
|
duke3d_game_gen_objs += game_banner.c
|
|
|
|
duke3d_editor_gen_objs += build_banner.c
|
2017-06-09 06:38:42 +00:00
|
|
|
endif
|
2012-11-24 09:13:29 +00:00
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
2017-08-06 13:44:49 +00:00
|
|
|
duke3d_game_rsrc_objs += game_icon.c
|
|
|
|
duke3d_editor_rsrc_objs += build_icon.c
|
2013-10-07 10:05:03 +00:00
|
|
|
endif
|
2012-11-05 02:49:08 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
|
2019-06-08 11:50:42 +00:00
|
|
|
#### Blood
|
|
|
|
|
|
|
|
blood := blood
|
|
|
|
|
|
|
|
blood_game_ldflags :=
|
|
|
|
|
|
|
|
blood_game_stripflags :=
|
|
|
|
|
|
|
|
blood_root := $(source)/$(blood)
|
|
|
|
blood_src := $(blood_root)/src
|
|
|
|
blood_rsrc := $(blood_root)/rsrc
|
|
|
|
blood_obj := $(obj)/$(blood)
|
|
|
|
|
|
|
|
blood_cflags := -I$(blood_src)
|
|
|
|
|
2019-06-08 12:25:39 +00:00
|
|
|
blood_game_deps := audiolib mact libsmackerdec
|
2019-06-08 11:50:42 +00:00
|
|
|
|
|
|
|
ifneq (0,$(NETCODE))
|
|
|
|
blood_game_deps += enet
|
|
|
|
endif
|
|
|
|
|
|
|
|
blood_game := nblood
|
|
|
|
|
|
|
|
ifneq (,$(APPBASENAME))
|
|
|
|
blood_game := $(APPBASENAME)
|
|
|
|
endif
|
|
|
|
|
|
|
|
blood_game_proper := NBlood
|
|
|
|
|
|
|
|
blood_game_objs := \
|
|
|
|
blood.cpp \
|
|
|
|
actor.cpp \
|
|
|
|
ai.cpp \
|
|
|
|
aibat.cpp \
|
|
|
|
aibeast.cpp \
|
|
|
|
aiboneel.cpp \
|
|
|
|
aiburn.cpp \
|
|
|
|
aicaleb.cpp \
|
|
|
|
aicerber.cpp \
|
|
|
|
aicult.cpp \
|
|
|
|
aigarg.cpp \
|
|
|
|
aighost.cpp \
|
|
|
|
aigilbst.cpp \
|
|
|
|
aihand.cpp \
|
|
|
|
aihound.cpp \
|
|
|
|
aiinnoc.cpp \
|
|
|
|
aipod.cpp \
|
|
|
|
airat.cpp \
|
|
|
|
aispid.cpp \
|
|
|
|
aitchern.cpp \
|
|
|
|
aiunicult.cpp \
|
|
|
|
aizomba.cpp \
|
|
|
|
aizombf.cpp \
|
|
|
|
asound.cpp \
|
|
|
|
callback.cpp \
|
|
|
|
choke.cpp \
|
|
|
|
common.cpp \
|
|
|
|
config.cpp \
|
|
|
|
controls.cpp \
|
|
|
|
credits.cpp \
|
|
|
|
db.cpp \
|
|
|
|
demo.cpp \
|
|
|
|
dude.cpp \
|
|
|
|
endgame.cpp \
|
|
|
|
eventq.cpp \
|
|
|
|
fire.cpp \
|
|
|
|
fx.cpp \
|
|
|
|
gamemenu.cpp \
|
|
|
|
gameutil.cpp \
|
|
|
|
getopt.cpp \
|
|
|
|
gib.cpp \
|
|
|
|
globals.cpp \
|
|
|
|
inifile.cpp \
|
|
|
|
iob.cpp \
|
|
|
|
levels.cpp \
|
|
|
|
loadsave.cpp \
|
|
|
|
map2d.cpp \
|
|
|
|
menu.cpp \
|
|
|
|
messages.cpp \
|
|
|
|
mirrors.cpp \
|
|
|
|
misc.cpp \
|
|
|
|
network.cpp \
|
|
|
|
osdcmd.cpp \
|
|
|
|
player.cpp \
|
|
|
|
pqueue.cpp \
|
|
|
|
qav.cpp \
|
|
|
|
qheap.cpp \
|
|
|
|
replace.cpp \
|
|
|
|
resource.cpp \
|
|
|
|
screen.cpp \
|
|
|
|
sectorfx.cpp \
|
|
|
|
seq.cpp \
|
|
|
|
sfx.cpp \
|
|
|
|
sound.cpp \
|
|
|
|
tile.cpp \
|
|
|
|
trig.cpp \
|
|
|
|
triggers.cpp \
|
|
|
|
view.cpp \
|
|
|
|
warp.cpp \
|
|
|
|
weapon.cpp \
|
|
|
|
|
|
|
|
blood_game_rsrc_objs :=
|
|
|
|
blood_game_gen_objs :=
|
|
|
|
|
|
|
|
blood_game_miscdeps :=
|
|
|
|
blood_game_orderonlydeps :=
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
|
|
|
blood_game_objs += startosx.game.mm
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
blood_game_objs += winbits.cpp
|
|
|
|
blood_game_rsrc_objs += gameres.rc
|
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
|
|
|
blood_game_objs += startwin.game.cpp
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (11,$(HAVE_GTK2)$(STARTUP_WINDOW))
|
|
|
|
blood_game_objs += startgtk.game.cpp
|
|
|
|
blood_game_gen_objs += game_banner.c
|
|
|
|
endif
|
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
|
|
|
blood_game_rsrc_objs += game_icon.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
#### Redneck Rampage
|
|
|
|
|
|
|
|
rr := rr
|
|
|
|
|
|
|
|
rr_game_ldflags :=
|
|
|
|
rr_editor_ldflags :=
|
|
|
|
|
|
|
|
rr_game_stripflags :=
|
|
|
|
rr_editor_stripflags :=
|
|
|
|
|
|
|
|
rr_root := $(source)/$(rr)
|
|
|
|
rr_src := $(rr_root)/src
|
|
|
|
rr_rsrc := $(rr_root)/rsrc
|
|
|
|
rr_obj := $(obj)/$(rr)
|
|
|
|
|
|
|
|
rr_cflags := -I$(rr_src)
|
|
|
|
|
|
|
|
common_editor_deps := rr_common_editor engine_editor
|
|
|
|
|
2019-06-08 12:25:39 +00:00
|
|
|
rr_game_deps := audiolib mact
|
2019-06-08 11:50:42 +00:00
|
|
|
rr_editor_deps := audiolib
|
|
|
|
|
|
|
|
ifneq (0,$(NETCODE))
|
|
|
|
rr_game_deps += enet
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (0,$(LUNATIC))
|
|
|
|
rr_game_deps += lunatic lunatic_game lpeg
|
|
|
|
rr_editor_deps += lunatic lunatic_editor lpeg
|
|
|
|
endif
|
|
|
|
|
|
|
|
rr_game := rednukem
|
|
|
|
rr_editor := rrmapster32
|
|
|
|
|
|
|
|
ifneq (,$(APPBASENAME))
|
|
|
|
rr_game := $(APPBASENAME)
|
|
|
|
endif
|
|
|
|
|
|
|
|
rr_game_proper := Rednukem
|
|
|
|
rr_editor_proper := RRMapster32
|
|
|
|
|
|
|
|
rr_common_editor_objs := \
|
|
|
|
m32common.cpp \
|
|
|
|
m32def.cpp \
|
|
|
|
m32exec.cpp \
|
|
|
|
m32vars.cpp \
|
|
|
|
|
|
|
|
rr_game_objs := \
|
|
|
|
game.cpp \
|
|
|
|
global.cpp \
|
|
|
|
actors.cpp \
|
|
|
|
gamedef.cpp \
|
|
|
|
gameexec.cpp \
|
|
|
|
gamevars.cpp \
|
|
|
|
player.cpp \
|
|
|
|
premap.cpp \
|
|
|
|
sector.cpp \
|
|
|
|
anim.cpp \
|
|
|
|
common.cpp \
|
|
|
|
config.cpp \
|
|
|
|
demo.cpp \
|
|
|
|
input.cpp \
|
|
|
|
menus.cpp \
|
|
|
|
namesdyn.cpp \
|
|
|
|
net.cpp \
|
|
|
|
savegame.cpp \
|
|
|
|
rts.cpp \
|
|
|
|
osdfuncs.cpp \
|
|
|
|
osdcmds.cpp \
|
|
|
|
grpscan.cpp \
|
|
|
|
sounds.cpp \
|
|
|
|
soundsdyn.cpp \
|
|
|
|
cheats.cpp \
|
|
|
|
sbar.cpp \
|
|
|
|
screentext.cpp \
|
|
|
|
screens.cpp \
|
|
|
|
cmdline.cpp \
|
|
|
|
|
|
|
|
rr_editor_objs := \
|
|
|
|
astub.cpp \
|
|
|
|
common.cpp \
|
|
|
|
grpscan.cpp \
|
|
|
|
sounds_mapster32.cpp \
|
|
|
|
|
|
|
|
rr_game_rsrc_objs :=
|
|
|
|
rr_editor_rsrc_objs :=
|
|
|
|
rr_game_gen_objs :=
|
|
|
|
rr_editor_gen_objs :=
|
|
|
|
|
|
|
|
rr_game_miscdeps :=
|
|
|
|
rr_editor_miscdeps :=
|
|
|
|
rr_game_orderonlydeps :=
|
|
|
|
rr_editor_orderonlydeps :=
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
|
|
|
rr_game_objs += GrpFile.game.mm GameListSource.game.mm startosx.game.mm
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
|
|
|
rr_game_objs += winbits.cpp
|
|
|
|
rr_game_rsrc_objs += gameres.rc
|
|
|
|
rr_editor_rsrc_objs += buildres.rc
|
|
|
|
ifeq ($(STARTUP_WINDOW),1)
|
|
|
|
rr_game_objs += startwin.game.cpp
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLATFORM),WII)
|
|
|
|
LIBS += -lvorbisidec
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq (11,$(HAVE_GTK2)$(STARTUP_WINDOW))
|
|
|
|
rr_game_objs += startgtk.game.cpp
|
|
|
|
rr_game_gen_objs += game_banner.c
|
|
|
|
rr_editor_gen_objs += build_banner.c
|
|
|
|
endif
|
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
|
|
|
rr_game_rsrc_objs += game_icon.c
|
|
|
|
rr_editor_rsrc_objs += build_icon.c
|
|
|
|
endif
|
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### Shadow Warrior
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw := sw
|
2016-05-23 04:46:57 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_root := $(source)/$(sw)
|
|
|
|
sw_src := $(sw_root)/src
|
|
|
|
sw_rsrc := $(sw_root)/rsrc
|
|
|
|
sw_obj := $(obj)/$(sw)
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_cflags := -I$(sw_src)
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2019-06-08 12:25:39 +00:00
|
|
|
sw_game_deps := audiolib mact
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_editor_deps := audiolib
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_game := voidsw
|
2019-04-08 06:28:54 +00:00
|
|
|
sw_editor := wangulator
|
2016-05-23 04:46:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_game_proper := VoidSW
|
2019-04-08 06:28:54 +00:00
|
|
|
sw_editor_proper := Wangulator
|
2017-08-06 13:44:39 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_game_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
actor.cpp \
|
|
|
|
ai.cpp \
|
|
|
|
anim.cpp \
|
|
|
|
border.cpp \
|
|
|
|
break.cpp \
|
|
|
|
bunny.cpp \
|
|
|
|
cache.cpp \
|
|
|
|
cheats.cpp \
|
|
|
|
colormap.cpp \
|
|
|
|
common.cpp \
|
|
|
|
config.cpp \
|
|
|
|
console.cpp \
|
|
|
|
coolg.cpp \
|
|
|
|
coolie.cpp \
|
|
|
|
copysect.cpp \
|
|
|
|
demo.cpp \
|
|
|
|
draw.cpp \
|
|
|
|
eel.cpp \
|
|
|
|
game.cpp \
|
|
|
|
girlninj.cpp \
|
|
|
|
goro.cpp \
|
|
|
|
grpscan.cpp \
|
|
|
|
hornet.cpp \
|
|
|
|
interp.cpp \
|
|
|
|
interpsh.cpp \
|
|
|
|
inv.cpp \
|
|
|
|
jplayer.cpp \
|
|
|
|
jsector.cpp \
|
|
|
|
jweapon.cpp \
|
|
|
|
lava.cpp \
|
|
|
|
light.cpp \
|
|
|
|
mclip.cpp \
|
|
|
|
mdastr.cpp \
|
|
|
|
menus.cpp \
|
|
|
|
miscactr.cpp \
|
|
|
|
morph.cpp \
|
2019-03-21 02:24:19 +00:00
|
|
|
network.cpp \
|
2017-03-23 20:46:47 +00:00
|
|
|
ninja.cpp \
|
|
|
|
panel.cpp \
|
|
|
|
player.cpp \
|
|
|
|
predict.cpp \
|
|
|
|
quake.cpp \
|
|
|
|
ripper.cpp \
|
|
|
|
ripper2.cpp \
|
|
|
|
rooms.cpp \
|
|
|
|
rotator.cpp \
|
|
|
|
rts.cpp \
|
|
|
|
save.cpp \
|
|
|
|
scrip2.cpp \
|
|
|
|
sector.cpp \
|
|
|
|
serp.cpp \
|
|
|
|
setup.cpp \
|
|
|
|
skel.cpp \
|
|
|
|
skull.cpp \
|
|
|
|
slidor.cpp \
|
|
|
|
sounds.cpp \
|
|
|
|
spike.cpp \
|
|
|
|
sprite.cpp \
|
|
|
|
sumo.cpp \
|
|
|
|
swconfig.cpp \
|
|
|
|
sync.cpp \
|
|
|
|
text.cpp \
|
|
|
|
track.cpp \
|
|
|
|
vator.cpp \
|
|
|
|
vis.cpp \
|
|
|
|
wallmove.cpp \
|
|
|
|
warp.cpp \
|
|
|
|
weapon.cpp \
|
|
|
|
zilla.cpp \
|
|
|
|
zombie.cpp \
|
|
|
|
saveable.cpp \
|
2016-05-23 04:47:18 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_editor_objs := \
|
2017-03-23 20:46:47 +00:00
|
|
|
jnstub.cpp \
|
|
|
|
brooms.cpp \
|
|
|
|
bldscript.cpp \
|
|
|
|
jbhlp.cpp \
|
|
|
|
colormap.cpp \
|
|
|
|
grpscan.cpp \
|
|
|
|
common.cpp \
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_game_rsrc_objs :=
|
|
|
|
sw_editor_rsrc_objs :=
|
|
|
|
sw_game_gen_objs :=
|
|
|
|
sw_editor_gen_objs :=
|
2017-03-23 20:46:52 +00:00
|
|
|
|
2017-06-09 06:38:42 +00:00
|
|
|
ifeq (1,$(HAVE_GTK2))
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_game_objs += startgtk.game.cpp
|
|
|
|
sw_game_gen_objs += game_banner.c
|
|
|
|
sw_editor_gen_objs += build_banner.c
|
2017-06-09 06:38:42 +00:00
|
|
|
endif
|
2015-05-19 21:56:03 +00:00
|
|
|
ifeq ($(RENDERTYPE),SDL)
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_game_rsrc_objs += game_icon.c
|
|
|
|
sw_editor_rsrc_objs += game_icon.c
|
2015-05-19 21:56:03 +00:00
|
|
|
endif
|
|
|
|
ifeq ($(PLATFORM),WINDOWS)
|
2017-08-06 13:44:49 +00:00
|
|
|
sw_game_objs += startwin.game.cpp
|
|
|
|
sw_game_rsrc_objs += gameres.rc
|
|
|
|
sw_editor_rsrc_objs += buildres.rc
|
2015-05-19 21:56:03 +00:00
|
|
|
endif
|
|
|
|
|
2017-08-06 13:44:39 +00:00
|
|
|
|
|
|
|
#### Final setup
|
|
|
|
|
2019-07-24 15:00:49 +00:00
|
|
|
COMPILERFLAGS += -I$(engine_inc) -I$(mact_inc) -I$(audiolib_inc) -I$(enet_inc) -I$(glad_inc) -MP -MMD
|
2019-03-01 08:51:50 +00:00
|
|
|
ifneq (0,$(USE_PHYSFS))
|
|
|
|
COMPILERFLAGS += -I$(physfs_inc) -DUSE_PHYSFS
|
|
|
|
endif
|
2017-03-23 03:03:32 +00:00
|
|
|
|
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
##### Recipes
|
2017-03-23 03:03:32 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
games := \
|
|
|
|
kenbuild \
|
|
|
|
duke3d \
|
2019-06-08 11:50:42 +00:00
|
|
|
rr \
|
2017-08-06 13:44:49 +00:00
|
|
|
sw \
|
2017-03-23 03:03:32 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
libraries := \
|
|
|
|
engine \
|
|
|
|
audiolib \
|
|
|
|
mact \
|
|
|
|
enet \
|
|
|
|
libxmplite \
|
|
|
|
lpeg \
|
2018-02-16 06:38:21 +00:00
|
|
|
glad \
|
2017-03-23 03:03:32 +00:00
|
|
|
|
2019-03-01 08:51:50 +00:00
|
|
|
ifneq (0,$(USE_PHYSFS))
|
|
|
|
libraries += physfs
|
|
|
|
endif
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
components := \
|
|
|
|
$(games) \
|
|
|
|
$(libraries) \
|
|
|
|
tools \
|
2017-03-23 03:03:32 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
roles := \
|
|
|
|
game \
|
|
|
|
editor \
|
2015-05-19 21:56:03 +00:00
|
|
|
|
|
|
|
|
2008-10-19 12:14:04 +00:00
|
|
|
ifeq ($(PRETTY_OUTPUT),1)
|
2008-10-18 12:37:26 +00:00
|
|
|
.SILENT:
|
2008-10-19 12:14:04 +00:00
|
|
|
endif
|
2017-03-23 20:46:41 +00:00
|
|
|
.PHONY: \
|
|
|
|
all \
|
2017-06-09 06:38:46 +00:00
|
|
|
start \
|
2017-08-06 13:44:52 +00:00
|
|
|
$(addprefix clean,$(games) test utils tools) \
|
2017-03-23 20:46:41 +00:00
|
|
|
veryclean \
|
|
|
|
clean \
|
|
|
|
printutils \
|
|
|
|
printtools \
|
|
|
|
rev \
|
2017-08-06 13:44:49 +00:00
|
|
|
$(engine_obj)/rev.$o \
|
2017-03-23 20:47:11 +00:00
|
|
|
clang-tools \
|
2017-03-23 20:46:41 +00:00
|
|
|
|
2017-01-23 11:24:21 +00:00
|
|
|
.SUFFIXES:
|
2017-03-23 03:03:34 +00:00
|
|
|
.SECONDEXPANSION:
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### Targets
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2015-05-19 21:56:03 +00:00
|
|
|
all: duke3d
|
|
|
|
|
2012-11-15 06:42:37 +00:00
|
|
|
start:
|
2008-10-18 13:25:23 +00:00
|
|
|
$(BUILD_STARTED)
|
2010-01-24 23:33:17 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
tools: $(addsuffix $(EXESUFFIX),$(tools_targets)) | start
|
2017-08-06 13:44:54 +00:00
|
|
|
@$(call LL,$^)
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:52 +00:00
|
|
|
$(games): $$(foreach i,$(roles),$$($$@_$$i)$(EXESUFFIX)) | start
|
2017-08-06 13:44:54 +00:00
|
|
|
@$(call LL,$^)
|
2014-12-18 18:15:05 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
ebacktrace: $(ebacktrace_dll) | start
|
2017-08-06 13:44:54 +00:00
|
|
|
@$(call LL,$^)
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2014-12-18 18:15:05 +00:00
|
|
|
ifeq ($(PLATFORM),WII)
|
|
|
|
ifneq ($(ELF2DOL),)
|
2017-03-23 03:03:32 +00:00
|
|
|
%$(DOLSUFFIX): %$(EXESUFFIX)
|
2014-12-18 18:15:05 +00:00
|
|
|
endif
|
|
|
|
endif
|
2017-08-06 13:44:52 +00:00
|
|
|
|
|
|
|
|
2017-03-23 03:03:32 +00:00
|
|
|
define BUILDRULE
|
2010-01-24 23:33:17 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_$2)$$(EXESUFFIX): $$(foreach i,$(call getdeps,$1,$2),$$(call expandobjs,$$i)) $$($1_$2_miscdeps) | $$($1_$2_orderonlydeps)
|
2017-03-23 03:03:32 +00:00
|
|
|
$$(LINK_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(LINKER) -o $$@ $$^ $$(GUI_LIBS) $$($1_$2_ldflags) $$(LIBDIRS) $$(LIBS) $$(RECIPE_RESULT_LINK)
|
2017-03-23 03:03:32 +00:00
|
|
|
ifeq ($$(PLATFORM),WII)
|
|
|
|
ifneq ($$(ELF2DOL),)
|
|
|
|
$$(ELF2DOL) $$@ $$($1_$2)$$(DOLSUFFIX)
|
2014-12-18 18:15:05 +00:00
|
|
|
endif
|
|
|
|
endif
|
2017-03-23 03:03:32 +00:00
|
|
|
ifneq ($$(STRIP),)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(STRIP) $$@ $$($1_$2_stripflags)
|
2010-08-12 21:06:51 +00:00
|
|
|
endif
|
2017-03-23 03:03:32 +00:00
|
|
|
ifeq ($$(PLATFORM),DARWIN)
|
2017-08-06 13:44:49 +00:00
|
|
|
cp -RPf "platform/Apple/bundles/$$($1_$2_proper).app" "./"
|
2017-08-06 13:44:54 +00:00
|
|
|
$(call MKDIR,"$$($1_$2_proper).app/Contents/MacOS")
|
2017-08-06 13:44:49 +00:00
|
|
|
cp -f "$$($1_$2)$$(EXESUFFIX)" "$$($1_$2_proper).app/Contents/MacOS/"
|
2012-02-25 02:59:51 +00:00
|
|
|
endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2017-03-23 03:03:32 +00:00
|
|
|
endef
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$(foreach i,$(games),$(foreach j,$(roles),$(eval $(call BUILDRULE,$i,$j))))
|
2015-05-19 21:56:03 +00:00
|
|
|
|
|
|
|
|
2019-06-08 11:50:42 +00:00
|
|
|
include $(lpeg_root)/Dependencies.mak
|
|
|
|
include $(engine_root)/Dependencies.mak
|
|
|
|
include $(duke3d_root)/Dependencies.mak
|
|
|
|
include $(blood_root)/Dependencies.mak
|
|
|
|
include $(rr_root)/Dependencies.mak
|
|
|
|
include $(sw_root)/Dependencies.mak
|
|
|
|
|
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
#### Rules
|
2012-10-07 15:25:58 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$(ebacktrace_dll): platform/Windows/src/backtrace.c
|
2012-11-15 06:42:37 +00:00
|
|
|
$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$(RECIPE_IF) $(CC) $(CONLYFLAGS) -O2 -ggdb -shared -Wall -Wextra -static-libgcc -I$(engine_inc) -o $@ $^ -lbfd -liberty -limagehlp $(RECIPE_RESULT_COMPILE)
|
2010-08-12 21:06:51 +00:00
|
|
|
|
2018-11-05 07:28:07 +00:00
|
|
|
libklzw$(DLLSUFFIX): $(engine_src)/klzw.cpp
|
2008-10-18 13:25:23 +00:00
|
|
|
$(COMPILE_STATUS)
|
2018-11-05 07:28:07 +00:00
|
|
|
$(RECIPE_IF) $(COMPILER_C) -shared -fPIC $< -o $@ $(RECIPE_RESULT_COMPILE)
|
2008-10-18 12:37:26 +00:00
|
|
|
|
2017-08-06 13:44:57 +00:00
|
|
|
# to debug the tools link phase, make a copy of this rule explicitly replacing % with the name of a tool, such as kextract
|
2017-08-06 13:44:49 +00:00
|
|
|
%$(EXESUFFIX): $(tools_obj)/%.$o $(foreach i,tools $(tools_deps),$(call expandobjs,$i))
|
2017-03-22 15:45:49 +00:00
|
|
|
$(LINK_STATUS)
|
|
|
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(LIBDIRS) $(LIBS) $(RECIPE_RESULT_LINK)
|
2013-12-06 18:56:46 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
enumdisplay$(EXESUFFIX): $(tools_obj)/enumdisplay.$o
|
2017-03-22 15:45:49 +00:00
|
|
|
$(LINK_STATUS)
|
|
|
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(LIBDIRS) $(LIBS) -lgdi32 $(RECIPE_RESULT_LINK)
|
2017-08-06 13:44:49 +00:00
|
|
|
getdxdidf$(EXESUFFIX): $(tools_obj)/getdxdidf.$o
|
2017-03-22 15:45:49 +00:00
|
|
|
$(LINK_STATUS)
|
|
|
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(LIBDIRS) $(LIBS) -ldinput $(RECIPE_RESULT_LINK)
|
2012-11-08 20:17:23 +00:00
|
|
|
|
2017-03-23 03:03:37 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
### Lunatic
|
2012-10-07 15:25:58 +00:00
|
|
|
|
2012-05-13 16:05:16 +00:00
|
|
|
# Create object files directly with luajit
|
2017-08-06 13:44:49 +00:00
|
|
|
$(duke3d_obj)/%.$o: $(lunatic_src)/%.lua | $(duke3d_obj)
|
2012-05-13 16:05:16 +00:00
|
|
|
$(COMPILE_STATUS)
|
2014-07-22 07:25:54 +00:00
|
|
|
$(RECIPE_IF) $(LUAJIT) -bg $(LUAJIT_BCOPTS) $< $@ $(RECIPE_RESULT_COMPILE)
|
2012-05-13 16:05:16 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$(duke3d_obj)/%.$o: $(lunatic_src)/%.cpp | $(duke3d_obj)
|
2011-09-20 19:12:24 +00:00
|
|
|
$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$(RECIPE_IF) $(COMPILER_CXX) $(duke3d_cflags) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
2011-09-20 19:12:24 +00:00
|
|
|
|
2012-10-07 15:25:58 +00:00
|
|
|
# List of exported symbols, OS X
|
2017-08-06 13:44:49 +00:00
|
|
|
$(duke3d_obj)/lunatic_%_osx: $(lunatic_src)/%.lds | $(duke3d_obj)
|
2011-10-11 16:53:15 +00:00
|
|
|
sed 's/[{};]//g;s/[A-Za-z_][A-Za-z_0-9]*/_&/g' $< > $@
|
|
|
|
|
2012-10-07 15:25:58 +00:00
|
|
|
# List of exported symbols, Windows
|
2017-08-06 13:44:49 +00:00
|
|
|
$(duke3d_obj)/lunatic_%.def: $(lunatic_src)/%.lds | $(duke3d_obj)
|
2012-11-30 18:57:50 +00:00
|
|
|
echo EXPORTS > $@
|
|
|
|
sed 's/[{};]//g' $< >> $@
|
|
|
|
|
2012-10-07 15:25:58 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
### Main Rules
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-03-23 03:03:37 +00:00
|
|
|
define OBJECTRULES
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2019-07-24 15:00:49 +00:00
|
|
|
include $(wildcard $($1_obj)/*.d)
|
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_src)/%.nasm | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
|
|
|
$$(RECIPE_IF) $$(AS) $$(ASFLAGS) $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_src)/%.yasm | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
|
|
|
$$(RECIPE_IF) $$(AS) $$(ASFLAGS) $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2011-06-17 11:53:41 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_src)/%.c | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2008-10-18 12:37:26 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_src)/%.cpp | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(COMPILER_CXX) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2012-03-12 04:48:42 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_src)/%.m | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(COMPILER_OBJC) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2011-02-12 13:25:24 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_src)/%.mm | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(COMPILER_OBJCXX) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2019-07-13 00:12:46 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_obj)/%.c | $$($1_obj)
|
2017-06-10 06:21:29 +00:00
|
|
|
$$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2017-06-10 06:21:29 +00:00
|
|
|
|
2019-07-14 01:48:23 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_src)/%.glsl | $$($1_obj)
|
|
|
|
@echo Creating $$($1_obj)/$$(<F).cpp from $$<
|
2019-07-16 09:35:13 +00:00
|
|
|
@$$(call RAW_ECHO,extern char const *$$(basename $$(<F));) > $$($1_obj)/$$(<F).cpp
|
|
|
|
@$$(call RAW_ECHO,char const *$$(basename $$(<F)) = R"shader$$(paren_open)) >> $$($1_obj)/$$(<F).cpp
|
2019-07-14 01:48:23 +00:00
|
|
|
@$$(call CAT,$$<) >> $$($1_obj)/$$(<F).cpp
|
|
|
|
@$$(call RAW_ECHO,$$(paren_close)shader";) >> $$($1_obj)/$$(<F).cpp
|
2019-07-16 08:38:28 +00:00
|
|
|
$$(COMPILE_STATUS)
|
|
|
|
$$(RECIPE_IF) $$(COMPILER_CXX) $$($1_cflags) -c $$($1_obj)/$$(<F).cpp -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2019-07-12 08:44:36 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
## Cosmetic stuff
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_rsrc)/%.rc | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(RC) -i $$< -o $$@ --include-dir=$$(engine_inc) --include-dir=$$($1_src) --include-dir=$$($1_rsrc) -DPOLYMER=$$(POLYMER) $$(RECIPE_RESULT_COMPILE)
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%.$$o: $$($1_rsrc)/%.c | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
$$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$$(RECIPE_IF) $$(COMPILER_C) $$($1_cflags) -c $$< -o $$@ $$(RECIPE_RESULT_COMPILE)
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$$($1_obj)/%_banner.c: $$($1_rsrc)/%.bmp | $$($1_obj)
|
2017-03-23 03:03:37 +00:00
|
|
|
echo "#include \"gtkpixdata_shim.h\"" > $$@
|
|
|
|
gdk-pixbuf-csource --extern --struct --raw --name=startbanner_pixdata $$^ | sed 's/load_inc//' >> $$@
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-03-23 03:03:37 +00:00
|
|
|
endef
|
2014-07-22 07:25:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$(foreach i,$(components),$(eval $(call OBJECTRULES,$i)))
|
2014-11-28 23:47:46 +00:00
|
|
|
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
### Other special cases
|
2016-06-03 04:50:57 +00:00
|
|
|
|
2017-03-23 03:03:37 +00:00
|
|
|
# Comment out the following rule to debug a-c.o
|
2017-08-06 13:44:49 +00:00
|
|
|
$(engine_obj)/a-c.$o: $(engine_src)/a-c.cpp | $(engine_obj)
|
2015-05-19 21:56:03 +00:00
|
|
|
$(COMPILE_STATUS)
|
2017-12-10 03:24:39 +00:00
|
|
|
$(RECIPE_IF) $(subst -O$(OPTLEVEL),-O2,$(subst $(ASAN_FLAGS),,$(COMPILER_CXX))) $(engine_cflags) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
2015-05-19 21:56:03 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
$(engine_obj)/rev.$o: $(engine_src)/rev.cpp | $(engine_obj)
|
2015-05-19 21:56:03 +00:00
|
|
|
$(COMPILE_STATUS)
|
2017-08-06 13:44:49 +00:00
|
|
|
$(RECIPE_IF) $(COMPILER_CXX) $(engine_cflags) $(REVFLAG) -c $< -o $@ $(RECIPE_RESULT_COMPILE)
|
2015-05-19 21:56:03 +00:00
|
|
|
|
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
### Directories
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2019-07-14 01:48:23 +00:00
|
|
|
$(foreach i,$(components),$($i_obj)):
|
2017-08-06 13:44:54 +00:00
|
|
|
-$(call MKDIR,$@)
|
2017-03-23 03:03:37 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
### Phonies
|
2008-08-20 22:58:09 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
clang-tools: $(filter %.c %.cpp,$(foreach i,$(call getdeps,duke3d,game),$(call expandsrcs,$i)))
|
2018-03-22 04:48:50 +00:00
|
|
|
echo $^ -- -x c++ $(CXXONLYFLAGS) $(COMPILERFLAGS) $(CWARNS) $(foreach i,$(components),$($i_cflags))
|
2017-03-23 20:47:11 +00:00
|
|
|
|
2017-08-06 13:44:52 +00:00
|
|
|
$(addprefix clean,$(games)):
|
2017-08-06 13:44:54 +00:00
|
|
|
-$(call RM,$(foreach i,$(roles),$($(subst clean,,$@)_$i)$(EXESUFFIX)))
|
|
|
|
-$(call RMDIR,$($(subst clean,,$@)_obj))
|
2012-02-26 17:32:53 +00:00
|
|
|
ifeq ($(PLATFORM),DARWIN)
|
2017-08-06 13:44:54 +00:00
|
|
|
-$(call RMDIR,$(foreach i,$(roles),"$($(subst clean,,$@)_$i_proper).app"))
|
2012-02-26 17:32:53 +00:00
|
|
|
endif
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
cleantools:
|
2017-08-06 13:44:54 +00:00
|
|
|
-$(call RM,$(addsuffix $(EXESUFFIX),$($(subst clean,,$@)_targets)))
|
|
|
|
-$(call RMDIR,$($(subst clean,,$@)_obj))
|
2012-11-15 06:42:37 +00:00
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
clean: cleanduke3d cleantools
|
2017-08-06 13:44:54 +00:00
|
|
|
-$(call RMDIR,$(obj))
|
|
|
|
-$(call RM,$(ebacktrace_dll))
|
2012-11-15 06:42:37 +00:00
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
printtools:
|
2017-08-06 13:44:49 +00:00
|
|
|
echo "$(addsuffix $(EXESUFFIX),$(tools_targets))"
|
2017-02-01 10:20:54 +00:00
|
|
|
|
2017-08-06 13:44:49 +00:00
|
|
|
rev: $(engine_obj)/rev.$o
|
2014-02-22 08:02:41 +00:00
|
|
|
|
2017-02-01 10:20:54 +00:00
|
|
|
|
2017-06-09 06:38:49 +00:00
|
|
|
### Compatibility
|
2017-02-01 10:20:54 +00:00
|
|
|
|
|
|
|
test: kenbuild
|
|
|
|
utils: tools
|
|
|
|
printutils: printtools
|
|
|
|
veryclean: clean
|
|
|
|
cleanutils: cleantools
|
2017-03-23 03:03:34 +00:00
|
|
|
cleantest: cleankenbuild
|