1 # -----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.2 2001/07/03 11:37:49 simonmar Exp $
5 include $(TOP)/mk/boilerplate.mk
36 PRE_SRCS += $(wildcard $(patsubst %, %/*.hsc, $(ALL_DIRS)))
37 SRC_HSC2HS_OPTS += -Iinclude -I.
39 ALL_HS_SRCS = $(wildcard $(patsubst %, %/*.hs, . $(ALL_DIRS)))
40 ALL_LHS_SRCS += $(wildcard GHC/*.lhs)
41 ALL_HS_OBJS = $(patsubst %.hs, %.o, $(ALL_HS_SRCS)) \
42 $(patsubst %.lhs, %.o, $(ALL_LHS_SRCS))
43 ALL_HS_HIS = $(patsubst %.o, %.hi, $(ALL_HS_OBJS))
45 srcs : $(HS_SRCS) GHC/Prim.$(way_)hi
47 # dependencies between .hsc files
48 GHC/IO.hs : GHC/Handle.hs
50 GHC/Prim.$(way_)hi : GHC/Prim.hi-boot
53 SRC_HC_OPTS += -cpp -fglasgow-exts -fvia-C -I$(FPTOOLS_TOP)/ghc/includes -Iinclude -package-name core -H128m $(GhcLibHcOpts)
55 LIBNAME = libHScore$(_way).a
57 CLEAN_FILES += $(ALL_HS_OBJS) $(ALL_HS_HIS)
62 $(GHC_INPLACE) $(HC_OPTS) --make $(ALL_HS_SRCS) $(ALL_LHS_SRCS)
64 $(LIBNAME) : $(ALL_HS_OBJS)
66 $(AR) $(AR_OPTS) $@ $(ALL_HS_OBJS)
70 $(GHC_INPLACE) $(HC_OPTS) --make $<
72 $(GHC_INPLACE) $(HC_OPTS) --make $<
74 include $(TOP)/mk/target.mk