blob: a35a0dc9e7f8a80ee1e8c7a3983d4b9d56c9e348 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
include Makefile.inc
OBJDIR = ${BUILDDIR}/obj/hsc2hs
TARGET = ${DST}/hsc2hs$(EXE)
SRCS = Main.hs
FROMC = ../libraries/base/System/Console/GetOpt.$C \
../libraries/base/Data/List.$C \
../libraries/base/System/Cmd.$C
ifeq "$(findstring ghc, ${HC})" "ghc"
HFLAGS = $(shell $(LOCAL)fixghc $(GHCSYM) -package base -package lang )
export HFLAGS
endif
ifeq "$(findstring hbc, ${HC})" "hbc"
HFLAGS =
export HFLAGS
endif
ifeq "$(findstring nhc98, ${HC})" "nhc98"
HFLAGS = -package base +CTS -H4M -CTS
export HFLAGS
endif
all: $(TARGET)
install: $(TARGET)
cfiles: cleanC $(SRCS)
$(HMAKE) -hc=$(LOCAL)nhc98 -package base -C Main.hs
clean:
-rm -f *.hi *.o $(OBJDIR)/*.o
cleanC: clean
-rm -f *.hc *.c
realclean: clean cleanC
-rm -f $(OBJDIR)/Main$(EXE)
$(TARGET): $(OBJDIR) $(SRCS)
$(HMAKE) -hc=$(HC) Main -d$(OBJDIR) -DBUILD_NHC \
$(shell echo "${BUILDOPTS}") $(HFLAGS) $(CYGFLAG)
mv $(OBJDIR)/Main$(EXE) $(TARGET)
$(STRIP) $(TARGET)
$(OBJDIR):
mkdir -p $(OBJDIR)
fromC: $(OBJDIR)
cp $(FROMC) .
$(LOCAL)nhc98 -cpp -o $(TARGET) -d$(OBJDIR) *.$C
$(STRIP) $(TARGET)
|