[project @ 1999-04-27 10:59:29 by sewardj]
[ghc-hetmet.git] / ghc / interpreter / Makefile
index c7d5d20..45b574b 100644 (file)
@@ -1,6 +1,6 @@
 
 # ----------------------------------------------------------------------------- #
-# $Id: Makefile,v 1.6 1999/03/09 14:51:03 sewardj Exp $                         #
+# $Id: Makefile,v 1.8 1999/04/27 10:59:29 sewardj Exp $                         #
 # ----------------------------------------------------------------------------- #
 
 TOP = ../..
@@ -24,30 +24,25 @@ HS_SRCS =
 Y_SRCS = parser.y
 C_SRCS = link.c type.c static.c storage.c derive.c input.c compiler.c subst.c \
      translate.c codegen.c lift.c free.c stgSubst.c optimise.c output.c   \
-     hugs.c dynamic.c stg.c
+     hugs.c dynamic.c stg.c sainteger.c
 
-SRC_CC_OPTS = -O2 -Winline -g -I$(GHC_DIR)/includes -I$(GHC_DIR)/rts -D__HUGS__ -Wall -Wstrict-prototypes 
+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
 
-GHC_LIBS_NEEDED = $(TOP)/ghc/rts/libHSrts.a $(TOP)/ghc/rts/gmp/libgmp.a
-GHC_DYN_CBITS_DIR = $(TOP)/ghc/lib/std/cbits
-GHC_DYN_CBITS = $(GHC_DYN_CBITS_DIR)/libHS_cbits.so
+GHC_LIBS_NEEDED = $(TOP)/ghc/rts/libHSrts.a
 
-all :: parser.c $(GHC_LIBS_NEEDED) $(GHC_DYN_CBITS) hugs
+all :: parser.c $(GHC_LIBS_NEEDED) nHandle.so hugs
 
 ### EXTREMELY hacky
-hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o ../rts/Evaluator.o ../rts/ForeignCall.o ../rts/GC.o \
-                ../rts/Printer.o
-       $(CC) -o $@ $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) -lbfd -liberty -ldl -lm
+hugs: $(C_OBJS) ../rts/Sanity.o ../rts/Assembler.o ../rts/Disassembler.o \
+      ../rts/Evaluator.o ../rts/ForeignCall.o ../rts/GC.o ../rts/Printer.o \
+      nHandle.so
+       $(CC) -o $@ -rdynamic $(CC_OPTS) $^ $(GHC_LIBS_NEEDED) -lbfd -liberty -ldl -lm
 
-$(GHC_DYN_CBITS):
-###    (cd $(GHC_DYN_CBITS_DIR); make EXTRA_CC_OPTS="-fpic -optc-g" ; gcc -shared -o libHS_cbits.so *.o)
-       (cd $(GHC_DYN_CBITS_DIR); rm -f *.o ; gcc -I../../../includes -fPIC -g -Wall -c *.c ; gcc -shared -o libHS_cbits.so *.o)
-       cp -f $(GHC_DYN_CBITS) .
+nHandle.so:
+       gcc -O -fPIC -shared -o nHandle.so nHandle.c
 
 $(TOP)/ghc/rts/libHSrts.a:
-       (cd $(TOP)/ghc/rts ; make clean ; make)
-$(TOP)/ghc/rts/gmp/libgmp.a:
-       (cd $(TOP)/ghc/rts/gmp ; make clean ; make)
+       (cd $(TOP)/ghc/rts ; make clean ; make EXTRA_CC_OPTS=-I$(GHC_DIR)/interpreter)
 
 cleanish:
        /bin/rm *.o
@@ -56,10 +51,10 @@ snapshot:
        /bin/rm -f snapshot.tar
        tar cvf snapshot.tar Makefile *.[chy] *-ORIG-* \
              ../rts/Assembler.c ../rts/Evaluator.c ../rts/Disassembler.c \
-             ../rts/ForeignCall.c ../rts/Printer.c \
+             ../rts/ForeignCall.c ../rts/Printer.c ../rts/QueueTemplate.h \
              ../includes/options.h ../includes/Assembler.h nHandle.c \
-             ../includes/Assembler.h ../rts/Bytecodes.h \
-             lib/*.hs
+             ../includes/Assembler.h ../rts/Bytecodes.h ../includes/ClosureMacros.h \
+             lib/*.hs runnofib runallnofib
 
 
 # --------------------------------------------------------------------- #
@@ -82,9 +77,8 @@ checkrun: all
 # Cleanery & misc                                                       #
 # --------------------------------------------------------------------- #
 
-CLEAN_FILES += hugs libHS_cbits.so $(GHC_DYN_CBITS) $(GHC_DYN_CBITS_DIR)/*.o 
+CLEAN_FILES += hugs nHandle.so
 CLEAN_FILES += $(TOP)/ghc/rts/libHSrts.a $(TOP)/ghc/rts/*.o
-CLEAN_FILES += $(TOP)/ghc/rts/gmp/libgmp.a  $(TOP)/ghc/rts/gmp/*.o $(TOP)/ghc/rts/gmp/*/*.o
 CLEAN_FILES += parser.c
 
 INSTALL_LIBEXECS = hugs