Commit 68ee09d0 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Add Makefile.common

parent 49c1cce7
INCFLAGS := -I$(CORE_DIR) -I$(CORE_DIR)/NQ -I$(CORE_DIR)/include
SOURCES_C := $(CORE_DIR)/NQ/cl_input.c \
$(CORE_DIR)/common/cd_common.c \
$(CORE_DIR)/common/alias_model.c \
$(CORE_DIR)/NQ/chase.c \
$(CORE_DIR)/NQ/cl_demo.c \
$(CORE_DIR)/NQ/cl_main.c \
$(CORE_DIR)/NQ/cl_parse.c \
$(CORE_DIR)/NQ/cl_tent.c \
$(CORE_DIR)/common/common.c \
$(CORE_DIR)/common/cmd.c \
$(CORE_DIR)/common/crc.c \
$(CORE_DIR)/common/console.c \
$(CORE_DIR)/common/cvar.c \
$(CORE_DIR)/common/d_edge.c \
$(CORE_DIR)/common/d_fill.c \
$(CORE_DIR)/common/d_init.c \
$(CORE_DIR)/common/d_part.c \
$(CORE_DIR)/common/d_modech.c \
$(CORE_DIR)/common/d_polyse.c \
$(CORE_DIR)/common/d_scan.c \
$(CORE_DIR)/common/d_sky.c \
$(CORE_DIR)/common/d_sprite.c \
$(CORE_DIR)/common/d_surf.c \
$(CORE_DIR)/common/d_vars.c \
$(CORE_DIR)/common/draw.c \
$(CORE_DIR)/NQ/host.c \
$(CORE_DIR)/NQ/host_cmd.c \
$(CORE_DIR)/common/keys.c \
$(CORE_DIR)/common/mathlib.c \
$(CORE_DIR)/NQ/menu.c \
$(CORE_DIR)/common/model.c \
$(CORE_DIR)/NQ/net_common.c \
$(CORE_DIR)/NQ/net_loop.c \
$(CORE_DIR)/NQ/net_main.c \
$(CORE_DIR)/common/nonintel.c \
$(CORE_DIR)/common/pr_cmds.c \
$(CORE_DIR)/common/pr_exec.c \
$(CORE_DIR)/common/pr_edict.c \
$(CORE_DIR)/common/r_aclip.c \
$(CORE_DIR)/common/r_alias.c \
$(CORE_DIR)/common/r_bsp.c \
$(CORE_DIR)/common/r_draw.c \
$(CORE_DIR)/common/r_edge.c \
$(CORE_DIR)/common/r_efrag.c \
$(CORE_DIR)/common/r_light.c \
$(CORE_DIR)/common/r_main.c \
$(CORE_DIR)/common/r_misc.c \
$(CORE_DIR)/common/r_model.c \
$(CORE_DIR)/common/r_part.c \
$(CORE_DIR)/common/r_sky.c \
$(CORE_DIR)/common/r_sprite.c \
$(CORE_DIR)/common/r_vars.c \
$(CORE_DIR)/common/r_surf.c \
$(CORE_DIR)/common/rb_tree.c \
$(CORE_DIR)/NQ/sbar.c \
$(CORE_DIR)/common/screen.c \
$(CORE_DIR)/common/shell.c \
$(CORE_DIR)/common/snd_dma.c \
$(CORE_DIR)/common/snd_mem.c \
$(CORE_DIR)/common/snd_mix.c \
$(CORE_DIR)/common/sprite_model.c \
$(CORE_DIR)/NQ/sv_main.c \
$(CORE_DIR)/common/sv_move.c \
$(CORE_DIR)/NQ/sv_phys.c \
$(CORE_DIR)/NQ/sv_user.c \
$(CORE_DIR)/common/sys_libretro.c \
$(CORE_DIR)/NQ/view.c \
$(CORE_DIR)/common/wad.c \
$(CORE_DIR)/common/zone.c \
$(CORE_DIR)/common/world.c
SOURCES_C += $(CORE_DIR)/NQ/net_none.c
......@@ -160,82 +160,13 @@ else
CFLAGS += -O3 -ffast-math
endif
CORE_DIR := .
OBJECTS = NQ/cl_input.o \
common/cd_common.o \
common/alias_model.o \
NQ/chase.o \
NQ/cl_demo.o \
NQ/cl_main.o \
NQ/cl_parse.o \
NQ/cl_tent.o \
common/common.o \
common/cmd.o \
common/crc.o \
common/console.o \
common/cvar.o \
common/d_edge.o \
common/d_fill.o \
common/d_init.o \
common/d_part.o \
common/d_modech.o \
common/d_polyse.o \
common/d_scan.o \
common/d_sky.o \
common/d_sprite.o \
common/d_surf.o \
common/d_vars.o \
common/draw.o \
NQ/host.o \
NQ/host_cmd.o \
common/keys.o \
common/mathlib.o \
NQ/menu.o \
common/model.o \
NQ/net_common.o \
NQ/net_loop.o \
NQ/net_main.o \
common/nonintel.o \
common/pr_cmds.o \
common/pr_exec.o \
common/pr_edict.o \
common/r_aclip.o \
common/r_alias.o \
common/r_bsp.o \
common/r_draw.o \
common/r_edge.o \
common/r_efrag.o \
common/r_light.o \
common/r_main.o \
common/r_misc.o \
common/r_model.o \
common/r_part.o \
common/r_sky.o \
common/r_sprite.o \
common/r_vars.o \
common/r_surf.o \
common/rb_tree.o \
NQ/sbar.o \
common/screen.o \
common/shell.o \
common/snd_dma.o \
common/snd_mem.o \
common/snd_mix.o \
common/sprite_model.o \
NQ/sv_main.o \
common/sv_move.o \
NQ/sv_phys.o \
NQ/sv_user.o \
common/sys_libretro.o \
NQ/view.o \
common/wad.o \
common/zone.o \
common/world.o
include Makefile.common
OBJECTS += NQ/net_none.o
OBJECTS = $(SOURCES_C:.c=.o)
INCLUDES = -I. -INQ -Iinclude
DEFINES = -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -DNQ_HACK -DQBASEDIR=. -DTYR_VERSION=0.62
DEFINES = -DHAVE_STRINGS_H -DHAVE_STDINT_H -DHAVE_INTTYPES_H -D__LIBRETRO__ -DINLINE=inline -DNQ_HACK -DQBASEDIR=$(CORE_DIR) -DTYR_VERSION=0.62
ifeq ($(platform), sncps3)
WARNINGS_DEFINES =
......@@ -265,11 +196,11 @@ $(TARGET): $(OBJECTS)
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
$(CC) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJECTS) -lm $(WINSOCKS)
$(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) -lm $(WINSOCKS)
endif
%.o: %.c
$(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $<
$(CC) $(INCFLAGS) $(CFLAGS) -c -o $@ $<
clean-objs:
rm -rf $(OBJECTS)
......
......@@ -22,84 +22,14 @@ ifeq ($(TARGET_ARCH),mips)
LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__
endif
CORE_DIR := ../..
BASE_DIR=../..
include $(CORE_DIR)/Makefile.common
LOCAL_SRC_FILES += $(SOURCES_C)
LOCAL_SRC_FILES += $(BASE_DIR)/NQ/cl_input.c \
$(BASE_DIR)/common/cd_common.c \
$(BASE_DIR)/common/alias_model.c \
$(BASE_DIR)/NQ/chase.c \
$(BASE_DIR)/NQ/cl_demo.c \
$(BASE_DIR)/NQ/cl_main.c \
$(BASE_DIR)/NQ/cl_parse.c \
$(BASE_DIR)/NQ/cl_tent.c \
$(BASE_DIR)/common/common.c \
$(BASE_DIR)/common/cmd.c \
$(BASE_DIR)/common/crc.c \
$(BASE_DIR)/common/console.c \
$(BASE_DIR)/common/cvar.c \
$(BASE_DIR)/common/d_edge.c \
$(BASE_DIR)/common/d_fill.c \
$(BASE_DIR)/common/d_init.c \
$(BASE_DIR)/common/d_part.c \
$(BASE_DIR)/common/d_modech.c \
$(BASE_DIR)/common/d_polyse.c \
$(BASE_DIR)/common/d_scan.c \
$(BASE_DIR)/common/d_sky.c \
$(BASE_DIR)/common/d_sprite.c \
$(BASE_DIR)/common/d_surf.c \
$(BASE_DIR)/common/d_vars.c \
$(BASE_DIR)/common/draw.c \
$(BASE_DIR)/NQ/host.c \
$(BASE_DIR)/NQ/host_cmd.c \
$(BASE_DIR)/common/keys.c \
$(BASE_DIR)/common/mathlib.c \
$(BASE_DIR)/NQ/menu.c \
$(BASE_DIR)/common/model.c \
$(BASE_DIR)/NQ/net_common.c \
$(BASE_DIR)/NQ/net_loop.c \
$(BASE_DIR)/NQ/net_main.c \
$(BASE_DIR)/common/nonintel.c \
$(BASE_DIR)/common/pr_cmds.c \
$(BASE_DIR)/common/pr_exec.c \
$(BASE_DIR)/common/pr_edict.c \
$(BASE_DIR)/common/r_aclip.c \
$(BASE_DIR)/common/r_alias.c \
$(BASE_DIR)/common/r_bsp.c \
$(BASE_DIR)/common/r_draw.c \
$(BASE_DIR)/common/r_edge.c \
$(BASE_DIR)/common/r_efrag.c \
$(BASE_DIR)/common/r_light.c \
$(BASE_DIR)/common/r_main.c \
$(BASE_DIR)/common/r_misc.c \
$(BASE_DIR)/common/r_model.c \
$(BASE_DIR)/common/r_part.c \
$(BASE_DIR)/common/r_sky.c \
$(BASE_DIR)/common/r_sprite.c \
$(BASE_DIR)/common/r_vars.c \
$(BASE_DIR)/common/r_surf.c \
$(BASE_DIR)/common/rb_tree.c \
$(BASE_DIR)/NQ/sbar.c \
$(BASE_DIR)/common/screen.c \
$(BASE_DIR)/common/shell.c \
$(BASE_DIR)/common/snd_dma.c \
$(BASE_DIR)/common/snd_mem.c \
$(BASE_DIR)/common/snd_mix.c \
$(BASE_DIR)/common/sprite_model.c \
$(BASE_DIR)/NQ/sv_main.c \
$(BASE_DIR)/common/sv_move.c \
$(BASE_DIR)/NQ/sv_phys.c \
$(BASE_DIR)/NQ/sv_user.c \
$(BASE_DIR)/common/sys_libretro.c \
$(BASE_DIR)/NQ/view.c \
$(BASE_DIR)/common/wad.c \
$(BASE_DIR)/common/zone.c \
$(BASE_DIR)/common/world.c \
$(BASE_DIR)/NQ/net_none.c
LOCAL_C_INCLUDES = $(INCFLAGS)
LOCAL_C_INCLUDES = $(BASE_DIR)/include $(BASE_DIR)/NQ
LOCAL_CFLAGS += -O3 -std=gnu99 -ffast-math -funroll-loops -DINLINE=inline -DNQ_HACK -DHAVE_STRINGS -DHAVE_INTTYPES_H -DQBASEDIR=. -DTYR_VERSION=0.62 -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DANDROID -DLSB_FIRST
LOCAL_CFLAGS += -O3 -std=gnu99 -ffast-math -funroll-loops -DINLINE=inline -DNQ_HACK -DHAVE_STRINGS -DHAVE_INTTYPES_H -DQBASEDIR=. -DTYR_VERSION=0.62 -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565 -DANDROID -DLSB_FIRST $(INCFLAGS)
include $(BUILD_SHARED_LIBRARY)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment