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