Makefile revision 1.17
1#	$NetBSD: Makefile,v 1.17 2005/05/11 15:00:49 uwe Exp $
2#
3
4.include <bsd.sys.mk>		# for HOST_SH
5
6PROJECT_DIRS=	hpcboot libz libsa
7
8UUDECODE_FILES= binary/ARM/hpcboot.exe \
9		binary/SH3/hpcboot.exe \
10		binary/MIPS/hpcboot.exe \
11		binary/SH4/hpcboot.exe
12
13#
14# generates project/work files for Embeded Visual C++ 3.0
15#
16evc3:
17	cd dspgen && ${MAKE} evc3 || exit 1;
18	for d in ${PROJECT_DIRS}; do					\
19		${HOST_SH} dspgen/config.sh evc3 $$d;			\
20	done
21	${HOST_SH} dspgen/gen_workspace.sh evc3 hpc_stand.vcw $(PROJECT_DIRS)
22	cd dspgen && ${MAKE} clean;
23#
24# generates project/work files for Visual C++ 6.0 + Windows CE tool kit.
25#
26vc6:
27	cd dspgen && ${MAKE} vc6 || exit 1;
28	for d in ${PROJECT_DIRS}; do					\
29		${HOST_SH} dspgen/config.sh vc6 $$d;			\
30	done
31	cd dspgen && ${MAKE} clean;
32	${HOST_SH} dspgen/gen_workspace.sh vc6 hpc_stand.dsw $(PROJECT_DIRS)
33
34#
35# generates project/work files for Visual C++ 5.0 Windows CE Embeded tool kit.
36# (WCE100/101/200 binary for MIPS, SH3)
37#
38vc5:
39	cd dspgen && ${MAKE} vc5 || exit 1;
40	for d in ${PROJECT_DIRS}; do					\
41		${HOST_SH} dspgen/config.sh vc5 $$d;			\
42	done
43	cd dspgen && ${MAKE} clean;
44	${HOST_SH} dspgen/gen_workspace.sh vc5 hpc_stand.dsw $(PROJECT_DIRS)
45
46clean:
47	rm -f hpcboot/opt_spec_platform.h
48# evc3 temporary files
49	rm -f hpc_stand.vcb hpc_stand.vcw hpc_stand.vco
50	find . -name "*.vcp" -print |xargs rm -f
51	rm -f hpcboot/hpcboot.vcl hpcboot/HPCBOOT.VCO hpcboot/HPCBOOT.VCW
52	rm -f hpcboot/HPCBOOT.vcb
53	rm -f hpcboot/res/hpcmenu.aps
54	rm -f libsa/libsa.vcl libz/libz.vcl
55# vc6 temporary files
56	find . -name "*.dsp" -print |xargs rm -f
57	rm -f hpc_stand.dsw hpc_stand.ncb hpc_stand.opt
58	rm -f hpcboot/hpcboot.plg
59# compile directory
60	-rm -rf compile/ARMDebug compile/ARMRelease			\
61	compile/SH*Debug compile/SH*Release				\
62	compile/MIPSDebug compile/MIPSRelease
63	find . -name "hpcboot.exe" -print |xargs rm -f
64
65distclean: clean
66	find binary -name "hpcboot*.exe*" -print | xargs rm -f;
67
68# WCE210 or later binary
69install:
70	for a in SH3 SH4 ARM MIPS; do					\
71		file=`echo "compile/"$$a"Release/hpcboot.exe"`;		\
72		cp $$file binary/$$a/hpcboot.exe;			\
73	done
74# WCE200 or earlier binary
75install200:
76	cp compile/SHRelease/hpcboot.exe binary/SH3/hpcboot200.exe
77
78install101:
79	cp compile/MIPSRelease/hpcboot.exe binary/MIPS/hpcboot101.exe
80
81uuencode:
82	find binary -name "hpcboot*.exe" -print | \
83	awk '{ print "uuencode", $$1, $$1, ">", $$1".uue ; rm -f", $$1 }' \
84	    | ${HOST_SH}
85	cp binary/build_number.h build_number.h
86	awk '{if (/HPCBOOT_BUILD_NUMBER/)				\
87		{ i = $$3 + 1;						\
88			printf("#define HPCBOOT_BUILD_NUMBER	%d\n", i);\
89		} else {						\
90			printf("%s\n", $$0);				\
91		}}' build_number.h > binary/build_number.h
92	rm -f build_number.h
93
94.include <bsd.files.mk>
95