-
-
Notifications
You must be signed in to change notification settings - Fork 606
/
posix.mak
108 lines (85 loc) · 1.55 KB
/
posix.mak
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
##
# Example Makefile for the D programming language
##
TARGETS= \
d2html \
dhry \
hello \
htmlget \
listener \
pi \
sieve \
wc \
wc2
## Those examples are Windows specific:
# chello
# dserver
# dclient
# winsamp
SRC = \
chello.d \
d2html.d \
dclient.d \
dhry.d \
dserver.d \
hello.d \
htmlget.d \
listener.d \
pi.d \
sieve.d \
wc.d \
wc2.d \
winsamp.d
DFLAGS =
LFLAGS =
##
## Those values are immutables
## For languages such as C and C++, builtin rules are provided.
## But for D, you had to had to do everything by hand.
## Basically, if you had some Makefile knowledge, this is all you need.
##
## For explanation / more advanced use, see:
## https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html
.SUFFIXES: .d
.d.o:
$(DMD) $(DFLAGS) -c $< -of$@
##
LINK = dmd
DMD = dmd
RM = rm -rf
OBJS = $(SRC:.d=.o)
all: $(TARGETS)
clean:
$(RM) $(OBJS)
fclean: clean
$(RM) $(TARGETS)
$(RM) *.d.htm
re: fclean all
chello: $(OBJS)
$(LINK) $(LFLAGS) $(OBJS) -of$@
.PHONY: all clean fclean re
.NOTPARALLEL: clean
d2html: d2html.o
$(LINK) $(LFLAGS) $< -of$@
dclient: dclient.o
$(LINK) $(LFLAGS) $< -of$@
dhry: dhry.o
$(LINK) $(LFLAGS) $< -of$@
dserver: dserver.o
$(LINK) $(LFLAGS) $< -of$@
hello: hello.o
$(LINK) $(LFLAGS) $< -of$@
htmlget: htmlget.o
$(LINK) $(LFLAGS) $< -of$@
listener: listener.o
$(LINK) $(LFLAGS) $< -of$@
pi: pi.o
$(LINK) $(LFLAGS) $< -of$@
sieve: sieve.o
$(LINK) $(LFLAGS) $< -of$@
wc2: wc2.o
$(LINK) $(LFLAGS) $< -of$@
wc: wc.o
$(LINK) $(LFLAGS) $< -of$@
winsamp: winsamp.o
$(LINK) $(LFLAGS) $< -of$@