comparison Makefile @ 8:23c546c01f17

fix clean target, add it_production (now default) and it_debug targets
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 29 Jan 2025 18:46:57 +0000
parents a5ac7c5c6917
children 79b6f035cd96
comparison
equal deleted inserted replaced
7:795a604776d9 8:23c546c01f17
1 # Don't edit Makefile! Use conf-* for configuration. 1 # Don't edit Makefile! Use conf-* for configuration.
2 2
3 SHELL=/bin/sh 3 SHELL=/bin/sh
4 4
5 default: it 5 default: it_production
6 6
7 alloc.a: \ 7 alloc.a: \
8 makelib alloc.o 8 makelib alloc.o
9 ./makelib alloc.a alloc.o 9 ./makelib alloc.a alloc.o
10 10
163 check: \ 163 check: \
164 it instcheck 164 it instcheck
165 ./instcheck 165 ./instcheck
166 166
167 clean: 167 clean:
168 rm *.o *.a 168 rm -f *.o *.a
169 rm cdbget cdbmake cdbdump cdbstats cdbtest cdbmake-12 cdbmake-sv rts testzero 169 rm -f cdbget cdbmake cdbdump cdbstats cdbtest cdbmake-12 cdbmake-sv rts testzero
170 rm -rf rts-tmp 170 rm -rf rts-tmp
171 rm auto-str install instcheck compile makelib systype 171 rm -f auto-str install instcheck compile makelib systype
172 rm conf-home conf-cc conf-ld load 172 rm -f conf-home conf-cc conf-ld load
173 rm auto_home.c uint32.h 173 rm -f auto_home.c uint32.h
174 compile: \ 174 compile: \
175 warn-auto.sh conf-cc 175 warn-auto.sh conf-cc
176 ( cat warn-auto.sh; \ 176 ( cat warn-auto.sh; \
177 echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \ 177 echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
178 ) > compile 178 ) > compile
179 chmod 755 compile 179 chmod 755 compile
180 180
181 debug:
182 sed "1s@FIXME@$HOME@" conf-home.ac > conf-home
183 sed '1s/CFLAGS/-O -dgdb/' conf-cc.ac > conf-cc
184 sed '1s/LDFLAGS//' conf-ld.ac > conf-ld
185 chmod +x conf-??
186
181 error.o: \ 187 error.o: \
182 compile error.c error.h 188 compile error.c error.h
183 ./compile error.c 189 ./compile error.c
184 190
185 error_str.o: \ 191 error_str.o: \
208 214
209 instcheck.o: \ 215 instcheck.o: \
210 compile instcheck.c strerr.h error.h readwrite.h exit.h 216 compile instcheck.c strerr.h error.h readwrite.h exit.h
211 ./compile instcheck.c 217 ./compile instcheck.c
212 218
213 it: \ 219 it_production: \
214 prog install instcheck 220 production prog install instcheck
221
222 it_debug: \
223 debug prog install instcheck
215 224
216 load: \ 225 load: \
217 warn-auto.sh conf-ld 226 warn-auto.sh conf-ld
218 ( cat warn-auto.sh; \ 227 ( cat warn-auto.sh; \
219 echo 'main="$$1"; shift'; \ 228 echo 'main="$$1"; shift'; \
247 256
248 open_trunc.o: \ 257 open_trunc.o: \
249 compile open_trunc.c open.h 258 compile open_trunc.c open.h
250 ./compile open_trunc.c 259 ./compile open_trunc.c
251 260
261 production:
262 sed "1s@FIXME@$HOME@" conf-home.ac > conf-home
263 sed '1s/CFLAGS/-O2/' conf-cc.ac > conf-cc
264 sed '1s/LDFLAGS/-s/' conf-ld.ac > conf-ld
265 chmod +x conf-??
266
252 prog: \ 267 prog: \
253 cdbget cdbmake cdbdump cdbstats cdbtest cdbmake-12 cdbmake-sv rts \ 268 cdbget cdbmake cdbdump cdbstats cdbtest cdbmake-12 cdbmake-sv rts \
254 testzero 269 testzero
255 270
256 # run tests 271 # run tests