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