author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Thu, 16 Apr 2009 12:49:13 +0200 | |
changeset 59 | a7ba10b68915 |
parent 58 | 9609c54a54d3 |
child 62 | b7061c0e239f |
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 \ |
|
45
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
32 |
md5rec \ |
58
9609c54a54d3
myprintf.c added - replaces varargs.c
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
56
diff
changeset
|
33 |
myprintf \ |
0 | 34 |
concatenation \ |
35 |
alpha_beta \ |
|
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
36 |
life \ |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
37 |
bad_alloc \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
38 |
lotto \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
39 |
database \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
40 |
gauss \ |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
41 |
mem2swap \ |
10
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
42 |
prog_limit \ |
11
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
43 |
connection \ |
24
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
44 |
copy \ |
25 | 45 |
function_pointers \ |
26
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
46 |
sort \ |
30
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
47 |
min2time \ |
33 | 48 |
recursive_compiler \ |
41 | 49 |
getpwnam_error \ |
43 | 50 |
xmlparser \ |
51
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
51 |
vector \ |
56 | 52 |
base10 \ |
53 |
files \ |
|
54 |
fork \ |
|
55 |
duff |
|
0 | 56 |
|
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
57 |
.SUFFIXES: .c .cc .asm |
0 | 58 |
|
59 |
.c.o: |
|
60 |
@echo Compiling $< ... |
|
61 |
@$(CC) -c $(CFLAGS) -o $@ $< |
|
62 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
63 |
.cc.o: |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
64 |
@echo Compiling $< ... |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
65 |
@$(CPP) -c $(CFLAGS) -o $@ $< |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
66 |
|
0 | 67 |
.asm.o: |
68 |
@echo Assembling $< ... |
|
69 |
@$(NASM) $< -o $@ |
|
70 |
||
71 |
all: $(TARGET) |
|
72 |
||
73 |
ncurses: ncurses.o |
|
74 |
@echo Linking $< ... |
|
75 |
@$(CC) $(CFLAGS) -lncursesw -o $@ $< |
|
76 |
||
77 |
numerierung: numerierung.o |
|
78 |
@echo Linking $< ... |
|
79 |
@$(CC) $(CFLAGS) -o $@ $< |
|
80 |
||
81 |
xdemo: xdemo.o |
|
82 |
@echo Linking $< ... |
|
83 |
@$(CC) $(CFLAGS) -lX11 -o $@ $< |
|
84 |
||
85 |
signals: signals.o |
|
86 |
@echo Linking $< ... |
|
87 |
@$(CC) $(CFLAGS) -o $@ $< |
|
88 |
||
89 |
tree: tree.o |
|
90 |
@echo Linking $< ... |
|
91 |
@$(CC) $(CFLAGS) -o $@ $< |
|
92 |
||
93 |
utf8: utf8.o |
|
94 |
@echo Linking $< ... |
|
95 |
@$(CC) $(CFLAGS) -o $@ $< |
|
96 |
||
97 |
file_demo: file_demo.o |
|
98 |
@echo Linking $< ... |
|
99 |
@$(CC) $(CFLAGS) -o $@ $< |
|
100 |
||
101 |
testcase: testcase.o |
|
102 |
@echo Linking $< ... |
|
103 |
@$(CC) $(CFLAGS) -o $@ $< |
|
104 |
||
105 |
atoi_print: atoi_print.o |
|
106 |
@echo Linking $< ... |
|
107 |
@$(CC) $(CFLAGS) -o $@ $< |
|
108 |
||
109 |
data_types: data_types.c |
|
39 | 110 |
@echo Compiling $< ... |
0 | 111 |
@$(CC) $(CFLAGS) -std=c99 -o $@ $< |
112 |
||
113 |
dnsresolve: dnsresolve.o |
|
114 |
@echo Linking $< ... |
|
115 |
@$(CC) $(CFLAGS) -o $@ $< |
|
116 |
||
117 |
nomalloc: nomalloc.o |
|
118 |
@echo Linking $< ... |
|
119 |
@$(CC) $(CFLAGS) -o $@ $< |
|
120 |
||
121 |
urandom: urandom.o |
|
122 |
@echo Linking $< ... |
|
123 |
@$(CC) $(CFLAGS) -o $@ $< |
|
124 |
||
125 |
threads: threads.o |
|
126 |
@echo Linking $< ... |
|
127 |
@$(CC) $(CFLAGS) -o $@ $< -lpthread |
|
128 |
||
129 |
crypt: crypt.o |
|
130 |
@echo Linking $< ... |
|
32 | 131 |
@$(CC) $(CFLAGS) -o $@ $< -lcrypt |
0 | 132 |
|
133 |
tokenpasting: tokenpasting.o |
|
134 |
@echo Linking $< ... |
|
135 |
@$(CC) $(CFLAGS) -o $@ $< |
|
136 |
||
137 |
hex2chars: hex2chars.o |
|
138 |
@echo Linking $< ... |
|
139 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
140 |
||
141 |
floating: floating.o |
|
142 |
@echo Linking $< ... |
|
143 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
144 |
||
145 |
max: max.o |
|
146 |
@echo Linking $< ... |
|
147 |
@$(CC) $(CFLAGS) -o $@ $< |
|
148 |
||
149 |
recording: recording.o |
|
150 |
@echo Linking $< ... |
|
151 |
@$(CC) $(CFLAGS) -o $@ $< |
|
152 |
||
153 |
endian: endian.o |
|
154 |
@echo Linking $< ... |
|
155 |
@$(CC) $(CFLAGS) -o $@ $< |
|
156 |
||
157 |
fak: fak.o |
|
158 |
@echo Linking $< ... |
|
159 |
@$(CC) $(CFLAGS) -o $@ $< |
|
160 |
||
161 |
blackhole: blackhole.c |
|
162 |
@echo Compiling AND Linking $< WITH -O0 ... |
|
163 |
@$(CC) $(CFLAGS) -O0 -o $@ $< |
|
164 |
||
165 |
folge: folge.o |
|
166 |
@echo Linking $< ... |
|
167 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
168 |
||
169 |
counter: counter.o |
|
170 |
@echo Linking $< ... |
|
171 |
@$(CC) $(CFLAGS) -o $@ $< |
|
172 |
||
173 |
sudoku: sudoku.o |
|
174 |
@echo Linking $< ... |
|
175 |
@$(CC) $(CFLAGS) -o $@ $< |
|
176 |
||
177 |
cunit: cunit.o |
|
178 |
@echo Linking $< ... |
|
179 |
@$(CC) $(CFLAGS) -o $@ $< -lcunit |
|
180 |
||
181 |
md5: md5.o |
|
182 |
@echo Linking $< ... |
|
45
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
183 |
@$(CC) -o $@ $< -lssl |
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
184 |
|
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
185 |
md5rec: md5rec.o |
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
186 |
@echo Linking $< ... |
0 | 187 |
@$(CC) -o $@ $< -llsf |
188 |
||
58
9609c54a54d3
myprintf.c added - replaces varargs.c
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
56
diff
changeset
|
189 |
myprintf: myprintf.o |
0 | 190 |
@echo Linking $< ... |
191 |
@$(CC) -o $@ $< |
|
192 |
||
193 |
concatenation: concatenation.o |
|
194 |
@echo Linking $< ... |
|
195 |
@$(CC) -o $@ $< |
|
196 |
||
197 |
alpha_beta: alpha_beta.o |
|
198 |
@echo Linking $< ... |
|
199 |
@$(CC) -o $@ $< |
|
200 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
201 |
life: life.o |
0 | 202 |
@echo Linking $< ... |
203 |
@$(CC) -o $@ $< |
|
204 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
205 |
bad_alloc: bad_alloc.o |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
206 |
@echo Linking $< ... |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
207 |
@$(CPP) -o $@ $< |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
208 |
|
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
209 |
lotto: lotto.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
210 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
211 |
@$(CPP) -o $@ $< |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
212 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
213 |
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
|
214 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
215 |
@$(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
|
216 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
217 |
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
|
218 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
219 |
@$(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
|
220 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
221 |
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
|
222 |
@echo Compiling $< ... |
96d16dfe787a
We use return EXIT_SUCCESS instead of return 0
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
3
diff
changeset
|
223 |
@$(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
|
224 |
@echo Linking $< ... |
8
96d16dfe787a
We use return EXIT_SUCCESS instead of return 0
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
3
diff
changeset
|
225 |
@$(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
|
226 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
227 |
gauss: gauss.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
228 |
@echo Linking $< ... |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
229 |
@$(CPP) -o $@ $< |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
230 |
|
10
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
231 |
connection: connection.o |
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
232 |
@echo Linking $< ... |
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
233 |
@$(CPP) -o $@ $< |
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
234 |
|
11
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
235 |
copy: copy.o |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
236 |
@echo Linking $< ... |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
237 |
@$(CPP) -o $@ $< |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
238 |
|
24
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
239 |
function_pointers: function_pointers.o |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
240 |
@echo Linking $< ... |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
241 |
@$(CC) -o $@ $< |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
242 |
|
25 | 243 |
sort: sort.o |
244 |
@echo Linking $< ... |
|
245 |
@$(CC) -o $@ $< |
|
246 |
||
26
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
247 |
min2time: min2time.o |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
248 |
@echo Linking $< ... |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
249 |
@$(CC) -o $@ $< |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
250 |
|
30
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
251 |
recursive_compiler: recursive_compiler.o |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
252 |
@echo Linking $< ... |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
253 |
@$(CC) -o $@ $< |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
254 |
|
33 | 255 |
getpwnam_error: getpwnam_error.o |
256 |
@echo Linking $< ... |
|
257 |
@$(CC) -o $@ $< |
|
258 |
||
41 | 259 |
xmlparser: xmlparser.o |
260 |
@echo Linking $< ... |
|
261 |
@$(CC) -o $@ $< -lexpat |
|
262 |
||
43 | 263 |
vector: vector.o |
264 |
@echo Linking $< ... |
|
265 |
@$(CPP) -o $@ $< |
|
266 |
||
51
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
267 |
base10: base10.o |
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
268 |
@echo Linking $< ... |
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
269 |
@$(CC) -lm -o $@ $< |
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
270 |
|
56 | 271 |
files: files.o |
272 |
@echo Linking $< ... |
|
273 |
@$(CC) -o $@ $< |
|
274 |
||
275 |
fork: fork.o |
|
276 |
@echo Linking $< ... |
|
277 |
@$(CC) -o $@ $< |
|
278 |
||
279 |
duff: duff.o |
|
280 |
@echo Linking $< ... |
|
281 |
@$(CC) -o $@ $< |
|
282 |
||
0 | 283 |
.PHONY: clean uninstall |
284 |
||
285 |
clean: |
|
286 |
rm -f *.o *~ |
|
287 |
rm -f $(TARGET) |
|
288 |