2 # ----------------------------------------------------------------------------- #
3 # $Id: Makefile,v 1.7 1999/04/27 10:06:47 sewardj Exp $ #
4 # ----------------------------------------------------------------------------- #
7 include $(TOP)/mk/boilerplate.mk
10 RTS_DIR = $(TOP)/ghc/rts
12 # --------------------------------------------------------------------- #
13 # interpreter and relevant .a/.so files #
14 # --------------------------------------------------------------------- #
25 C_SRCS = link.c type.c static.c storage.c derive.c input.c compiler.c subst.c \
26 translate.c codegen.c lift.c free.c stgSubst.c optimise.c output.c \
27 hugs.c dynamic.c stg.c sainteger.c
29 SRC_CC_OPTS = -O2 -g -I$(GHC_DIR)/interpreter -I$(GHC_DIR)/includes -I$(GHC_DIR)/rts -D__HUGS__ -DCOMPILING_RTS -Wall -Wstrict-prototypes -Wno-unused
31 GHC_LIBS_NEEDED = $(TOP)/ghc/rts/libHSrts.a
33 all :: parser.c $(GHC_LIBS_NEEDED) nHandle.so hugs
36 hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o \
37 ../rts/Evaluator.o ../rts/ForeignCall.o ../rts/GC.o ../rts/Printer.o \
39 $(CC) -o $@ -rdynamic $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) -lbfd -liberty -ldl -lm
42 gcc -O -fPIC -shared -o nHandle.so nHandle.c
44 $(TOP)/ghc/rts/libHSrts.a:
45 (cd $(TOP)/ghc/rts ; make clean ; make)
51 /bin/rm -f snapshot.tar
52 tar cvf snapshot.tar Makefile *.[chy] *-ORIG-* \
53 ../rts/Assembler.c ../rts/Evaluator.c ../rts/Disassembler.c \
54 ../rts/ForeignCall.c ../rts/Printer.c ../rts/QueueTemplate.h \
55 ../includes/options.h ../includes/Assembler.h nHandle.c \
56 ../includes/Assembler.h ../rts/Bytecodes.h \
57 lib/*.hs runnofib runallnofib
60 # --------------------------------------------------------------------- #
62 # --------------------------------------------------------------------- #
65 ./test/runtests test/static/*.hs
66 ./test/runtests test/typechecker/*.hs
67 ./test/runtests test/runtime/*.hs
68 ./test/runtests test/std/*.hs
69 ./test/runtests test/exts/*.hs
72 ./test/runtests test/runtime/*.hs
73 ./test/runtests test/std/*.hs
74 ./test/runtests test/exts/*.hs
76 # --------------------------------------------------------------------- #
78 # --------------------------------------------------------------------- #
80 CLEAN_FILES += hugs nHandle.so
81 CLEAN_FILES += $(TOP)/ghc/rts/libHSrts.a $(TOP)/ghc/rts/*.o
82 CLEAN_FILES += parser.c
84 INSTALL_LIBEXECS = hugs
86 depend :: $(LOOPS) $(SRCS_UGNHS)
89 include $(TOP)/mk/target.mk