summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2019-01-22 21:15:38 -0800
committerMichael Pavone <pavone@retrodev.com>2019-01-22 21:15:38 -0800
commitf69db0983a2f435e7a0147bf8ad82b16196d4397 (patch)
tree206952a99c231a5a2214c41a8576fe7e82db6871 /Makefile
parent3916a1dcdac01b4a7da14c9561707046af6a1ef5 (diff)
Added some Makefile options to build a packaging friendly executable
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 16 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 7b2fc5e..8a5b397 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,14 @@ endif #USE_GLES
FONT:=nuklear_ui/font.o
endif #Darwin
+ifdef HOST_ZLIB
+LIBS+= zlib
+LIBZOBJS=
+else
+LIBZOBJS=zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/gzclose.o zlib/gzlib.o zlib/gzread.o\
+ zlib/gzwrite.o zlib/infback.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
+endif
+
ifeq ($(OS),Darwin)
#This should really be based on whether or not the C compiler is clang rather than based on the OS
CFLAGS+= -Wno-logical-op-parentheses
@@ -156,8 +164,6 @@ AUDIOOBJS=ym2612.o psg.o wave.o
CONFIGOBJS=config.o tern.o util.o paths.o
NUKLEAROBJS=$(FONT) nuklear_ui/blastem_nuklear.o nuklear_ui/sfnt.o controller_info.o
RENDEROBJS=render_sdl.o ppm.o
-LIBZOBJS=zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/deflate.o zlib/gzclose.o zlib/gzlib.o zlib/gzread.o\
- zlib/gzwrite.o zlib/infback.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/uncompr.o zlib/zutil.o
ifdef NOZLIB
CFLAGS+= -DDISABLE_ZLIB
@@ -202,6 +208,14 @@ ifeq ($(OS),Windows)
MAINOBJS+= res.o
endif
+ifdef CONFIG_PATH
+CFLAGS+= -DCONFIG_PATH='"'$(CONFIG_PATH)'"'
+endif
+
+ifdef DATA_PATH
+CFLAGS+= -DDATA_PATH='"'$(DATA_PATH)'"'
+endif
+
ALL=dis$(EXE) zdis$(EXE) stateview$(EXE) vgmplay$(EXE) blastem$(EXE)
ifneq ($(OS),Windows)
ALL+= termhelper