2013-07-19 03:58:35 +00:00
|
|
|
TARGET = retroarch.js
|
2013-07-18 00:26:01 +00:00
|
|
|
|
2014-01-27 00:47:10 +00:00
|
|
|
OBJ = frontend/platform/platform_emscripten.o \
|
2014-05-09 04:12:53 +00:00
|
|
|
frontend/platform/platform_null.o \
|
2013-12-29 21:19:07 +00:00
|
|
|
frontend/frontend.o \
|
2014-07-23 05:18:27 +00:00
|
|
|
frontend/frontend_context.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
retroarch.o \
|
|
|
|
file.o \
|
2014-07-26 16:31:34 +00:00
|
|
|
file_list.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
file_path.o \
|
|
|
|
driver.o \
|
|
|
|
conf/config_file.o \
|
|
|
|
settings.o \
|
2014-05-03 16:38:29 +00:00
|
|
|
settings_data.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
hash.o \
|
|
|
|
dynamic.o \
|
|
|
|
dynamic_dummy.o \
|
2013-11-06 14:08:54 +00:00
|
|
|
message_queue.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
rewind.o \
|
|
|
|
movie.o \
|
|
|
|
gfx/gfx_common.o \
|
2014-08-14 01:05:44 +00:00
|
|
|
input/nullinput.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
input/input_common.o \
|
2013-09-11 00:21:48 +00:00
|
|
|
input/rwebinput_input.o \
|
2014-06-19 00:31:41 +00:00
|
|
|
input/keyboard_line.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
core_options.o \
|
|
|
|
patch.o \
|
|
|
|
compat/compat.o \
|
2013-07-19 03:58:35 +00:00
|
|
|
compat/rxml/rxml.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
screenshot.o \
|
|
|
|
cheats.o \
|
|
|
|
audio/utils.o \
|
2013-09-11 00:21:48 +00:00
|
|
|
audio/rwebaudio.o \
|
2014-06-19 00:31:41 +00:00
|
|
|
audio/dsp_filter.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
input/overlay.o \
|
|
|
|
fifo_buffer.o \
|
|
|
|
gfx/scaler/scaler.o \
|
2014-05-08 19:49:18 +00:00
|
|
|
gfx/shader_common.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
gfx/scaler/pixconv.o \
|
|
|
|
gfx/scaler/scaler_int.o \
|
2014-04-16 13:48:33 +00:00
|
|
|
gfx/scaler/scaler_filter.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
gfx/state_tracker.o \
|
|
|
|
gfx/shader_parse.o \
|
|
|
|
gfx/fonts/fonts.o \
|
|
|
|
gfx/fonts/bitmapfont.o \
|
2014-05-10 18:26:58 +00:00
|
|
|
gfx/image/image_rpng.o \
|
2014-06-19 00:31:41 +00:00
|
|
|
gfx/filter.o \
|
2013-07-18 00:26:01 +00:00
|
|
|
audio/resampler.o \
|
|
|
|
audio/sinc.o \
|
2014-04-20 02:17:18 +00:00
|
|
|
audio/cc_resampler.o \
|
2014-08-14 01:05:44 +00:00
|
|
|
audio/nullaudio.o \
|
2013-10-31 01:36:17 +00:00
|
|
|
performance.o \
|
2014-08-02 12:04:43 +00:00
|
|
|
core_info.o \
|
2014-08-14 01:05:44 +00:00
|
|
|
location/nulllocation.o \
|
2014-08-14 00:55:04 +00:00
|
|
|
camera/nullcamera.o \
|
2014-08-14 01:05:44 +00:00
|
|
|
camera/rwebcam.o \
|
2014-08-14 04:40:33 +00:00
|
|
|
input/osk/nullosk.o \
|
2014-08-14 01:05:44 +00:00
|
|
|
gfx/nullgfx.o
|
|
|
|
|
2013-07-18 00:26:01 +00:00
|
|
|
|
|
|
|
HAVE_OPENGL = 1
|
|
|
|
HAVE_RGUI = 1
|
2013-09-11 00:21:48 +00:00
|
|
|
HAVE_SDL = 0
|
2013-07-18 00:26:01 +00:00
|
|
|
HAVE_ZLIB = 1
|
|
|
|
HAVE_FBO = 1
|
2013-07-19 03:58:35 +00:00
|
|
|
WANT_MINIZ = 1
|
2014-07-04 19:02:02 +00:00
|
|
|
MEMORY = 67108864
|
2013-08-18 06:50:10 +00:00
|
|
|
LTO = 0
|
2013-12-29 21:19:07 +00:00
|
|
|
# XXX: setting this to 1/2 currently crashes Firefox nightly
|
2014-07-07 00:02:44 +00:00
|
|
|
PRECISE_F32 = 2
|
2013-07-18 00:26:01 +00:00
|
|
|
|
2013-07-27 18:17:22 +00:00
|
|
|
ifneq ($(NATIVE_ZLIB),)
|
|
|
|
WANT_MINIZ = 0
|
|
|
|
endif
|
|
|
|
|
2013-08-18 06:50:10 +00:00
|
|
|
libretro = libretro_emscripten.bc
|
2013-07-18 00:26:01 +00:00
|
|
|
|
2013-12-29 21:19:07 +00:00
|
|
|
LIBS =
|
2014-08-14 01:05:44 +00:00
|
|
|
DEFINES = -DRARCH_INTERNAL -DHAVE_CC_RESAMPLER
|
2013-11-13 00:48:36 +00:00
|
|
|
LDFLAGS = -L. -s TOTAL_MEMORY=$(MEMORY) -s OUTLINING_LIMIT=50000 --js-library emscripten/library_rwebaudio.js --js-library emscripten/library_rwebinput.js --js-library emscripten/library_rwebcam.js --no-heap-copy
|
2013-07-18 00:26:01 +00:00
|
|
|
|
|
|
|
ifeq ($(HAVE_RGUI), 1)
|
2013-11-09 05:14:44 +00:00
|
|
|
DEFINES += -DHAVE_MENU -DHAVE_RGUI
|
2014-05-26 16:44:24 +00:00
|
|
|
OBJ += frontend/menu/disp/rgui.o
|
2014-04-25 23:53:40 +00:00
|
|
|
HAVE_MENU_COMMON = 1
|
|
|
|
endif
|
|
|
|
|
2014-08-15 15:24:28 +00:00
|
|
|
OBJ += playlist.o
|
2014-07-25 18:56:31 +00:00
|
|
|
|
2014-04-25 23:53:40 +00:00
|
|
|
ifeq ($(HAVE_MENU_COMMON), 1)
|
2014-08-31 16:36:26 +00:00
|
|
|
OBJ += frontend/menu/backend/menu_common_backend.o \
|
|
|
|
frontend/menu/menu_input_line_cb.o \
|
|
|
|
frontend/menu/menu_common.o \
|
|
|
|
frontend/menu/menu_navigation.o \
|
|
|
|
frontend/menu/menu_entries.o
|
2013-07-18 00:26:01 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_SDL), 1)
|
|
|
|
OBJ += input/sdl_input.o
|
|
|
|
LIBS += -lSDL
|
|
|
|
DEFINES += -ISDL -DHAVE_SDL
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_OPENGL), 1)
|
2013-08-25 19:39:50 +00:00
|
|
|
OBJ += gfx/gl.o gfx/math/matrix.o gfx/fonts/gl_font.o gfx/fonts/gl_raster_font.o gfx/gfx_context.o gfx/context/emscriptenegl_ctx.o gfx/shader_glsl.o gfx/glsym/rglgen.o gfx/glsym/glsym_es2.o
|
2013-07-18 00:26:01 +00:00
|
|
|
DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_ZLIB), 1)
|
|
|
|
OBJ += gfx/rpng/rpng.o file_extract.o
|
|
|
|
DEFINES += -DHAVE_ZLIB
|
|
|
|
ifeq ($(WANT_MINIZ), 1)
|
2014-06-19 00:31:41 +00:00
|
|
|
OBJ += deps/rzlib/adler32.o deps/rzlib/compress.o deps/rzlib/crc32.o deps/rzlib/deflate.o deps/rzlib/gzclose.o deps/rzlib/gzlib.o deps/rzlib/gzread.o deps/rzlib/gzwrite.o deps/rzlib/inffast.o deps/rzlib/inflate.o deps/rzlib/inftrees.o deps/rzlib/trees.o deps/rzlib/uncompr.o deps/rzlib/zutil.o deps/rzlib/ioapi.o deps/rzlib/unzip.o
|
2013-07-18 00:26:01 +00:00
|
|
|
DEFINES += -DWANT_MINIZ
|
|
|
|
else
|
|
|
|
LIBS += -lz
|
|
|
|
DEFINES += -DHAVE_ZLIB_DEFLATE
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(HAVE_FBO), 1)
|
|
|
|
DEFINES += -DHAVE_FBO
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(V), 1)
|
|
|
|
Q := @
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
2013-07-27 18:17:22 +00:00
|
|
|
LDFLAGS += -O0 -g
|
2013-08-18 06:50:10 +00:00
|
|
|
CFLAGS += -O0 -g
|
2013-07-18 00:26:01 +00:00
|
|
|
else
|
2013-08-18 06:50:10 +00:00
|
|
|
LDFLAGS += -O2
|
|
|
|
# WARNING: some optimizations can break some cores (ex: LTO breaks tyrquake)
|
2013-12-29 21:19:07 +00:00
|
|
|
LDFLAGS += -s PRECISE_F32=$(PRECISE_F32)
|
2013-08-18 06:50:10 +00:00
|
|
|
ifeq ($(LTO), 1)
|
|
|
|
LDFLAGS += --llvm-lto 3
|
|
|
|
endif
|
|
|
|
CFLAGS += -O2
|
2013-07-18 00:26:01 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I. -std=gnu99
|
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJ)
|
|
|
|
@$(if $(Q), $(shell echo echo LD $@),)
|
2013-08-18 06:50:10 +00:00
|
|
|
$(Q)$(LD) -o $@ $(OBJ) $(libretro) $(LIBS) $(LDFLAGS)
|
2013-07-18 00:26:01 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
@$(if $(Q), $(shell echo echo CC $<),)
|
|
|
|
$(Q)$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
@$(if $(Q), $(shell echo echo CXX $<),)
|
|
|
|
$(Q)$(CXX) $(CXXFLAGS) $(DEFINES) -c -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
rm -f deps/miniz/*.o
|
|
|
|
rm -f frontend/*.o
|
|
|
|
rm -f frontend/menu/*.o
|
2013-12-29 21:19:07 +00:00
|
|
|
rm -f frontend/menu/disp/*.o
|
2013-07-18 00:26:01 +00:00
|
|
|
rm -f audio/*.o
|
|
|
|
rm -f audio/xaudio-c/*.o
|
|
|
|
rm -f compat/*.o
|
|
|
|
rm -f compat/rxml/*.o
|
|
|
|
rm -f conf/*.o
|
|
|
|
rm -f gfx/scaler/*.o
|
|
|
|
rm -f gfx/*.o
|
|
|
|
rm -f gfx/d3d9/*.o
|
|
|
|
rm -f gfx/context/*.o
|
|
|
|
rm -f gfx/math/*.o
|
|
|
|
rm -f gfx/fonts/*.o
|
|
|
|
rm -f gfx/py_state/*.o
|
|
|
|
rm -f gfx/rpng/*.o
|
2013-08-28 04:03:25 +00:00
|
|
|
rm -f gfx/glsym/*.o
|
2013-07-18 00:26:01 +00:00
|
|
|
rm -f record/*.o
|
|
|
|
rm -f input/*.o
|
|
|
|
rm -f tools/*.o
|
2013-08-07 22:37:05 +00:00
|
|
|
rm -f $(TARGET)
|
2013-07-18 00:26:01 +00:00
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|