author | Markus Bröker <mbroeker@largo.dyndns.tv> |
Thu, 16 Apr 2009 13:57:47 +0200 | |
changeset 87 | b2f1756c17ca |
parent 86 | 86b83a979d9e |
child 88 | 91fbc3ea240b |
permissions | -rw-r--r-- |
70
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
1 |
CC = gcc -g -ggdb $(PROF) |
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
2 |
CPP = g++ -g -ggdb $(PROF) |
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
3 |
CFLAGS = -Wall -O2 -Iinclude -ansi |
71
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
4 |
RM = rm -f |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
5 |
FIND = find |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
6 |
|
73
d0578510aea1
Changelog: Makefile and sort.c
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
71
diff
changeset
|
7 |
ifeq ("$(PROFILER)", "linux") |
70
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
8 |
PROF = -fprofile-arcs -ftest-coverage -pg |
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
9 |
endif |
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
10 |
|
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
11 |
TARGET = ncurses |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
12 |
TARGET += numerierung |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
13 |
TARGET += xdemo |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
14 |
TARGET += signals |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
15 |
TARGET += tree |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
16 |
TARGET += utf8 |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
17 |
TARGET += file_demo |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
18 |
TARGET += testcase |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
19 |
TARGET += atoi_print |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
20 |
TARGET += data_types |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
21 |
TARGET += dnsresolve |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
22 |
TARGET += nomalloc |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
23 |
TARGET += urandom |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
24 |
TARGET += threads |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
25 |
TARGET += crypt |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
26 |
TARGET += tokenpasting |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
27 |
TARGET += hex2chars |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
28 |
TARGET += floating |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
29 |
TARGET += max |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
30 |
TARGET += recording |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
31 |
TARGET += endian |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
32 |
TARGET += fak |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
33 |
TARGET += blackhole |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
34 |
TARGET += folge |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
35 |
TARGET += counter |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
36 |
TARGET += sudoku |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
37 |
TARGET += cunit |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
38 |
TARGET += md5 |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
39 |
TARGET += md5rec |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
40 |
TARGET += myprintf |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
41 |
TARGET += concatenation |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
42 |
TARGET += alpha_beta |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
43 |
TARGET += life |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
44 |
TARGET += bad_alloc |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
45 |
TARGET += lotto |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
46 |
TARGET += database |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
47 |
TARGET += gauss |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
48 |
TARGET += mem2swap |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
49 |
TARGET += prog_limit |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
50 |
TARGET += connection |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
51 |
TARGET += copy |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
52 |
TARGET += function_pointers |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
53 |
TARGET += sort |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
54 |
TARGET += min2time |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
55 |
TARGET += recursive_compiler |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
56 |
TARGET += getpwnam_error |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
57 |
TARGET += xmlparser |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
58 |
TARGET += vector |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
59 |
TARGET += base10 |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
60 |
TARGET += files |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
61 |
TARGET += fork |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
62 |
TARGET += duff |
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
63 |
TARGET += unicode |
67
abe63a276a36
file traversal demo && minor changes
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
66
diff
changeset
|
64 |
TARGET += fts |
74
829976007e62
getrandom macro fixed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
73
diff
changeset
|
65 |
TARGET += clplaner |
76
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
66 |
TARGET += daemon |
86
86b83a979d9e
numbering game: guess a value
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
76
diff
changeset
|
67 |
TARGET += numbers |
0 | 68 |
|
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
69 |
.SUFFIXES: .c .cc .asm |
0 | 70 |
|
71 |
.c.o: |
|
72 |
@echo Compiling $< ... |
|
73 |
@$(CC) -c $(CFLAGS) -o $@ $< |
|
74 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
75 |
.cc.o: |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
76 |
@echo Compiling $< ... |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
77 |
@$(CPP) -c $(CFLAGS) -o $@ $< |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
78 |
|
0 | 79 |
.asm.o: |
80 |
@echo Assembling $< ... |
|
81 |
@$(NASM) $< -o $@ |
|
82 |
||
83 |
all: $(TARGET) |
|
84 |
||
85 |
ncurses: ncurses.o |
|
86 |
@echo Linking $< ... |
|
87 |
@$(CC) $(CFLAGS) -lncursesw -o $@ $< |
|
88 |
||
89 |
numerierung: numerierung.o |
|
90 |
@echo Linking $< ... |
|
91 |
@$(CC) $(CFLAGS) -o $@ $< |
|
92 |
||
93 |
xdemo: xdemo.o |
|
94 |
@echo Linking $< ... |
|
95 |
@$(CC) $(CFLAGS) -lX11 -o $@ $< |
|
96 |
||
97 |
signals: signals.o |
|
98 |
@echo Linking $< ... |
|
99 |
@$(CC) $(CFLAGS) -o $@ $< |
|
100 |
||
101 |
tree: tree.o |
|
102 |
@echo Linking $< ... |
|
103 |
@$(CC) $(CFLAGS) -o $@ $< |
|
104 |
||
105 |
utf8: utf8.o |
|
106 |
@echo Linking $< ... |
|
107 |
@$(CC) $(CFLAGS) -o $@ $< |
|
108 |
||
109 |
file_demo: file_demo.o |
|
110 |
@echo Linking $< ... |
|
111 |
@$(CC) $(CFLAGS) -o $@ $< |
|
112 |
||
113 |
testcase: testcase.o |
|
114 |
@echo Linking $< ... |
|
115 |
@$(CC) $(CFLAGS) -o $@ $< |
|
116 |
||
117 |
atoi_print: atoi_print.o |
|
118 |
@echo Linking $< ... |
|
119 |
@$(CC) $(CFLAGS) -o $@ $< |
|
120 |
||
121 |
data_types: data_types.c |
|
39 | 122 |
@echo Compiling $< ... |
0 | 123 |
@$(CC) $(CFLAGS) -std=c99 -o $@ $< |
124 |
||
125 |
dnsresolve: dnsresolve.o |
|
126 |
@echo Linking $< ... |
|
127 |
@$(CC) $(CFLAGS) -o $@ $< |
|
128 |
||
129 |
nomalloc: nomalloc.o |
|
130 |
@echo Linking $< ... |
|
131 |
@$(CC) $(CFLAGS) -o $@ $< |
|
132 |
||
133 |
urandom: urandom.o |
|
134 |
@echo Linking $< ... |
|
135 |
@$(CC) $(CFLAGS) -o $@ $< |
|
136 |
||
137 |
threads: threads.o |
|
138 |
@echo Linking $< ... |
|
139 |
@$(CC) $(CFLAGS) -o $@ $< -lpthread |
|
140 |
||
141 |
crypt: crypt.o |
|
142 |
@echo Linking $< ... |
|
32 | 143 |
@$(CC) $(CFLAGS) -o $@ $< -lcrypt |
0 | 144 |
|
145 |
tokenpasting: tokenpasting.o |
|
146 |
@echo Linking $< ... |
|
147 |
@$(CC) $(CFLAGS) -o $@ $< |
|
148 |
||
149 |
hex2chars: hex2chars.o |
|
150 |
@echo Linking $< ... |
|
151 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
152 |
||
153 |
floating: floating.o |
|
154 |
@echo Linking $< ... |
|
155 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
156 |
||
157 |
max: max.o |
|
158 |
@echo Linking $< ... |
|
159 |
@$(CC) $(CFLAGS) -o $@ $< |
|
160 |
||
161 |
recording: recording.o |
|
162 |
@echo Linking $< ... |
|
163 |
@$(CC) $(CFLAGS) -o $@ $< |
|
164 |
||
165 |
endian: endian.o |
|
166 |
@echo Linking $< ... |
|
167 |
@$(CC) $(CFLAGS) -o $@ $< |
|
168 |
||
169 |
fak: fak.o |
|
170 |
@echo Linking $< ... |
|
171 |
@$(CC) $(CFLAGS) -o $@ $< |
|
172 |
||
173 |
blackhole: blackhole.c |
|
174 |
@echo Compiling AND Linking $< WITH -O0 ... |
|
175 |
@$(CC) $(CFLAGS) -O0 -o $@ $< |
|
176 |
||
177 |
folge: folge.o |
|
178 |
@echo Linking $< ... |
|
179 |
@$(CC) $(CFLAGS) -o $@ $< -lm |
|
180 |
||
181 |
counter: counter.o |
|
182 |
@echo Linking $< ... |
|
183 |
@$(CC) $(CFLAGS) -o $@ $< |
|
184 |
||
185 |
sudoku: sudoku.o |
|
186 |
@echo Linking $< ... |
|
187 |
@$(CC) $(CFLAGS) -o $@ $< |
|
188 |
||
189 |
cunit: cunit.o |
|
190 |
@echo Linking $< ... |
|
191 |
@$(CC) $(CFLAGS) -o $@ $< -lcunit |
|
192 |
||
193 |
md5: md5.o |
|
194 |
@echo Linking $< ... |
|
45
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
195 |
@$(CC) -o $@ $< -lssl |
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
196 |
|
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
197 |
md5rec: md5rec.o |
7197576fedcf
pmc: namespace algebra for vector
Emilio Largo <largo@largo.homelinux.org>
parents:
43
diff
changeset
|
198 |
@echo Linking $< ... |
0 | 199 |
@$(CC) -o $@ $< -llsf |
200 |
||
58
9609c54a54d3
myprintf.c added - replaces varargs.c
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
56
diff
changeset
|
201 |
myprintf: myprintf.o |
0 | 202 |
@echo Linking $< ... |
203 |
@$(CC) -o $@ $< |
|
204 |
||
205 |
concatenation: concatenation.o |
|
206 |
@echo Linking $< ... |
|
207 |
@$(CC) -o $@ $< |
|
208 |
||
209 |
alpha_beta: alpha_beta.o |
|
210 |
@echo Linking $< ... |
|
211 |
@$(CC) -o $@ $< |
|
212 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
213 |
life: life.o |
0 | 214 |
@echo Linking $< ... |
215 |
@$(CC) -o $@ $< |
|
216 |
||
2
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
217 |
bad_alloc: bad_alloc.o |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
218 |
@echo Linking $< ... |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
219 |
@$(CPP) -o $@ $< |
97beb75e5ac7
bad alloc example added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
0
diff
changeset
|
220 |
|
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
221 |
lotto: lotto.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
222 |
@echo Linking $< ... |
70
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
223 |
@$(CC) -o $@ $< |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
224 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
225 |
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
|
226 |
@echo Linking $< ... |
70
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
227 |
@$(CC) -o $@ mem2swap.o set_limit.o |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
228 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
229 |
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
|
230 |
@echo Linking $< ... |
70
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
231 |
@$(CC) -o $@ prog_limit.o set_limit.o |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
232 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
233 |
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
|
234 |
@echo Compiling $< ... |
96d16dfe787a
We use return EXIT_SUCCESS instead of return 0
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
3
diff
changeset
|
235 |
@$(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
|
236 |
@echo Linking $< ... |
8
96d16dfe787a
We use return EXIT_SUCCESS instead of return 0
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
3
diff
changeset
|
237 |
@$(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
|
238 |
|
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
239 |
gauss: gauss.o |
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
240 |
@echo Linking $< ... |
70
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
241 |
@$(CC) -o $@ $< |
3
820ed7fb9314
database, gauss, lotto, mem2swap, prog_limit moved to demos
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
2
diff
changeset
|
242 |
|
10
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
243 |
connection: connection.o |
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
244 |
@echo Linking $< ... |
70
ded389a5dc2a
Profiling support added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
67
diff
changeset
|
245 |
@$(CC) -o $@ $< |
10
f19f44e2e863
a nice connection demo from an irc user
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
8
diff
changeset
|
246 |
|
11
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
247 |
copy: copy.o |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
248 |
@echo Linking $< ... |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
249 |
@$(CPP) -o $@ $< |
0a8be4eac87e
c++ file copy demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
10
diff
changeset
|
250 |
|
24
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
251 |
function_pointers: function_pointers.o |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
252 |
@echo Linking $< ... |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
253 |
@$(CC) -o $@ $< |
9cdad6c45b47
function pointer demo added
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
11
diff
changeset
|
254 |
|
25 | 255 |
sort: sort.o |
256 |
@echo Linking $< ... |
|
257 |
@$(CC) -o $@ $< |
|
258 |
||
26
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
259 |
min2time: min2time.o |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
260 |
@echo Linking $< ... |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
261 |
@$(CC) -o $@ $< |
d227047a3e88
convert minutes to timestamps
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
25
diff
changeset
|
262 |
|
30
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
263 |
recursive_compiler: recursive_compiler.o |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
264 |
@echo Linking $< ... |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
265 |
@$(CC) -o $@ $< |
d037c433ec3e
kleiner auffschrischungskurs compilerbau...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
26
diff
changeset
|
266 |
|
33 | 267 |
getpwnam_error: getpwnam_error.o |
268 |
@echo Linking $< ... |
|
269 |
@$(CC) -o $@ $< |
|
270 |
||
41 | 271 |
xmlparser: xmlparser.o |
272 |
@echo Linking $< ... |
|
273 |
@$(CC) -o $@ $< -lexpat |
|
274 |
||
43 | 275 |
vector: vector.o |
276 |
@echo Linking $< ... |
|
277 |
@$(CPP) -o $@ $< |
|
278 |
||
51
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
279 |
base10: base10.o |
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
280 |
@echo Linking $< ... |
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
281 |
@$(CC) -lm -o $@ $< |
a03372ef9714
base10.c added and set_limit changed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
45
diff
changeset
|
282 |
|
56 | 283 |
files: files.o |
284 |
@echo Linking $< ... |
|
285 |
@$(CC) -o $@ $< |
|
286 |
||
287 |
fork: fork.o |
|
288 |
@echo Linking $< ... |
|
289 |
@$(CC) -o $@ $< |
|
290 |
||
291 |
duff: duff.o |
|
292 |
@echo Linking $< ... |
|
293 |
@$(CC) -o $@ $< |
|
294 |
||
62
b7061c0e239f
unicode.c added and myprintf improved
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
58
diff
changeset
|
295 |
unicode: unicode.c |
76
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
296 |
@echo Linking $<... |
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
297 |
@$(CC) $(CFLAGS) -std=c99 -o $@ $< |
62
b7061c0e239f
unicode.c added and myprintf improved
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
58
diff
changeset
|
298 |
|
67
abe63a276a36
file traversal demo && minor changes
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
66
diff
changeset
|
299 |
fts: fts.c |
abe63a276a36
file traversal demo && minor changes
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
66
diff
changeset
|
300 |
@echo Linking $< ... |
76
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
301 |
@$(CC) -Wall -O2 $< -o $@ |
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
302 |
|
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
303 |
clplaner: clplaner.o |
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
304 |
@echo Linking $<... |
67
abe63a276a36
file traversal demo && minor changes
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
66
diff
changeset
|
305 |
@$(CC) -o $@ $< |
abe63a276a36
file traversal demo && minor changes
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
66
diff
changeset
|
306 |
|
76
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
307 |
daemon: daemon.c |
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
308 |
@echo Linking $<... |
c46968bddef5
A nice system daemon...
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
74
diff
changeset
|
309 |
@$(CC) -Wall -O2 -g -ggdb $< -o $@ |
74
829976007e62
getrandom macro fixed
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
73
diff
changeset
|
310 |
|
86
86b83a979d9e
numbering game: guess a value
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
76
diff
changeset
|
311 |
numbers: numbers.o |
86b83a979d9e
numbering game: guess a value
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
76
diff
changeset
|
312 |
@echo Linking $<... |
86b83a979d9e
numbering game: guess a value
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
76
diff
changeset
|
313 |
@$(CC) -Wall -O2 -g -ggdb $< -o $@ |
86b83a979d9e
numbering game: guess a value
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
76
diff
changeset
|
314 |
|
66
2b4f786d9073
Common Makefile Style NAME += OBJECT
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
64
diff
changeset
|
315 |
.PHONY: beauty clean uninstall |
0 | 316 |
|
317 |
clean: |
|
71
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
318 |
ifdef FIND |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
319 |
$(FIND) -name '*~' -exec $(RM) {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
320 |
$(FIND) -name '*.[oa]' -exec $(RM) {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
321 |
$(FIND) -name '*.gcov' -exec $(RM) {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
322 |
$(FIND) -name '*.gcda' -exec $(RM) {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
323 |
$(FIND) -name '*.gcno' -exec $(RM) {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
324 |
$(FIND) -name 'gmon.out' -exec $(RM) {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
325 |
endif |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
326 |
$(RM) $(TARGET) |
0 | 327 |
|
64
993b97c4ad2d
FORK ERROR in prog_limit and mem2swap:
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
62
diff
changeset
|
328 |
beauty: |
71
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
329 |
ifdef FIND |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
330 |
$(FIND) -name '*.[ch]' -exec indent {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
331 |
$(FIND) -name '*.[ch]' -exec eraser {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
332 |
$(FIND) -name 'Makefile*' -exec eraser {} \; |
9ac5a589211e
Makefile: Little Improvements
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
70
diff
changeset
|
333 |
endif |
64
993b97c4ad2d
FORK ERROR in prog_limit and mem2swap:
Markus Bröker <mbroeker@largo.dyndns.tv>
parents:
62
diff
changeset
|
334 |
@make clean |