Ignore:
Timestamp:
Mar 10, 2013, 12:04:58 AM (8 years ago)
Author:
sam
Message:

build: big Android build system refactor; we now attempt to build
an apk for each project.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/build/autotools/common.am

    r2575 r2576  
    103103
    104104#
     105# Android rules
     106#
     107
     108all-local: all-local-android
     109clean-local: clean-local-android
     110if USE_ANDROID
     111all-local-android: $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), $($(p)_DATA))
     112        $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), \
     113            rm -rf "android-$(p)"; \
     114            $(MKDIR_P) "android-$(p)" $(sort $(foreach f, $($(p)_DATA), "android-$(p)/assets/$(dir $(f))")); \
     115            $(foreach f, $($(p)_DATA), $(LN_S) "$(abs_srcdir)/$(f)" "android-$(p)/assets/$(f)";) \
     116            $(SED) -e 's,@PROGRAM@,$(p),' "$(top_srcdir)/build/android/AndroidManifest.xml" > "android-$(p)/AndroidManifest.xml"; \
     117            $(MKDIR_P) "android-$(p)/src/net/lolengine"; \
     118            $(SED) -e 's,@PROGRAM@,$(p),' "$(top_srcdir)/build/android/LolActivity.java" > "android-$(p)/src/net/lolengine/LolActivity.java"; \
     119            $(MKDIR_P) "android-$(p)/res/values"; \
     120            $(SED) -e 's,@PROGRAM@,$(p),' "$(top_srcdir)/build/android/strings.xml" > "android-$(p)/res/values/strings.xml"; \
     121            $(MKDIR_P) "android-$(p)/res/drawable"; \
     122            cp "$(top_srcdir)/build/android/icon.png" "android-$(p)/res/drawable/"; \
     123            $(MKDIR_P) "android-$(p)/libs/armeabi"; \
     124            $(LN_S) "$(abs_builddir)/$(p).so" "android-$(p)/libs/armeabi/lib$(p).so"; \
     125            $(LN_S) "$${ANDROID_NDK_ROOT}/sources/cxx-stl/stlport/libs/armeabi/libstlport_shared.so" "android-$(p)/libs/armeabi"; \
     126            android update project -t android-8 -p "android-$(p)"; \
     127            ant debug -f "android-$(p)/build.xml"; \
     128        )
     129else
     130all-local-android:
     131endif
     132clean-local-android:
     133        $(foreach p, $(PROGRAMS:%$(EXEEXT)=%), rm -rf "android-$(p)";)
     134
     135
     136#
    105137# Additional rules
    106138#
    107139
    108 EXTRA_DIST += $(foreach p, $(noinst_PROGRAMS), $($(p)_DATA))
    109 EXTRA_DIST += $(foreach p, $(bin_PROGRAMS), $($(p)_DATA))
     140EXTRA_DIST += $(foreach p, $(PROGRAMS), $($(p)_DATA))
    110141
    111142
Note: See TracChangeset for help on using the changeset viewer.