aboutsummaryrefslogtreecommitdiff
path: root/lib/snesapu/SNES/SNESAPU/Makefile.in
blob: 89c995585102e8aa17c879dfb481d92b005a3a6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ARCH=@ARCH@
AS=nasm
OBJS=SPC700.o APU.o DSP.o SNESAPU.o
CFLAGS +=-D_LINUX -fPIC -I@abs_top_srcdir@/lib/snesapu
CXXFLAGS +=-D_LINUX -fPIC -I@abs_top_srcdir@/lib/snesapu
ifeq ($(findstring osx,$(ARCH)), osx)
	CFLAGS+=-fno-common
	CXXFLAGS+=-fno-common
	ASFLAGS=-Xvc -DLINUX -DCDECL -O1 -f macho
else
	ASFLAGS=-Xvc -DLINUX -O1 -f elf
endif

SYSDIR=@abs_top_srcdir@/system/players/paplayer/
SO=SNESAPU-$(ARCH).so
SLIB=$(SYSDIR)/$(SO)

$(SLIB): $(OBJS)
ifeq ($(findstring osx,$(ARCH)), osx)
	$(CC) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
		-bundle -undefined dynamic_lookup -read_only_relocs suppress -o $@ \
		@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o $(OBJS)
else
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -o $@ $(OBJS) -Wl,--unresolved-symbols=ignore-all \
		`cat @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.def` @abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o
endif

%o : %Asm
	$(AS) $(ASFLAGS) -o $@ $<

include @abs_top_srcdir@/Makefile.include