chiark
/
gitweb
/
~mdw
/
tripe-android
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The work! The progress!
[tripe-android]
/
Makefile
diff --git
a/Makefile
b/Makefile
index 79828201250e9fc177111884f9dfa325cc62c16a..275a88fdf77d75e4befcb3242256d5d3ad46ffb6 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-53,7
+53,7
@@
CCACHE := $(shell \
## Where to put the object files.
OUTDIR = out
## Where to put the object files.
OUTDIR = out
-CONFIGDIR = $(OUTDIR)/config
+CONFIGDIR = $(OUTDIR)/config
-$(hostcpu)
## The Java runtime, for some reason, hardcodes its default for
## `java.io.tmpdir', inviting security problems. If the user has defined a
## The Java runtime, for some reason, hardcodes its default for
## `java.io.tmpdir', inviting security problems. If the user has defined a
@@
-97,13
+97,13
@@
CFLAGS = -O2 -g -Wall
LDFLAGS = -Wl,-z,defs
## Host toolchain.
LDFLAGS = -Wl,-z,defs
## Host toolchain.
-FLAVOURS += host
-ENV.host
=
-CC.host
= gcc
-CFLAGS.host
= $(CFLAGS) -fPIC
-LD.host
= $(CC.host
)
-LDFLAGS.host
= $(LDFLAGS)
-CONFIG.host
=
+FLAVOURS += host
-$(hostcpu)
+ENV.host
-$(hostcpu)
=
+CC.host
-$(hostcpu)
= gcc
+CFLAGS.host
-$(hostcpu)
= $(CFLAGS) -fPIC
+LD.host
-$(hostcpu) = $(CC.host-$(hostcpu)
)
+LDFLAGS.host
-$(hostcpu)
= $(LDFLAGS)
+CONFIG.host
-$(hostcpu)
=
## Host JNI machinery.
$(CONFIGDIR)/jdkdir.mk:
## Host JNI machinery.
$(CONFIGDIR)/jdkdir.mk:
@@
-119,7
+119,7
@@
JDKPLAT := $(shell \
(darwin) echo macosx ;; \
(*) echo $(hostos) ;; \
esac)
(darwin) echo macosx ;; \
(*) echo $(hostos) ;; \
esac)
-CFLAGS.host
+= -I$(JDKDIR)/include -I$(JDKDIR)/include/$(JDKPLAT)
+CFLAGS.host
-$(hostcpu)
+= -I$(JDKDIR)/include -I$(JDKDIR)/include/$(JDKPLAT)
## Android SDK location.
ANDROID_SDKDIR = /usr/local/android/sdk
## Android SDK location.
ANDROID_SDKDIR = /usr/local/android/sdk
@@
-386,7
+386,7
@@
$(foreach a,$(APKLIBS), $(eval $(call obj-rule,$a)))
CLEANFILES += $(OUTDIR)/obj.*/*.o $(OUTDIR)/obj.*/*.d
## Machinery for linking.
CLEANFILES += $(OUTDIR)/obj.*/*.o $(OUTDIR)/obj.*/*.d
## Machinery for linking.
-JNIDIR.host
= $(OUTDIR
)
+JNIDIR.host
-$(hostcpu) = $(OUTDIR)/lib.host-$(hostcpu
)
JNIDIR.ndk = $(OUTDIR)/pkg/lib/$1
define apklib-rule
JNIDIR.ndk = $(OUTDIR)/pkg/lib/$1
define apklib-rule
@@
-404,7
+404,8
@@
$(foreach f,$(FLAVOURS), \
$(foreach a,$(APKLIBS), \
$(eval $(call apklib-rule,$f,$a))))
$(foreach a,$(APKLIBS), \
$(eval $(call apklib-rule,$f,$a))))
-CLEANFILES += $(OUTDIR)/pkg/lib/*/lib*.so $(OUTDIR)/lib*.so
+CLEANFILES += $(OUTDIR)/pkg/lib/*/lib*.so
+CLEANFILES += $(OUTDIR)/lib.host-$(hostcpu)/lib*.so
###--------------------------------------------------------------------------
### Android string resource generation.
###--------------------------------------------------------------------------
### Android string resource generation.
@@
-473,7
+474,8
@@
CLASSES += progress:sys,util
CLASSES += keys:progress,tar,sys,util
CLASSES += terminal:progress,sys,util
CLASSES += R
CLASSES += keys:progress,tar,sys,util
CLASSES += terminal:progress,sys,util
CLASSES += R
-CLASSES += toy-activity:R
+CLASSES += app:R
+CLASSES += toy-activity:app,R
## Building class files.
$(STAMPDIR)/%.class-stamp: %.java
## Building class files.
$(STAMPDIR)/%.class-stamp: %.java
@@
-581,8
+583,9
@@
all:: debug
clean::; rm -f $(CLEANFILES)
realclean::; rm -f $(REALCLEANFILES)
clean::; rm -f $(CLEANFILES)
realclean::; rm -f $(REALCLEANFILES)
-repl: $(CLASSSTAMPS) $(foreach a,$(APKLIBS),$(OUTDIR)/$a)
- $(SCALA) -cp $(CLASSDIR) -Djava.lib.path=$(OUTDIR) -Yno-load-impl-class
+repl: $(CLASSSTAMPS) $(foreach a,$(APKLIBS),$(JNIDIR.host-$(hostcpu))/$a)
+ $(SCALA) -cp $(CLASSDIR) -Yno-load-impl-class \
+ -Djava.lib.path=$(JNIDIR.host-$(hostcpu)) \
t:; : $(show)
.PHONY: t
t:; : $(show)
.PHONY: t