|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
-
- #
- # Define these variables from the beginning
- #
-
- CLEANFILES =
- SUFFIXES =
- EXTRA_DIST =
-
-
- #
- # Miscellaneous rules
- #
-
- lol_recursive_rule = \
- @if test -n "$(SUBDIRS)"; then for subdir in $(SUBDIRS); do \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $(patsubst %-recursive, %, $@)) || exit 1; \
- done; fi
-
- bench: bench-recursive
- bench-recursive:
- $(lol_recursive_rule)
-
- lolcheck: lolcheck-recursive
- lolcheck-recursive:
- $(lol_recursive_rule)
-
-
- #
- # Flex and Bison files build rule
- #
-
- generated: generated-recursive
- generated-recursive:
- $(lol_recursive_rule)
- @if test -n "$(filter %-scanner.l, $(EXTRA_DIST))"; then \
- echo $(MKDIR_P) generated; \
- $(MKDIR_P) generated; \
- rm -f generated/[a-zA-Z]*; \
- for scanner in $(patsubst %-scanner.l, %, $(filter %-scanner.l, $(EXTRA_DIST))); do \
- b="`basename $$scanner`"; \
- echo flex -v -o "generated/$$b-scanner.cpp" "$$scanner-scanner.l"; \
- flex -v -o "generated/$$b-scanner.cpp" "$$scanner-scanner.l" || exit 1; \
- done; \
- for parser in $(patsubst %-parser.y, %, $(filter %-parser.y, $(EXTRA_DIST))); do \
- b="`basename $$parser`"; \
- echo bison -o "generated/$$b-parser.cpp" --defines="generated/$$b-parser.h" -d -b "generated/$$b" "$$parser-parser.y"; \
- bison -o "generated/$$b-parser.cpp" --defines="generated/$$b-parser.h" -d -b "generated/$$b" "$$parser-parser.y" || exit 1; \
- done; \
- fi
-
-
- #
- # .lolfx build rule
- #
-
- lolfx_gen = $(lolfx_gen_$(V))
- lolfx_gen_ = $(lolfx_gen_$(AM_DEFAULT_VERBOSITY))
- lolfx_gen_0 = @echo " LOLFX " $@;
-
- SUFFIXES += .lolfx
- .lolfx.o:
- $(lolfx_gen)
- $(AM_V_at)(echo "char const *"; \
- echo "lolfx_resource_$(notdir $(basename $(filter %.lolfx, $^))) ="; \
- $(SED) 's/"/\\"/g' $(filter %.lolfx, $^) | $(SED) 's/\([^\r]*\).*/"\1\\n"/'; \
- echo ";") \
- | $(CXXCOMPILE) -xc++ -c - -o $@
-
-
- #
- # PS3 fself support rules
- #
-
- fself_gen = $(fself_gen_$(V))
- fself_gen_ = $(fself_gen_$(AM_DEFAULT_VERBOSITY))
- fself_gen_0 = echo " FSELF " $${x}.self;
- fself_gen_1 = echo make_fself $${x}$(EXEEXT) $${x}.self;
-
- all-local: all-local-ps3
- all-local-ps3: $(PROGRAMS) $(noinst_PROGRAMS)
- @if test -n "$^"; then for x in $(^:%$(EXEEXT)=%); do \
- if test x$(MAKE_FSELF) != xno; then \
- $(fself_gen) \
- make_fself $${x}$(EXEEXT) $${x}.self; \
- fi; \
- done; fi
-
- CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.self) \
- $(PROGRAMS:%$(EXEEXT)=%.elf) \
- $(noinst_PROGRAMS:%$(EXEEXT)=%.self) \
- $(noinst_PROGRAMS:%$(EXEEXT)=%.elf)
-
-
- #
- # Win32 rules
- #
-
- # This is here in case we forget to make clean after a Windows build
- CLEANFILES += $(PROGRAMS:%$(EXEEXT)=%.exe) \
- $(noinst_PROGRAMS:%$(EXEEXT)=%.exe)
-
-
- #
- # Android rules
- #
-
- all-local: all-local-android
- clean-local: clean-local-android
- if USE_ANDROID
- all-local-android: $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), $($(p)_DATA))
- $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), \
- rm -rf "android-$(p)"; \
- $(MKDIR_P) "android-$(p)" $(sort $(foreach f, $($(p)_DATA), "android-$(p)/assets/$(dir $(f))")); \
- $(foreach f, $($(p)_DATA), $(LN_S) "$(abs_srcdir)/$(f)" "android-$(p)/assets/$(f)";) \
- $(SED) -e 's,@PROGRAM@,$(p),' "$(top_srcdir)/build/android/AndroidManifest.xml" > "android-$(p)/AndroidManifest.xml"; \
- $(MKDIR_P) "android-$(p)/src/net/lolengine"; \
- $(SED) -e 's,@PROGRAM@,$(p),' "$(top_srcdir)/build/android/LolActivity.java" > "android-$(p)/src/net/lolengine/LolActivity.java"; \
- $(MKDIR_P) "android-$(p)/res/values"; \
- $(SED) -e 's,@PROGRAM@,$(p),' "$(top_srcdir)/build/android/strings.xml" > "android-$(p)/res/values/strings.xml"; \
- $(MKDIR_P) "android-$(p)/res/drawable"; \
- cp "$(top_srcdir)/build/android/icon.png" "android-$(p)/res/drawable/"; \
- $(MKDIR_P) "android-$(p)/libs/armeabi"; \
- $(LN_S) "$(abs_builddir)/$(p).so" "android-$(p)/libs/armeabi/lib$(p).so"; \
- $(LN_S) "$${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so" "android-$(p)/libs/armeabi"; \
- android update project -t android-8 -p "android-$(p)"; \
- ant debug -f "android-$(p)/build.xml"; \
- )
- else
- all-local-android:
- endif
- clean-local-android:
- $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), rm -rf "android-$(p)";)
-
-
- #
- # Additional rules
- #
-
- EXTRA_DIST += $(foreach p, $(PROGRAMS), $($(p)_DATA))
-
-
- .PHONY: bench lolcheck generated
-
|