Mercurial > repos > blastem
diff Makefile @ 1693:ba3fb7a3be6b
Added some Makefile options to build a packaging friendly executable
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 22 Jan 2019 21:15:38 -0800 |
parents | 395f684c5379 |
children | 956c1cce05e2 49a52c737bf0 |
line wrap: on
line diff
--- a/Makefile Sun Jan 20 22:48:16 2019 -0800 +++ b/Makefile Tue Jan 22 21:15:38 2019 -0800 @@ -47,6 +47,14 @@ 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 @@ 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 @@ 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