Makefile.common 5.64 KB
Newer Older
1
ifeq ($(LIBRETRO_COMM_DIR),)
Libretro-Admin's avatar
Libretro-Admin committed
2
LIBRETRO_COMM_DIR  = $(CORE_DIR)/libretro-common
3
endif
Libretro-Admin's avatar
Libretro-Admin committed
4
LIBFLAC_DIR    = $(CORE_DIR)/deps/libFLAC
Libretro-Admin's avatar
Libretro-Admin committed
5
LIBVORBIS_DIR  = $(CORE_DIR)/deps/libvorbis
6
LIBOGG_DIR     = $(CORE_DIR)/deps/libogg
Libretro-Admin's avatar
Libretro-Admin committed
7

Libretro-Admin's avatar
Libretro-Admin committed
8
9
INCFLAGS   := \
	-I$(CORE_DIR) \
Libretro-Admin's avatar
Libretro-Admin committed
10
	-I$(LIBRETRO_COMM_DIR)/include \
Libretro-Admin's avatar
Libretro-Admin committed
11
	-I$(CORE_DIR)/include \
12

Libretro-Admin's avatar
Libretro-Admin committed
13
14
15
16
ifneq (,$(findstring msvc2003,$(platform)))
INCFLAGS += -I$(LIBRETRO_COMM_DIR)/include/compat/msvc
endif

17
SOURCES_C :=  \
Libretro-Admin's avatar
Libretro-Admin committed
18
	$(CORE_DIR)/common/cl_input.c \
Libretro-Admin's avatar
Libretro-Admin committed
19
20
	$(CORE_DIR)/common/cd_common.c \
	$(CORE_DIR)/common/alias_model.c \
Libretro-Admin's avatar
Libretro-Admin committed
21
22
23
24
25
	$(CORE_DIR)/common/chase.c \
	$(CORE_DIR)/common/cl_demo.c \
	$(CORE_DIR)/common/cl_main.c \
	$(CORE_DIR)/common/cl_parse.c \
	$(CORE_DIR)/common/cl_tent.c \
