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