X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=Makefile;h=0fe827e16f442936c1c00fba044264e5a4db70a3;hb=8d1996a73234eed84ba68dae7ef09b4faec2a7ea;hp=6a1922e79407a05857bb3a1d5334e1466570f705;hpb=16e69705ef729212262289fa9f185f171a5b8380;p=mate.git diff --git a/Makefile b/Makefile index 6a1922e..0fe827e 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ O_FILES = $(shell ls Mate/*.o) $(wildcard ffi/*.o) PACKAGES_ := bytestring harpy hs-java PACKAGES := $(addprefix -package ,$(PACKAGES_)) -GHC_OPT := -dynamic -Wall -O0 -fno-warn-unused-do-bind +GHC_OPT := -I. -dynamic -Wall -O0 -fno-warn-unused-do-bind GHC_LD := -optl-Xlinker -optl-x @@ -37,10 +37,15 @@ mate: Mate.hs ffi/trap.c $(HS_FILES) $(HS_BOOT) ffi/native.o %.dbg: %.class mate.dbg ./mate.dbg $(basename $<) +ifeq (${DBGFLAGS},) +DEBUGFLAGS = -DDBG_JIT -DDBG_MP +else +DEBUGFLAGS = ${DBGFLAGS} +endif mate.dbg: Mate.hs ffi/trap.c $(HS_FILES) $(HS_BOOT) ffi/native.o @mkdir -p build/debug/{ffi,Mate,} - gcc -Wall -DDEBUG -O0 -c ffi/trap.c -o build/debug/ffi/trap.o - ghc --make -DDEBUG $(GHC_OPT) Mate.hs build/debug/ffi/trap.o -o $@ $(GHC_LD) -outputdir build/debug + gcc -Wall $(DEBUGFLAGS) -O0 -c ffi/trap.c -o build/debug/ffi/trap.o + ghc --make $(DEBUGFLAGS) $(GHC_OPT) Mate.hs build/debug/ffi/trap.o -o $@ $(GHC_LD) -outputdir build/debug clean: rm -rf build mate mate.dbg ffi/native.o tests/*.class