Libretro-Admin's avatar
Libretro-Admin committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
	$(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 \
Libretro-Admin's avatar
Libretro-Admin committed
43
44
	$(CORE_DIR)/common/host.c \
	$(CORE_DIR)/common/host_cmd.c \
Libretro-Admin's avatar
Libretro-Admin committed
45
46
	$(CORE_DIR)/common/keys.c \
	$(CORE_DIR)/common/mathlib.c \
Libretro-Admin's avatar
Libretro-Admin committed
47
	$(CORE_DIR)/common/menu.c \
Libretro-Admin's avatar
Libretro-Admin committed
48
	$(CORE_DIR)/common/model.c \
Libretro-Admin's avatar
Libretro-Admin committed
49
50
51
	$(CORE_DIR)/common/net_common.c \
	$(CORE_DIR)/common/net_loop.c \
	$(CORE_DIR)/common/net_main.c \
Libretro-Admin's avatar
Libretro-Admin committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
	$(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 \
Libretro-Admin's avatar
Libretro-Admin committed
71
	$(CORE_DIR)/common/sbar.c \
Libretro-Admin's avatar
Libretro-Admin committed
72
73
	$(CORE_DIR)/common/screen.c \
	$(CORE_DIR)/common/shell.c \
74
	$(CORE_DIR)/common/bgmusic.c \
75
76
77
78
79
80
81
82
83
84
	$(CORE_DIR)/common/snd_codec.c \
	$(CORE_DIR)/common/snd_flac.c \
	$(CORE_DIR)/common/snd_mikmod.c \
	$(CORE_DIR)/common/snd_modplug.c \
	$(CORE_DIR)/common/snd_mp3.c \
	$(CORE_DIR)/common/snd_mpg123.c \
	$(CORE_DIR)/common/snd_opus.c \
	$(CORE_DIR)/common/snd_umx.c \
	$(CORE_DIR)/common/snd_vorbis.c \
	$(CORE_DIR)/common/snd_wave.c \
Libretro-Admin's avatar
Libretro-Admin committed
85
86
87
88
	$(CORE_DIR)/common/snd_dma.c \
	$(CORE_DIR)/common/snd_mem.c \
	$(CORE_DIR)/common/snd_mix.c \
	$(CORE_DIR)/common/sprite_model.c \
Libretro-Admin's avatar
Libretro-Admin committed
89
	$(CORE_DIR)/common/sv_main.c \
Libretro-Admin's avatar
Libretro-Admin committed
90
	$(CORE_DIR)/common/sv_move.c \
Libretro-Admin's avatar
Libretro-Admin committed
91
92
	$(CORE_DIR)/common/sv_phys.c \
	$(CORE_DIR)/common/sv_user.c \
93
	$(CORE_DIR)/common/libretro.c \
Libretro-Admin's avatar
Libretro-Admin committed
94
	$(CORE_DIR)/common/view.c \
Libretro-Admin's avatar
Libretro-Admin committed
95
96
97
	$(CORE_DIR)/common/wad.c \
	$(CORE_DIR)/common/zone.c \
	$(CORE_DIR)/common/world.c
Libretro-Admin's avatar
Libretro-Admin committed
98

99
ifeq ($(USE_CODEC_FLAC),1)
Libretro-Admin's avatar
Libretro-Admin committed
100
SOURCES_C += $(CORE_DIR)/deps/libFLAC/win32/win_utf8.c
101
endif
Libretro-Admin's avatar
Libretro-Admin committed
102

103
ifneq ($(STATIC_LINKING),1)
Libretro-Admin's avatar
Libretro-Admin committed
104
	SOURCES_C += \
Libretro-Admin's avatar
Libretro-Admin committed
105
106
107
108
109
110
					 $(LIBRETRO_COMM_DIR)/file/retro_dirent.c \
					 $(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
					 $(LIBRETRO_COMM_DIR)/string/stdstring.c \
					 $(LIBRETRO_COMM_DIR)/streams/file_stream.c \
					 $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.c \
					 $(LIBRETRO_COMM_DIR)/file/file_path.c \
Libretro-Admin's avatar
Libretro-Admin committed
111
					 $(LIBRETRO_COMM_DIR)/compat/fopen_utf8.c \
Libretro-Admin's avatar
Libretro-Admin committed
112
113
114
115
					 $(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
					 $(LIBRETRO_COMM_DIR)/compat/compat_posix_string.c \
					 $(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
					 $(LIBRETRO_COMM_DIR)/compat/compat_snprintf.c
116
117
endif

118
ifeq ($(HAVE_NETWORKING),1)
Rinnegatamante's avatar
Rinnegatamante committed
119
120
121
SOURCES_C += $(CORE_DIR)/common/net_dgrm.c \
	$(CORE_DIR)/common/net_udp.c \
	$(CORE_DIR)/common/net_bsd.c
Libretro-Admin's avatar
Libretro-Admin committed
122

123
124
125
126
127
ifeq ($(platform), ctr)
SOURCES_C += \
				 $(LIBRETRO_COMM_DIR)/net/net_compat.c \
				 $(LIBRETRO_COMM_DIR)/net/net_socket.c
else ifneq ($(STATIC_LINKING),1)
128
SOURCES_C += \
Libretro-Admin's avatar
Libretro-Admin committed
129
130
				 $(LIBRETRO_COMM_DIR)/net/net_compat.c \
				 $(LIBRETRO_COMM_DIR)/net/net_socket.c
131
132
133
134
135
endif
else
SOURCES_C += $(CORE_DIR)/common/net_none.c
endif

136
ifeq ($(USE_CODEC_FLAC),1)
Libretro-Admin's avatar
Libretro-Admin committed
137
INCFLAGS  += -I$(LIBFLAC_DIR)/include
Libretro-Admin's avatar
Libretro-Admin committed
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
SOURCES_C += $(LIBFLAC_DIR)/bitmath.c \
				 $(LIBFLAC_DIR)/bitreader.c \
				 $(LIBFLAC_DIR)/cpu.c \
				 $(LIBFLAC_DIR)/crc.c \
				 $(LIBFLAC_DIR)/fixed.c \
				 $(LIBFLAC_DIR)/float.c \
				 $(LIBFLAC_DIR)/format.c \
				 $(LIBFLAC_DIR)/lpc.c \
				 $(LIBFLAC_DIR)/md5.c \
				 $(LIBFLAC_DIR)/memory.c \
				 $(LIBFLAC_DIR)/metadata_iterators.c \
				 $(LIBFLAC_DIR)/metadata_object.c \
				 $(LIBFLAC_DIR)/ogg_decoder_aspect.c \
				 $(LIBFLAC_DIR)/ogg_helper.c \
				 $(LIBFLAC_DIR)/ogg_mapping.c \
				 $(LIBFLAC_DIR)/stream_decoder.c \
				 $(LIBFLAC_DIR)/window.c
155
endif
Libretro-Admin's avatar
Libretro-Admin committed
156
157
158

ifeq ($(USE_CODEC_VORBIS),1)
INCFLAGS  += -I$(LIBVORBIS_DIR)/include \
159
160
161
				 -I$(LIBVORBIS_DIR)/lib \
				 -I$(LIBOGG_DIR)/include

Libretro-Admin's avatar
Libretro-Admin committed
162
163
164
165
166
167
168
169
170
171
SOURCES_C += $(LIBVORBIS_DIR)/lib/analysis.c \
				 $(LIBVORBIS_DIR)/lib/bitrate.c \
				 $(LIBVORBIS_DIR)/lib/block.c \
				 $(LIBVORBIS_DIR)/lib/codebook.c \
				 $(LIBVORBIS_DIR)/lib/envelope.c \
				 $(LIBVORBIS_DIR)/lib/floor0.c \
				 $(LIBVORBIS_DIR)/lib/floor1.c \
				 $(LIBVORBIS_DIR)/lib/info.c \
				 $(LIBVORBIS_DIR)/lib/lookup.c \
				 $(LIBVORBIS_DIR)/lib/lpc.c \
Libretro-Admin's avatar
Libretro-Admin committed
172
				 $(LIBVORBIS_DIR)/lib/lsp.c \
Libretro-Admin's avatar
Libretro-Admin committed
173
174
175
176
177
178
179
180
				 $(LIBVORBIS_DIR)/lib/mapping0.c \
				 $(LIBVORBIS_DIR)/lib/mdct.c \
				 $(LIBVORBIS_DIR)/lib/psy.c \
				 $(LIBVORBIS_DIR)/lib/registry.c \
				 $(LIBVORBIS_DIR)/lib/res0.c \
				 $(LIBVORBIS_DIR)/lib/smallft.c \
				 $(LIBVORBIS_DIR)/lib/synthesis.c \
				 $(LIBVORBIS_DIR)/lib/vorbisfile.c \
Libretro-Admin's avatar
Libretro-Admin committed
181
				 $(LIBVORBIS_DIR)/lib/sharedbook.c \
Libretro-Admin's avatar
Libretro-Admin committed
182
				 $(LIBVORBIS_DIR)/lib/window.c
183
184
185

SOURCES_C += $(LIBOGG_DIR)/src/bitwise.c \
				 $(LIBOGG_DIR)/src/framing.c
Libretro-Admin's avatar
Libretro-Admin committed
186
endif