build/mobile/sutagent/android/Makefile.in
author Karl Tomlinson <karlt+@karlt.net>
Fri, 23 Jul 2010 10:28:56 +1200
changeset 48108 92559a5573bd3ef6159f8dab92931107ff581440
parent 43915 da2d8dc257d54fb2d0d4c5ec43ede6291dcaeab2
child 51481 fa73e81c1e876b0631a11c1c67396c967501a779
permissions -rwxr-xr-x
add a function to look for a Visual matching an image format b=576143 r=jrmuizel

# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Android sutagent for testing.
#
# The Initial Developer of the Original Code is
#   Mozilla Foundation
# Portions created by the Initial Developer are Copyright (C) 2010
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
#   Clint Talbert <ctalbert@mozilla.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****

DEPTH		= ../../../..
topsrcdir	= @top_srcdir@
srcdir		= @srcdir@
VPATH		= @srcdir@

include $(DEPTH)/config/autoconf.mk

MODULE = sutAgentAndroid

JAVAFILES = \
  AlertLooperThread.java \
  ASMozStub.java \
  CmdWorkerThread.java \
  DataWorkerThread.java \
  DoAlert.java \
  DoCommand.java \
  Power.java \
  RedirOutputThread.java \
  RunCmdThread.java \
  RunDataThread.java \
  SUTAgentAndroid.java \
  SUTStartupIntentReceiver.java \
  WifiConfiguration.java \
  R.java \
  $(NULL)

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

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

GARBAGE_DIRS += res classes network-libs

JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar:$(srcdir)/network-libs/commons-net-2.0.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:: sutAgentAndroid.apk

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

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

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

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

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

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