4215
|
1 # vi: set ft=make:
|
|
2 PREFIX = /usr/local
|
|
3 INSTDIR = $(PREFIX)/bin
|
|
4
|
|
5 CC = gcc
|
|
6 #CC = cc
|
|
7
|
|
8 #COPT = -DDEBUGGING -g
|
|
9 COPT = -g -O2
|
|
10 #COPT = -xO4 -xalias_level=std -xbuiltin=%all -xdepend -xinline=%auto -xlibmil -xtarget=native
|
|
11 #COPT = -O
|
|
12 #COPT =
|
|
13
|
|
14 LDOPT =
|
|
15 #LDOPT = -s
|
|
16
|
|
17 CPP = $(CC) -E
|
|
18 #CPP = cpp
|
|
19
|
|
20 DEPEND = $(CPP) -MM
|
|
21 #DEPEND = $(CC) -xM1
|
|
22
|
|
23 CFLAGS = $(COPT) -W -Wall -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -std=gnu9x -pedantic -fstrict-aliasing -pipe
|
|
24 #CFLAGS = $(COPT) -W -Wall -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -std=gnu99 -pedantic -fstrict-aliasing -pipe
|
|
25 #CFLAGS = $(COPT) -Xc
|
|
26 #CFLAGS = $(COPT)
|
|
27
|
|
28 LDFLAGS = $(LDOPT) -lm
|
|
29
|
|
30 ECHO = echo
|
|
31 CAT = cat
|
|
32 CP = cp
|
|
33 RMF = rm -f
|
|
34 TAR = tar
|
|
35 CTAGS = ctags
|
|
36 #CTAGS = ctags --langmap=c:.c.h
|
|
37 ZIP = bzip2
|
|
38 ZIP_EXT = .bz2
|
|
39 BASENAME = basename
|
|
40 PWD = pwd
|
|
41
|
|
42 # # # # #
|
|
43
|
|
44 OBJ = IO.o Str.o atechit.o compile.o deparse.o expr.o hang.o hash.o inc.o \
|
|
45 kork.o list.o main.o mars.o match.o op.o opt.o parse.o pp.o random.o \
|
|
46 re.o run.o strhash.o strutil.o sub.o text.o transmogrify.o val.o \
|
|
47 variable.o venus.o version.o xmalloc.o zz.o
|
|
48
|
|
49 all: tags ploki
|
|
50
|
|
51 tags: *.c *.h
|
|
52 $(CTAGS) *.c *.h
|
|
53
|
|
54 distclean: clean
|
|
55 $(RMF) core examples/core a.out
|
|
56 clean:
|
|
57 $(RMF) *.o ploki
|
|
58 realclean: clean
|
|
59 $(RMF) *.depend Makefile
|
|
60
|
|
61 remake: clean all
|
|
62
|
|
63 ploki: $(OBJ)
|
|
64 $(CC) -o ploki $(OBJ) $(LDFLAGS)
|
|
65
|
|
66 install: ploki
|
|
67 $(CP) ploki '$(INSTDIR)/'
|
|
68
|
|
69 version.c: version.c.in VERSION
|
|
70 $(CP) version.c.in version.c
|
|
71 $(ECHO) '"'"`$(CAT) VERSION`"'";' >>version.c
|
|
72
|
|
73 ########################################################################
|
|
74 IO.o: IO.c config.h IO.h Str.h main.h main_io.h xmalloc.h zz.h
|
|
75 Str.o: Str.c config.h Str.h strutil.h xmalloc.h
|
|
76 atechit.o: atechit.c zz.h config.h atechit.h main.h
|
|
77 compile.o: compile.c config.h Str.h compile.h text.h op.h IO.h expr.h \
|
|
78 re.h stack.h xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h \
|
|
79 main_var.h zz.h
|
|
80 deparse.o: deparse.c config.h Str.h deparse.h text.h op.h IO.h expr.h \
|
|
81 re.h stack.h xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h \
|
|
82 main_io.h main_label.h mars.h venus.h hash.h zz.h
|
|
83 expr.o: expr.c config.h Str.h expr.h op.h IO.h re.h stack.h xmalloc.h \
|
|
84 strhash.h val.h kork.h list.h sub.h variable.h hang.h main_io.h \
|
|
85 main_label.h mars.h venus.h hash.h main_var.h match.h pp.h random.h \
|
|
86 run.h text.h zz.h
|
|
87 hang.o: hang.c config.h hang.h
|
|
88 hash.o: hash.c config.h hash.h main.h main_opt.h random.h xmalloc.h
|
|
89 inc.o: inc.c config.h inc.h
|
|
90 kork.o: kork.c config.h IO.h Str.h kork.h strutil.h xmalloc.h
|
|
91 list.o: list.c list.h config.h val.h IO.h Str.h kork.h sub.h xmalloc.h
|
|
92 main.o: main.c IO.h config.h Str.h atechit.h compile.h text.h op.h expr.h \
|
|
93 re.h stack.h xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h \
|
|
94 deparse.h inc.h main.h main_io.h main_label.h mars.h venus.h hash.h \
|
|
95 main_opt.h main_var.h opt.h parse.h random.h run.h transmogrify.h \
|
|
96 version.h zz.h
|
|
97 mars.o: mars.c Str.h config.h mars.h op.h IO.h expr.h re.h stack.h \
|
|
98 xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h
|
|
99 match.o: match.c IO.h config.h Str.h main_io.h main_opt.h match.h re.h \
|
|
100 val.h kork.h list.h sub.h run.h op.h expr.h stack.h xmalloc.h strhash.h \
|
|
101 variable.h text.h
|
|
102 op.o: op.c IO.h config.h Str.h expr.h op.h re.h stack.h xmalloc.h \
|
|
103 strhash.h val.h kork.h list.h sub.h variable.h main_label.h mars.h \
|
|
104 venus.h hash.h
|
|
105 opt.o: opt.c opt.h
|
|
106 parse.o: parse.c IO.h config.h Str.h inc.h main.h main_label.h mars.h \
|
|
107 op.h expr.h re.h stack.h xmalloc.h strhash.h val.h kork.h list.h sub.h \
|
|
108 variable.h venus.h hash.h parse.h text.h
|
|
109 pp.o: pp.c IO.h config.h Str.h kork.h list.h main_io.h main_opt.h match.h \
|
|
110 re.h val.h sub.h pp.h run.h op.h expr.h stack.h xmalloc.h strhash.h \
|
|
111 variable.h text.h
|
|
112 random.o: random.c config.h random.h
|
|
113 re.o: re.c config.h IO.h Str.h hash.h main_io.h main_opt.h re.h xmalloc.h \
|
|
114 zz.h re_block.c.h
|
|
115 run.o: run.c config.h IO.h Str.h atechit.h expr.h op.h re.h stack.h \
|
|
116 xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h hang.h main.h \
|
|
117 main_io.h main_label.h mars.h venus.h hash.h main_opt.h run.h text.h \
|
|
118 zz.h
|
|
119 strhash.o: strhash.c hash.h strhash.h config.h strutil.h xmalloc.h
|
|
120 strutil.o: strutil.c strutil.h config.h
|
|
121 sub.o: sub.c expr.h config.h Str.h op.h IO.h re.h stack.h xmalloc.h \
|
|
122 strhash.h val.h kork.h list.h sub.h variable.h main_opt.h \
|
|
123 transmogrify.h text.h
|
|
124 text.o: text.c text.h op.h IO.h config.h Str.h expr.h re.h stack.h \
|
|
125 xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h
|
|
126 transmogrify.o: transmogrify.c config.h Str.h expr.h op.h IO.h re.h \
|
|
127 stack.h xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h \
|
|
128 main_label.h mars.h venus.h hash.h text.h transmogrify.h zz.h
|
|
129 val.o: val.c config.h IO.h Str.h val.h kork.h list.h sub.h xmalloc.h
|
|
130 variable.o: variable.c config.h Str.h strhash.h variable.h xmalloc.h
|
|
131 venus.o: venus.c Str.h config.h hash.h op.h IO.h expr.h re.h stack.h \
|
|
132 xmalloc.h strhash.h val.h kork.h list.h sub.h variable.h venus.h zz.h
|
|
133 version.o: version.c version.h
|
|
134 xmalloc.o: xmalloc.c config.h main.h xmalloc.h
|
|
135 zz.o: zz.c zz.h config.h main.h
|