1 # $NetBSD: Makefile,v 1.10 2005/12/11 12:17:34 christos Exp $ 2 # 3 # Makefile to generate windows VC++ project and workspace files from 4 # config files and templates 5 6 .include <bsd.sys.mk> # for HOST_SH 7 8 PROJECT_DIRS=libsa pbsdboot libz 9 10 all: winfiles optfiles rom-boot 11 12 winfiles: 13 for name in $(PROJECT_DIRS); do \ 14 ${HOST_SH} dspgen/config.sh vc6 $$name; \ 15 ${HOST_SH} dspgen/config.sh evc3 $$name; \ 16 done 17 ${HOST_SH} dspgen/gen_workspace.sh vc6 hpcmips_stand.dsw $(PROJECT_DIRS) 18 ${HOST_SH} dspgen/gen_workspace.sh evc3 hpcmips_stand.vcw $(PROJECT_DIRS) 19 20 optfiles: 21 echo "/* option \`SPEC_PLATFORM' not defined */" \ 22 > pbsdboot/opt_spec_platform.h 23 24 # remote transient build-related files globally and for each project: 25 # * global 'class view' information (.ncb) 26 # * Debug and Release compile dirs, 27 # * .plg files (build logs), and 28 # * .[0-9][0-9][0-9] files (old versions of auto-converted .dsp files). 29 30 rom-boot: 31 (cd romboot; make) 32 33 clean: 34 rm -f hpcmips_stand.ncb 35 -for dir in $(PROJECT_DIRS); do \ 36 (cd $$dir && rm -rf WMIPSDbg wmipsdbg WMIPSRel wmipsrel); \ 37 (cd $$dir && rm -f $$dir.plg $$dir.vcl $$dir.[0-9][0-9][0-9]); \ 38 (cd $$dir && rm -f $$dir.ncb $$dir.opt); \ 39 done 40 rm -f pbsdboot/opt_spec_platform.h 41 (cd romboot; make clean) 42 43 # remove all files which windows is likely to have created, in addition 44 # to transient build-related files: 45 # * .opt workspace option file 46 # * (probably automatic) updates to the .dsp and .dsw files, 47 # which should be identical to the auto-generated versions when 48 # clean. 49 50 distclean cleandir: clean winfiles 51 rm -f hpcmips_stand.opt 52 rm -f hpcmips_stand.vcw 53 rm -f hpcmips_stand.vco 54 rm -f hpcmips_stand.vcb 55 for dir in $(PROJECT_DIRS); do \ 56 (cd $$dir && rm -f $$dir.vcp); \ 57 done 58