ARCH=i486-linux

OBJS +=libexif.o ExifParse.o IptcParse.o JpegParse.o
CFLAGS +=-D_LINUX -D_DLL -fPIC -O2
CXXFLAGS +=-D_LINUX -D_DLL -fPIC -O2

SYSDIR=/home/marillat/src/xbmc-13.0~alpha9/system
SO=libexif-$(ARCH).so
SLIB=/home/marillat/src/xbmc-13.0~alpha9/system/$(SO)

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

include /home/marillat/src/xbmc-13.0~alpha9/Makefile.include
