-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
71 lines (49 loc) · 1.35 KB
/
GNUmakefile
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
CC = cc
LD = cc
CFLAGS = -g -Wall
BINDIR = .
APPS = anag boggle caesar d2test dcomp dmatch evens countdown \
find1 find2 find3 \
monotone palin palinx qback reverse rotate scrab \
subst subtract useonly wordx woxrd xpalin xrev xword \
fitx jumble1 wordsquare target useall
BINAPPS := $(addprefix $(BINDIR)/,$(APPS))
all: $(BINAPPS)
clean: FORCE
$(dolines app,$(APPS),rm $(app).o)
veryclean0: clean FORCE
$(dolines app,$(APPS),rm $(BINDIR)/$(app))
veryclean: FORCE
rm -f $(BINAPPS)
dmatch_LIBS = match.o
$(BINDIR)/dmatch: match.o
#--- Default rule for d2 dictionary-based apps
$(BINAPPS): $(BINDIR)/%: %.o d2.o mem.o
$(LD) -o $@ $(LDFLAGS) $< d2.o mem.o $($*_LIBS)
$(addsuffix .o,$(APPS)): %.o: %.c
$(CC) -c -o $@ $(CFLAGS) $<
d2make: d2make.c d2write.c msort.o mem.o
#--
palind : palind.o
$(LD) -o palind palind.o $(LIB)
lsplit : lsplit.o
$(LD) -o lsplit lsplit.o $(LIB)
makednl : makednl.o
$(LD) -o makednl makednl.o $(LIB)
ccount : ccount.o
$(LD) -o ccount ccount.o $(LIB)
makedict : makedict.o
$(LD) -o makedict makedict.o $(LIB)
ckboggle : o.ckboggle
link -o ckboggle o.ckboggle ${LIB}
o.ckboggle : c.ckboggle
cc -c -o o.ckboggle c.ckboggle
dictsubs : dictsubs.o
$(LD) -o dictsubs dictsubs.o $(LIB)
dnl.o : dnl.c
$(CC) -c $(CFLAGS) dnl.c $(CPATH)
elim : c.elim
$(CC) -o $@ $^ $(LIB)
ws5.c: gen_ws
gen_ws 5 > $@
.PHONY: FORCE