projects
/
mate.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
methodpool: also call native methods
[mate.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index bf68386d1adf11ae1b4407361a463727999f9f09..f3a53a4c4f9e2121ac641af2df9217324d4a18fa 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-8,7
+8,7
@@
O_FILES = $(shell ls Mate/*.o) $(wildcard ffi/*.o)
PACKAGES_ := bytestring harpy hs-java
PACKAGES := $(addprefix -package ,$(PACKAGES_))
PACKAGES_ := bytestring harpy hs-java
PACKAGES := $(addprefix -package ,$(PACKAGES_))
-GHC_OPT := -Wall -O0 -fno-warn-unused-do-bind
+GHC_OPT := -
dynamic -
Wall -O0 -fno-warn-unused-do-bind
GHC_LD := -optl-Xlinker -optl-x
GHC_LD := -optl-Xlinker -optl-x
@@
-27,11
+27,15
@@
test: mate $(CLASS_FILES)
./$< tests/DifferentClass1.class | grep mainresult
@printf "should be: 0x%08x\n" 8
@printf "should be: 0x%08x\n" 13
./$< tests/DifferentClass1.class | grep mainresult
@printf "should be: 0x%08x\n" 8
@printf "should be: 0x%08x\n" 13
+ ./$< tests/Native1.class | egrep -i -e '^printsomething: '
%.class: %.java
$(JAVAC) $<
%.class: %.java
$(JAVAC) $<
-mate: Mate.hs ffi/trap.c $(HS_FILES)
+ffi/native.o: ffi/native.c
+ ghc -Wall -O2 -c $< -o $@
+
+mate: Mate.hs ffi/trap.c $(HS_FILES) ffi/native.o
ghc --make $(GHC_OPT) Mate.hs ffi/trap.c -o $@ $(GHC_LD)
clean:
ghc --make $(GHC_OPT) Mate.hs ffi/trap.c -o $@ $(GHC_LD)
clean: