-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
49 lines (36 loc) · 1.08 KB
/
Makefile
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
49
# Compiling Soutei library and sample applications
GHC := ghc
GHC_MAKE = $(GHC) --make
GHC_OPTS := -O2
GHC_INCLUDES = `$(GHC) --print-libdir`/include
PROGS := soutei-server soutei-cli
SOURCES := $(wildcard Soutei/*.hs)
MODULES := $(subst /,.,$(patsubst %.hs,%,$(SOURCES)))
OBJECTS := $(patsubst %.hs,$(BUILD_DIR)/objs/%.o,$(SOURCES))
HC_CMD := $(GHC_MAKE) $(GHC_OPTS) -I$(GHC_INCLUDES)
all: $(PROGS)
test:
cd demo/metcast-channels/ && $(MAKE) test
clean::
cd demo/metcast-channels/ && $(MAKE) clean
%: %.hs
$(HC_CMD) -o $@ $*.hs
clean::
rm -f *.hi *.o $(PROGS)
rm -f Soutei/*.hi
rm -f Soutei/*.o
soutei-pipelined: soutei-pipelined.hs
ghc -O2 --make \
soutei-pipelined.hs -o $@
# The following targets require the FCGI library or Metcast
# They are present for information only
#
# FCGIP=XXXSet-FGCI-library-here
# soutei-fcgi: soutei-fcgi.hs
# ghc -O2 --make -I$(FCGIP)/fcgi/include -i$(FCGIP) \
# $(FCGIP)/fcgi/fcgiapp.o $(FCGIP)/fcgi/os_unix.o \
# soutei-fcgi.hs -o $@
#
# soutei-mux: soutei-mux.hs
# ghc -O2 --make -i$(FCGIP) $(FCGIP)/System/sys_open.o \
# soutei-mux.hs -o $@