11.25Schristos#	$NetBSD: Makefile,v 1.25 2014/01/16 01:15:34 christos Exp $
21.1Such#
31.1Such
41.25Schristos.include <bsd.own.mk>
51.12Slukem
61.9StvPROJECT_DIRS=	hpcboot libz libsa
71.1Such
81.13SjmcUUDECODE_FILES= binary/ARM/hpcboot.exe \
91.13Sjmc		binary/SH3/hpcboot.exe \
101.13Sjmc		binary/MIPS/hpcboot.exe \
111.13Sjmc		binary/SH4/hpcboot.exe
121.1Such
131.1Such#
141.18Suwe# Generate project/work files for
151.18Suwe# "eMbedded Visual C++ 3.0"
161.1Such#
171.6Suchevc3:
181.19Suwe	cd dspgen && ${MAKE} evc3 || exit 1
191.1Such	for d in ${PROJECT_DIRS}; do					\
201.23Suwe		${HOST_SH} dspgen/config.sh evc3 $$d || exit 1;		\
211.1Such	done
221.12Slukem	${HOST_SH} dspgen/gen_workspace.sh evc3 hpc_stand.vcw $(PROJECT_DIRS)
231.19Suwe	cd dspgen && ${MAKE} clean
241.18Suwe
251.1Such#
261.18Suwe# Generate project/work files for
271.22Srafal# "eMbedded Visual C++ 4.0"
281.22Srafal# (WCE300 binaries for SH3, SH4, ARMV4)
291.22Srafal#
301.22Srafalevc4:
311.22Srafal	cd dspgen && ${MAKE} evc4 || exit 1
321.22Srafal	for d in ${PROJECT_DIRS}; do					\
331.23Suwe		${HOST_SH} dspgen/config.sh evc4 $$d || exit 1;		\
341.22Srafal	done
351.22Srafal	${HOST_SH} dspgen/gen_workspace.sh evc4 hpc_stand.vcw $(PROJECT_DIRS)
361.22Srafal	cd dspgen && ${MAKE} clean
371.22Srafal
381.22Srafal#
391.22Srafal#
401.22Srafal# Generate project/work files for
411.18Suwe# "Windows CE Toolkit for Visual C++ 6.0"
421.1Such#
431.6Suchvc6:
441.19Suwe	cd dspgen && ${MAKE} vc6 || exit 1
451.1Such	for d in ${PROJECT_DIRS}; do					\
461.23Suwe		${HOST_SH} dspgen/config.sh vc6 $$d || exit 1;		\
471.1Such	done
481.19Suwe	cd dspgen && ${MAKE} clean
491.12Slukem	${HOST_SH} dspgen/gen_workspace.sh vc6 hpc_stand.dsw $(PROJECT_DIRS)
501.1Such
511.3Such#
521.19Suwe# Generate project/work files for
531.18Suwe# "Windows CE Embedded Toolkit for Visual C++ 5.0"
541.3Such# (WCE100/101/200 binary for MIPS, SH3)
551.3Such#
561.6Suchvc5:
571.19Suwe	cd dspgen && ${MAKE} vc5 || exit 1
581.3Such	for d in ${PROJECT_DIRS}; do					\
591.23Suwe		${HOST_SH} dspgen/config.sh vc5 $$d || exit 1;		\
601.3Such	done
611.19Suwe	cd dspgen && ${MAKE} clean
621.12Slukem	${HOST_SH} dspgen/gen_workspace.sh vc5 hpc_stand.dsw $(PROJECT_DIRS)
631.3Such
641.1Suchclean:
651.5Such	rm -f hpcboot/opt_spec_platform.h
661.3Such# evc3 temporary files
671.1Such	rm -f hpc_stand.vcb hpc_stand.vcw hpc_stand.vco
681.21Suwe	rm -f hpcboot/HPCBOOT.vcb hpcboot/HPCBOOT.VCW hpcboot/HPCBOOT.VCO
691.19Suwe	find . -name "*.vcp" -print | xargs rm -f
701.21Suwe	find . -name "*.vcl" -print | xargs rm -f
711.21Suwe	find . -name "*.vcn" -print | xargs rm -f
721.21Suwe	find . -name "*.dep" -print | xargs rm -f
731.17Suwe	rm -f hpcboot/res/hpcmenu.aps
741.3Such# vc6 temporary files
751.19Suwe	find . -name "*.dsp" -print | xargs rm -f
761.1Such	rm -f hpc_stand.dsw hpc_stand.ncb hpc_stand.opt
771.1Such	rm -f hpcboot/hpcboot.plg
781.3Such# compile directory
791.22Srafal	-rm -rf compile/ARM*Debug compile/ARM*Release			\
801.19Suwe		compile/SH*Debug compile/SH*Release			\
811.19Suwe		compile/MIPSDebug compile/MIPSRelease
821.19Suwe	find . -name "hpcboot.exe" -print | xargs rm -f
831.1Such
841.1Suchdistclean: clean
851.19Suwe	find binary -name "hpcboot*.exe*" -print | xargs rm -f
861.1Such
871.3Such# WCE210 or later binary
881.1Suchinstall:
891.10Such	for a in SH3 SH4 ARM MIPS; do					\
901.1Such		file=`echo "compile/"$$a"Release/hpcboot.exe"`;		\
911.1Such		cp $$file binary/$$a/hpcboot.exe;			\
921.1Such	done
931.3Such# WCE200 or earlier binary
941.16Suchinstall200:
951.16Such	cp compile/SHRelease/hpcboot.exe binary/SH3/hpcboot200.exe
961.16Such
971.16Suchinstall101:
981.16Such	cp compile/MIPSRelease/hpcboot.exe binary/MIPS/hpcboot101.exe
991.3Such
1001.1Suchuuencode:
1011.3Such	find binary -name "hpcboot*.exe" -print | \
1021.24Sapb	${TOOL_AWK} '{ print "uuencode", $$1, $$1, ">", $$1".uue ; rm -f", $$1 }' \
1031.12Slukem	    | ${HOST_SH}
1041.8Such	cp binary/build_number.h build_number.h
1051.24Sapb	${TOOL_AWK} '{if (/HPCBOOT_BUILD_NUMBER/)			\
1061.8Such		{ i = $$3 + 1;						\
1071.8Such			printf("#define HPCBOOT_BUILD_NUMBER	%d\n", i);\
1081.8Such		} else {						\
1091.8Such			printf("%s\n", $$0);				\
1101.8Such		}}' build_number.h > binary/build_number.h
1111.8Such	rm -f build_number.h
1121.13Sjmc
1131.13Sjmc.include <bsd.files.mk>
114