PREFIX = /usr/local CC = gcc -s -O2 -Wall -fPIC AR = ar rc PERL = perl XASM = xasm/xasm -q MADS = mads/mads -s RM = rm -f MKDIRS = mkdir -p INSTALL = install INSTALL_PROGRAM = $(INSTALL) INSTALL_DATA = $(INSTALL) -m 644 ASCIIDOC = asciidoc -a localtime -a doctime ASCIIDOC_POSTPROCESS = $(PERL) -pi -e 's/527bbd;/c02020;/' XMMS_CFLAGS = `xmms-config --cflags` XMMS_LIBS = `xmms-config --libs` XMMS_INPUT_PLUGIN_DIR = `xmms-config --input-plugin-dir` XMMS_USER_PLUGIN_DIR = $(HOME)/.xmms/Plugins MOC_INCLUDE = ../moc-2.4.4 MOC_PLUGIN_DIR = /usr/local/lib/moc/decoder_plugins XBMC_DLL_LOADER_EXPORTS = @abs_top_srcdir@/xbmc/cores/DllLoader/exports COMMON_C = asap.c acpu.c apokeysnd.c COMMON_H = asap.h asap_internal.h anylang.h players.h COMMON_O = asap.o acpu.o apokeysnd.o PLAYERS_OBX = players/cmc.obx players/cm3.obx players/cms.obx players/dlt.obx players/mpt.obx players/rmt4.obx players/rmt8.obx players/tmc.obx players/tm2.obx .PHONY: force all: asap2wav libasap.a asap2wav: asap2wav.c $(COMMON_C) $(COMMON_H) $(CC) -o $@ -I. asap2wav.c $(COMMON_C) lib: libasap.a libasap.a: $(COMMON_C) $(COMMON_H) $(CC) -c -I. $(COMMON_C) $(AR) $@ asap.o acpu.o apokeysnd.o asap-xmms: libasap-xmms.so libasap.xmms.so: xmms/libasap-xmms.c $(COMMON_C) $(COMMON_H) $(CC) $(XMMS_CFLAGS) -shared -fPIC -Wl,--version-script=xmms/libasap-xmms.map -o $@ -I. xmms/libasap-xmms.c $(COMMON_C) $(XMMS_LIBS) asap-moc: libasap_decoder.so libasap_decoder.so: moc/libasap_decoder.c $(COMMON_C) $(COMMON_H) $(CC) -shared -fPIC -o $@ -I. -I$(MOC_INCLUDE) moc/libasap_decoder.c $(COMMON_C) asap-xbmc: mads/mads xasm/xasm @abs_top_srcdir@/system/players/paplayer/xbmc_asap-@ARCH@.so xbmc/xbmc_asap.o: xbmc/xbmc_asap.c $(CC) -I. -O2 -o $@ -c xbmc/xbmc_asap.c asap.o: asap.c $(COMMON_H) $(CC) -I. -O2 -o $@ -c asap.c acpu.o: acpu.c $(COMMON_H) $(CC) -I. -O2 -o $@ -c acpu.c apokeysnd.o: apokeysnd.c $(CC) -I. -O2 -o $@ -c apokeysnd.c @abs_top_srcdir@/system/players/paplayer/xbmc_asap-@ARCH@.so: xbmc/xbmc_asap.o $(COMMON_O) $(COMMON_H) $(CC) -shared -fPIC -o $@ -I. xbmc/xbmc_asap.o `cat $(XBMC_DLL_LOADER_EXPORTS)/wrapper.def` $(XBMC_DLL_LOADER_EXPORTS)/wrapper.o $(COMMON_O) players.h: files2anylang.pl $(PLAYERS_OBX) $(PERL) files2anylang.pl $(PLAYERS_OBX) >$@ mads/mads: force make -C mads xasm/xasm: force make -C xasm GDC=@HAVE_GDC@ players/cmc.obx: players/cmc.asx xasm/xasm $(XASM) -d CM3=0 -o $@ players/cmc.asx players/cm3.obx: players/cmc.asx xasm/xasm $(XASM) -d CM3=1 -o $@ players/cmc.asx players/cms.obx: players/cms.asx xasm/xasm $(XASM) -o $@ players/cms.asx players/dlt.obx: players/dlt.as8 mads/mads $(MADS) -o:$@ -c players/dlt.as8 players/mpt.obx: players/mpt.asx xasm/xasm $(XASM) -o $@ players/mpt.asx players/rmt4.obx: players/rmt.asx xasm/xasm $(XASM) -d STEREOMODE=0 -o $@ players/rmt.asx players/rmt8.obx: players/rmt.asx xasm/xasm $(XASM) -d STEREOMODE=1 -o $@ players/rmt.asx players/tmc.obx: players/tmc.asx xasm/xasm $(XASM) -o $@ players/tmc.asx players/tm2.obx: players/tm2.asx xasm/xasm $(XASM) -o $@ players/tm2.asx install: install-asap2wav install-lib install-asap2wav: asap2wav $(MKDIRS) $(PREFIX)/bin $(INSTALL_PROGRAM) asap2wav $(PREFIX)/bin/asap2wav uninstall-asap2wav: $(RM) $(PREFIX)/bin/asap2wav install-lib: libasap.a $(MKDIRS) $(PREFIX)/include $(INSTALL_DATA) asap.h $(PREFIX)/include/asap.h $(MKDIRS) $(PREFIX)/lib $(INSTALL_DATA) libasap.a $(PREFIX)/lib/libasap.a uninstall-lib: $(RM) $(PREFIX)/include/asap.h $(PREFIX)/lib/libasap.a install-xmms: libasap-xmms.so $(MKDIRS) $(XMMS_INPUT_PLUGIN_DIR) $(INSTALL_PROGRAM) libasap-xmms.so $(XMMS_INPUT_PLUGIN_DIR)/libasap-xmms.so uninstall-xmms: $(RM) $(XMMS_INPUT_PLUGIN_DIR)/libasap-xmms.so install-xmms-user: libasap-xmms.so $(MKDIRS) $(XMMS_USER_PLUGIN_DIR) $(INSTALL_PROGRAM) libasap-xmms.so $(XMMS_USER_PLUGIN_DIR)/libasap-xmms.so uninstall-xmms-user: $(RM) $(XMMS_USER_PLUGIN_DIR)/libasap-xmms.so install-moc: libasap_decoder.so $(MKDIRS) $(MOC_PLUGIN_DIR) $(INSTALL_PROGRAM) libasap_decoder.so $(MOC_PLUGIN_DIR)/libasap_decoder.so uninstall-moc: $(RM) $(MOC_PLUGIN_DIR)/libasap_decoder.so players-clean: make -C players clean make -C mads clean make -C xasm clean distclean: clean clean: players-clean $(RM) asap2wav libasap.a asap.o acpu.o apokeysnd.o libasap-xmms.so libasap_decoder.so @abs_top_srcdir@/system/players/paplayer/xbmc_asap-@ARCH@.so players.h xbmc/xbmc_asap.o README.html: README INSTALL NEWS CREDITS $(ASCIIDOC) -o $@ -a asapsrc -a asapports README $(ASCIIDOC_POSTPROCESS) $@ .DELETE_ON_ERROR: