2 # ----------------------------------------------------------------------------- #
3 # $Id: Makefile,v 1.11 1999/10/15 11:02:09 sewardj Exp $ #
4 # ----------------------------------------------------------------------------- #
7 include $(TOP)/mk/boilerplate.mk
10 RTS_DIR = $(TOP)/ghc/rts
12 # --------------------------------------------------------------------- #
13 # interpreter and relevant .a/.so files #
14 # --------------------------------------------------------------------- #
26 C_SRCS = link.c type.c static.c storage.c derive.c input.c compiler.c subst.c \
27 translate.c codegen.c lift.c free.c stgSubst.c optimise.c output.c \
28 hugs.c dynamic.c stg.c sainteger.c interface.c
30 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
32 GHC_LIBS_NEEDED = $(TOP)/ghc/rts/libHSrts.a
34 all :: parser.c $(GHC_LIBS_NEEDED) nHandle.so hugs
37 hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o \
38 ../rts/Evaluator.o ../rts/ForeignCall.o ../rts/GC.o ../rts/Printer.o \
39 ../rts/StgCRun.o nHandle.so
40 $(CC) -o $@ -rdynamic $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) -lbfd -liberty -ldl -lm
43 gcc -O -fPIC -shared -o nHandle.so nHandle.c
45 $(TOP)/ghc/rts/libHSrts.a:
46 (cd $(TOP)/ghc/rts ; make clean ; make EXTRA_CC_OPTS=-I$(GHC_DIR)/interpreter)
52 /bin/rm -f snapshot.tar
53 tar cvf snapshot.tar Makefile *.[chy] \
54 ../rts/Assembler.c ../rts/Evaluator.c ../rts/Disassembler.c \
55 ../rts/ForeignCall.c ../rts/Printer.c ../rts/QueueTemplate.h \
56 ../includes/options.h ../includes/Assembler.h nHandle.c \
57 ../includes/Assembler.h ../rts/Bytecodes.h ../includes/ClosureMacros.h \
58 lib/*.hs runnofib runallnofib
61 # --------------------------------------------------------------------- #
63 # --------------------------------------------------------------------- #
66 ./test/runtests test/static/*.hs
67 ./test/runtests test/typechecker/*.hs
68 ./test/runtests test/runtime/*.hs
69 ./test/runtests test/std/*.hs
70 ./test/runtests test/exts/*.hs
73 ./test/runtests test/runtime/*.hs
74 ./test/runtests test/std/*.hs
75 ./test/runtests test/exts/*.hs
77 # --------------------------------------------------------------------- #
79 # --------------------------------------------------------------------- #
81 CLEAN_FILES += hugs nHandle.so
82 CLEAN_FILES += $(TOP)/ghc/rts/libHSrts.a $(TOP)/ghc/rts/*.o
83 CLEAN_FILES += parser.c
85 INSTALL_LIBEXECS = hugs
87 depend :: $(LOOPS) $(SRCS_UGNHS)
90 include $(TOP)/mk/target.mk