Skip to content

Commit fc6e7c3

Browse files
author
malcolm
committed
Move Makefiles for nhc98's build here, prior to grafting the directory
1 parent bbdfe4e commit fc6e7c3

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

Makefile.inc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ifeq "" "${MKDIR}"
2+
MKDIR:=$(shell pwd)
3+
#MKDIR:=$(PWD)
4+
else
5+
MKDIR:=$(patsubst %/$(notdir ${MKDIR}),%, ${MKDIR})
6+
endif
7+
include ${MKDIR}/Makefile.inc

Makefile.nhc98

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

0 commit comments

Comments
 (0)