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