From da0e323f123eb16d3208003c5b42724123e2ceaa Mon Sep 17 00:00:00 2001 From: candidtim Date: Tue, 11 Nov 2014 19:24:51 +0100 Subject: [PATCH 1/3] Makefile: added submodule initialization --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 13e381a..5a9ab2e 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ all: build init: cd usb-serial-for-android &&\ + git submodule init &&\ + git submodule update &&\ git pull origin master &&\ cd ../ &&\ cp -R usb-serial-for-android/UsbSerialLibrary/src/com src/ From 4441fbe5e9b7f35172da93973a22a2ab23073c7f Mon Sep 17 00:00:00 2001 From: candidtim Date: Tue, 11 Nov 2014 19:25:05 +0100 Subject: [PATCH 2/3] Makefile: now compiling all sources altogether --- .gitignore | 3 ++- Makefile | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 3c2d6dd..4485fc0 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ local.properties proguard.cfg .settings tmp -src/com/hoho \ No newline at end of file +src/com/hoho +src/sources.txt diff --git a/Makefile b/Makefile index 5a9ab2e..1a52b9c 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,9 @@ init: compile: cd src &&\ - javac org/shokai/firmata/ArduinoFirmataException.java &&\ - javac org/shokai/firmata/ArduinoFirmataEventHandler.java &&\ - javac org/shokai/firmata/ArduinoFirmataDataHandler.java &&\ - javac org/shokai/firmata/ArduinoFirmata.java + find -name "*.java" > sources.txt &&\ + javac @sources.txt &&\ + rm sources.txt build: compile cd src &&\ From 0ae02401110385909c86f3fac31e180a6ed0c4ec Mon Sep 17 00:00:00 2001 From: candidtim Date: Tue, 11 Nov 2014 19:25:11 +0100 Subject: [PATCH 3/3] Makefile: added build of usb-serial-for-android As usb-serial-for-android doesn't provide thier own build but propose "linking" sources upon user module build, Makefile is updated to do exactly this. Additionally fixed paths of resources in the packaged jar file: resources are now packed directy into the root. --- Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 1a52b9c..0a65237 100644 --- a/Makefile +++ b/Makefile @@ -14,10 +14,20 @@ compile: javac @sources.txt &&\ rm sources.txt -build: compile +buildfirmata: compile cd src &&\ jar cvf arduino-firmata.jar ./org &&\ - jar uvf arduino-firmata.jar ../README.md &&\ - jar uvf arduino-firmata.jar ../LICENSE.txt &&\ - jar uvf arduino-firmata.jar ../History.txt &&\ + jar uvf arduino-firmata.jar -C .. README.md &&\ + jar uvf arduino-firmata.jar -C .. LICENSE.txt &&\ + jar uvf arduino-firmata.jar -C .. History.txt &&\ mv arduino-firmata.jar ../ + +buildusbserial: compile + cd src &&\ + jar cvf usb-serial-for-android.jar ./com &&\ + jar uvf usb-serial-for-android.jar -C ../usb-serial-for-android README.md &&\ + jar uvf usb-serial-for-android.jar -C ../usb-serial-for-android LICENSE.txt &&\ + jar uvf usb-serial-for-android.jar -C ../usb-serial-for-android CHANGELOG.txt &&\ + mv usb-serial-for-android.jar ../ + +build: buildfirmata buildusbserial