build/mobile/sutagent/android/fencp/Makefile.in
author Mike Hommey <mh+mozilla@glandium.org>
Sat, 04 Aug 2012 20:26:44 +0200
changeset 101804 162130598df094e19b044610902abecd403278d3
parent 101758 1fc17369c9a6c85dfd5724b9b6ecc073f0b3cc6c
child 120272 8104d8262f22be37b5c294d9599bbb42f48885d2
permissions -rw-r--r--
Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

DEPTH		= @DEPTH@
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

MODULE = FenCP

JAVAFILES = \
  DirCursor.java \
  FenCP.java \
  FenCPFP.java \
  FileCursor.java \
  R.java \
  $(NULL)

RES_FILES = \
  res/drawable-hdpi/icon.png \
  res/drawable-ldpi/icon.png \
  res/drawable-mdpi/icon.png \
  res/layout/main.xml \
  res/values/strings.xml \
  $(NULL)

GARBAGE += \
  AndroidManifest.xml  \
  classes.dex  \
  FenCP.apk  \
  $(NULL)

GARBAGE_DIRS += res classes network-libs

JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar

include $(topsrcdir)/config/rules.mk

# include Android specific java flags - using these instead of what's in rules.mk
include $(topsrcdir)/config/android-common.mk

tools:: FenCP.apk

classes.dex: $(JAVAFILES)
	$(NSINSTALL) -D classes
	$(JAVAC) $(JAVAC_FLAGS) -d classes  $(addprefix $(srcdir)/,$(JAVAFILES))
	$(DX) --dex --output=$@ classes

FenCP.ap_: $(srcdir)/AndroidManifest.xml
	$(AAPT) package -f -M $(srcdir)/AndroidManifest.xml -I $(ANDROID_SDK)/android.jar  -S res -F $@

FenCP-unsigned-unaligned.apk: FenCP.ap_ classes.dex
	$(APKBUILDER) $@ -v $(APKBUILDER_FLAGS) -z FenCP.ap_ -f classes.dex

FenCP-unaligned.apk: FenCP-unsigned-unaligned.apk
	cp  FenCP-unsigned-unaligned.apk $@
ifdef JARSIGNER
  $(JARSIGNER) $@
endif

FenCP.apk: FenCP-unaligned.apk
	$(ZIPALIGN) -f -v 4 FenCP-unaligned.apk $@

export::
	$(NSINSTALL) -D res
	@(cd $(srcdir)/res && tar $(TAR_CREATE_FLAGS) - *) | (cd $(DEPTH)/build/mobile/sutagent/android/fencp/res && tar -xf -)