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