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