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