2 # ----------------------------------------------------------------------------- #
3 # $Id: Makefile,v 1.14 1999/10/29 14:33:57 sewardj Exp $ #
4 # ----------------------------------------------------------------------------- #
7 include $(TOP)/mk/boilerplate.mk
10 RTS_DIR = $(TOP)/ghc/rts
12 # --------------------------------------------------------------------- #
13 # interpreter and relevant .a/.so files #
14 # --------------------------------------------------------------------- #
16 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
34 C_SRCS = link.c type.c static.c storage.c derive.c input.c compiler.c subst.c \
35 translate.c codegen.c lift.c free.c stgSubst.c optimise.c output.c \
36 hugs.c dynamic.c stg.c sainteger.c interface.c
38 SRC_CC_OPTS = -g -O -I$(GHC_DIR)/interpreter -I$(GHC_DIR)/includes -I$(GHC_DIR)/rts -D__HUGS__ -DCOMPILING_RTS -Wall -Wstrict-prototypes -Wno-unused -DDEBUG -DDEBUG_EXTRA -Winline
40 GHC_LIBS_NEEDED = $(TOP)/ghc/rts/libHSrts.a
42 all :: parser.c $(GHC_LIBS_NEEDED) nHandle.$(DYN_EXT) hugs
45 hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o \
46 ../rts/Evaluator.o ../rts/ForeignCall.o ../rts/GC.o ../rts/Printer.o \
48 $(CC) -o $@ $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) -lbfd -liberty $(LIB_DL) -lm
51 nHandle.$(DYN_EXT): nHandle.c
52 ifeq "$(TARGETPLATFORM)" "i386-unknown-cygwin32"
53 gcc -mno-cygwin -O -Wall -o nHandle.o -c nHandle.c
54 dllwrap -mno-cygwin --target=i386-mingw32 -o nHandle.dll \
55 -def nHandle.def nHandle.o
57 gcc -O -Wall -shared -fPIC -o nHandle.so nHandle.c
60 $(TOP)/ghc/rts/libHSrts.a:
61 (cd $(TOP)/ghc/rts ; make clean ; make EXTRA_CC_OPTS=-I$(GHC_DIR)/interpreter)
67 /bin/rm -f snapshot.tar
68 tar cvf snapshot.tar Makefile *.[chy] \
69 ../rts/Assembler.c ../rts/Evaluator.c ../rts/Disassembler.c \
70 ../rts/ForeignCall.c ../rts/Printer.c ../rts/QueueTemplate.h \
71 ../includes/options.h ../includes/Assembler.h nHandle.c \
72 ../includes/Assembler.h ../rts/Bytecodes.h ../includes/ClosureMacros.h \
73 lib/*.hs runnofib runallnofib
76 # --------------------------------------------------------------------- #
78 # --------------------------------------------------------------------- #
81 ./test/runtests test/static/*.hs
82 ./test/runtests test/typechecker/*.hs
83 ./test/runtests test/runtime/*.hs
84 ./test/runtests test/std/*.hs
85 ./test/runtests test/exts/*.hs
88 ./test/runtests test/runtime/*.hs
89 ./test/runtests test/std/*.hs
90 ./test/runtests test/exts/*.hs
92 # --------------------------------------------------------------------- #
94 # --------------------------------------------------------------------- #
96 CLEAN_FILES += hugs nHandle.dll
97 CLEAN_FILES += $(TOP)/ghc/rts/libHSrts.a $(TOP)/ghc/rts/*.o
98 CLEAN_FILES += parser.c
100 INSTALL_LIBEXECS = hugs
102 depend :: $(LOOPS) $(SRCS_UGNHS)
105 include $(TOP)/mk/target.mk