author | Markus Bröker <mbroeker@largo.localnet> |
Thu, 16 Apr 2009 12:49:11 +0200 | |
changeset 37 | 0fbbe329c3a2 |
parent 33 | 5e0a954f7c0b |
child 39 | 46d7ec9d63bd |
permissions | -rw-r--r-- |
0 | 1 |
CC=gcc -g -ggdb |
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
2 |
CPP=g++ -g -ggdb |
0 | 3 |
CFLAGS=-Wall -O2 -Iinclude -ansi |
4 |
TARGET=ncurses \ |
|
5 |
numerierung \ |
|
6 |
xdemo \ |
|
7 |
signals \ |
|
8 |
tree \ |
|
9 |
utf8 \ |
|
10 |
file_demo \ |
|
11 |
testcase \ |
|
12 |
atoi_print \ |
|
13 |
data_types \ |
|
14 |
dnsresolve \ |
|
15 |
nomalloc \ |
|
16 |
urandom \ |
|
17 |
threads \ |
|
18 |
crypt \ |
|
19 |
tokenpasting \ |
|
20 |
hex2chars \ |
|
21 |
floating \ |
|
22 |
max \ |
|
23 |
recording \ |
|
24 |
endian \ |
|
25 |
fak \ |
|
26 |
blackhole \ |
|
27 |
folge \ |
|
28 |
counter \ |
|
29 |
sudoku \ |
|
30 |
cunit \ |
|
31 |
md5 \ |
|
32 |
varargs \ |
|
33 |
concatenation \ |
|
34 |
alpha_beta \ |
|
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
35 |
life \ |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
36 |
bad_alloc \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
37 |
lotto \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
38 |
database \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
39 |
gauss \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
40 |
mem2swap \ |
10
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
41 |
prog_limit \ |
11
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
42 |
connection \ |
24
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
43 |
copy \ |
25 | 44 |
function_pointers \ |
26
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
45 |
sort \ |
30
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
46 |
min2time \ |
33 | 47 |
recursive_compiler \ |
48 |
getpwnam_error |
|
0 | 49 |
|
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
50 |
.SUFFIXES: .c .cc .asm |
0 | 51 |
|
52 |
.c.o: |
|
53 |
@echo Compiling $< ... |
|
54 |
@$(CC) -c $(CFLAGS) -o $@ $< |
|
55 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
56 |
.cc.o: |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
57 |
@echo Compiling $< ... |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
58 |
@$(CPP) -c $(CFLAGS) -o $@ $< |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
59 |
|
0 | 60 |
.asm.o: |
61 |
@echo Assembling $< ... |
|
62 |
@$(NASM) $< -o $@ |
|
63 |
||
64 |
all: $(TARGET) |
|
65 |
||
66 |
ncurses: ncurses.o |
|
67 |
@echo Linking $< ... |
|
68 |
@$(CC) $(CFLAGS) -lncursesw -o $@ $< |
|
69 |
||
70 |
numerierung: numerierung.o |
|
71 |
@echo Linking $< ... |
|
72 |
@$(CC) $(CFLAGS) -o $@ $< |
|
73 |
||
74 |
xdemo: xdemo.o |
|
75 |
@echo Linking $< ... |
|
76 |
@$(CC) $(CFLAGS) -lX11 -o $@ $< |
|
77 |
||
78 |
signals: signals.o |
|
79 |
@echo Linking $< ... |
|
80 |
@$(CC) $(CFLAGS) -o $@ $< |
|
81 |
||
82 |
tree: tree.o |
|
83 |
@echo Linking $< ... |
|
84 |
@$(CC) $(CFLAGS) -o $@ $< |
|
85 |
||
86 |
utf8: utf8.o |
|
87 |
@echo Linking $< ... |
|
88 |
@$(CC) $(CFLAGS) -o $@ $< |
|
89 |
||
90 |
file_demo: file_demo.o |
|
91 |
@echo Linking $< ... |
|
92 |
@$(CC) $(CFLAGS) -o $@ $< |
|
93 |
||
94 |
testcase: testcase.o |
|
95 |
@echo Linking $< ... |
|
96 |
@$(CC) $(CFLAGS) -o $@ $< |
|
97 |
||
98 |
atoi_print: atoi_print.o |
|
99 |
@echo Linking $< ... |
|
100 |
@$(CC) $(CFLAGS) -o $@ $< |
|
101 |
||
102 |
data_types: data_types.c |
|
103 |
@echo Linking $< ... |
|
104 |
@$(CC) $(CFLAGS) -std=c99 -o $@ $< |
|
105 |
||
106 |
dnsresolve: dnsresolve.o |
|
107 |
@echo Linking $< ... |
|
108 |
@$(CC) $(CFLAGS) -o $@ $< |
|
109 |
||
110 |
nomalloc: nomalloc.o |
|
111 |
@echo Linking $< ... |
|
112 |
@$(CC) $(CFLAGS) -o $@ $< |
|
113 |
||
114 |
urandom: urandom.o |
|
115 |
@echo Linking $< ... |
|
116 |
@$(CC) $(CFLAGS) -o $@ $< |
|
117 |
||
118 |
threads: threads.o |
|
119 |
@echo Linking $< ... |
|
120 |
@$(CC) $(CFLAGS) -o $@ $< -lpthread |
|
121 |
||
122 |
crypt: crypt.o |
|
123 |
@echo Linking $< ... |
|
32 | 124 |
@$(CC) $(CFLAGS) -o $@ $< -lcrypt |
0 | 125 |
|
126 |
tokenpasting: tokenpasting.o |
|
127 |
@echo Linking $< ... |
|
128 |
@$(CC) $(CFLAGS) -o $@ $< |
|
129 |
||
130 |
hex2chars: hex2chars.o |
|
131 |
@echo Linking $< ... |
|
132 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
133 |
||
134 |
floating: floating.o |
|
135 |
@echo Linking $< ... |
|
136 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
137 |
||
138 |
max: max.o |
|
139 |
@echo Linking $< ... |
|
140 |
@$(CC) $(CFLAGS) -o $@ $< |
|
141 |
||
142 |
recording: recording.o |
|
143 |
@echo Linking $< ... |
|
144 |
@$(CC) $(CFLAGS) -o $@ $< |
|
145 |
||
146 |
endian: endian.o |
|
147 |
@echo Linking $< ... |
|
148 |
@$(CC) $(CFLAGS) -o $@ $< |
|
149 |
||
150 |
fak: fak.o |
|
151 |
@echo Linking $< ... |
|
152 |
@$(CC) $(CFLAGS) -o $@ $< |
|
153 |
||
154 |
blackhole: blackhole.c |
|
155 |
@echo Compiling AND Linking $< WITH -O0 ... |
|
156 |
@$(CC) $(CFLAGS) -O0 -o $@ $< |
|
157 |
||
158 |
folge: folge.o |
|
159 |
@echo Linking $< ... |
|
160 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
161 |
||
162 |
counter: counter.o |
|
163 |
@echo Linking $< ... |
|
164 |
@$(CC) $(CFLAGS) -o $@ $< |
|
165 |
||
166 |
sudoku: sudoku.o |
|
167 |
@echo Linking $< ... |
|
168 |
@$(CC) $(CFLAGS) -o $@ $< |
|
169 |
||
170 |
cunit: cunit.o |
|
171 |
@echo Linking $< ... |
|
172 |
@$(CC) $(CFLAGS) -o $@ $< -lcunit |
|
173 |
||
174 |
md5: md5.o |
|
175 |
@echo Linking $< ... |
|
176 |
@$(CC) -o $@ $< -llsf |
|
177 |
||
178 |
varargs: varargs.o |
|
179 |
@echo Linking $< ... |
|
180 |
@$(CC) -o $@ $< |
|
181 |
||
182 |
concatenation: concatenation.o |
|
183 |
@echo Linking $< ... |
|
184 |
@$(CC) -o $@ $< |
|
185 |
||
186 |
alpha_beta: alpha_beta.o |
|
187 |
@echo Linking $< ... |
|
188 |
@$(CC) -o $@ $< |
|
189 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
190 |
life: life.o |
0 | 191 |
@echo Linking $< ... |
192 |
@$(CC) -o $@ $< |
|
193 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
194 |
bad_alloc: bad_alloc.o |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
195 |
@echo Linking $< ... |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
196 |
@$(CPP) -o $@ $< |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
197 |
|
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
198 |
lotto: lotto.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
199 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
200 |
@$(CPP) -o $@ $< |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
201 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
202 |
mem2swap: mem2swap.o set_limit.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
203 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
204 |
@$(CPP) -o $@ mem2swap.o set_limit.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
205 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
206 |
prog_limit: prog_limit.o set_limit.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
207 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
208 |
@$(CPP) -o $@ prog_limit.o set_limit.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
209 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
210 |
database: database.c |
8
96d16dfe787a
We use return EXIT_SUCCESS instead of return 0
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
3
diff
changeset
|
211 |
@echo Compiling $< ... |
96d16dfe787a
We use return EXIT_SUCCESS instead of return 0
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
3
diff
changeset
|
212 |
@$(CC) -c -I$(shell pg_config --includedir) $< |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
213 |
@echo Linking $< ... |
8
96d16dfe787a
We use return EXIT_SUCCESS instead of return 0
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
3
diff
changeset
|
214 |
@$(CC) -lpq -o $@ $@.o |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
215 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
216 |
gauss: gauss.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
217 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
218 |
@$(CPP) -o $@ $< |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
219 |
|
10
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
220 |
connection: connection.o |
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
221 |
@echo Linking $< ... |
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
222 |
@$(CPP) -o $@ $< |
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
223 |
|
11
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
224 |
copy: copy.o |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
225 |
@echo Linking $< ... |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
226 |
@$(CPP) -o $@ $< |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
227 |
|
24
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
228 |
function_pointers: function_pointers.o |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
229 |
@echo Linking $< ... |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
230 |
@$(CC) -o $@ $< |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
231 |
|
25 | 232 |
sort: sort.o |
233 |
@echo Linking $< ... |
|
234 |
@$(CC) -o $@ $< |
|
235 |
||
26
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
236 |
min2time: min2time.o |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
237 |
@echo Linking $< ... |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
238 |
@$(CC) -o $@ $< |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
239 |
|
30
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
240 |
recursive_compiler: recursive_compiler.o |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
241 |
@echo Linking $< ... |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
242 |
@$(CC) -o $@ $< |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
243 |
|
33 | 244 |
getpwnam_error: getpwnam_error.o |
245 |
@echo Linking $< ... |
|
246 |
@$(CC) -o $@ $< |
|
247 |
||
0 | 248 |
.PHONY: clean uninstall |
249 |
||
250 |
clean: |
|
251 |
rm -f *.o *~ |
|
252 |
rm -f $(TARGET) |
|
253 |