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