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