1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #!/usr/bin/make -f
- # file: plc-utils/Makefile
- # Published 2010 by Qualcomm Atheros;
- # ====================================================================
- # target platform symbols;
- # --------------------------------------------------------------------
- include make.def
- # ====================================================================
- # package symbols;
- # --------------------------------------------------------------------
- ARCHIVE=$(shell basename "${CURDIR}")
- PACKAGE=$(shell basename "${CURDIR}")
- LIBRARY=${FTP}/toolkit/${PACKAGE}
- FOLDERS=mdio plc programs tools ether serial mme ram nvm pib key nodes nda VisualStudioNET
- EXCLUDE=--exclude=.git --exclude=.#* --exclude=*.[0-9][0-9][0-9]
- # ====================================================================
- # installation targets;
- # --------------------------------------------------------------------
- .PHONY: all compile compact scripts manuals install uninstall clean check ignore
- all compile compact scripts manuals install uninstall clean check ignore:
- ifeq ($(shell expr $(LOCALCCVER) \<= $(LASTSUPPORTEDGCCVER)), 1)
- @for folder in ${FOLDERS}; do ${MAKE} -C $${folder} ${@} || exit 1; done
- else
- echo "gcc compiler version supported till 10.2.1, local gcc version:" $(shell gcc -dumpversion)
- endif
- # ====================================================================
- # release targets;
- # --------------------------------------------------------------------
- .PHONY: package library prepare cleanse
- debian: clean
- dpkg-buildpackage -rfakeroot -uc -us
- debian-setup:
- apt-get install dpkg-dev debhelper devscripts fakeroot linda
- # apt-get install dpkg dpkg-dev debhelper dh-make devscripts quilt
- package: archive prepare library
- prepare:
- rm -fr t.* install.* *.err *.log *.log *.tlog
- rm -fr */t.* */install.* */*.err */*.log */*.o */*.[0-9][0-9][0-9]
- # chmod -fR ${MAN_PERM} */*.c */*.h */*.txt */*.mak */*.xsd */*.xsl */*.xml */*.css */*.html */*.png
- # chmod -fR ${BIN_PERM} */Makefile */*.sh
- # chown -fR root:root *
- library:
- install -m ${DIR_PERM} -o ${OWNER} -g ${STAFF} -d ${LIBRARY}
- install -m ${DIR_PERM} -o ${OWNER} -g ${STAFF} -d ${LIBRARY}/Programs
- install -m ${DIR_PERM} -o ${OWNER} -g ${STAFF} -d ${LIBRARY}/Documents
- install -m ${BIN_PERM} -o ${OWNER} -g ${STAFF} VisualStudioNET/*.msi ${LIBRARY}
- install -m ${BIN_PERM} -o ${OWNER} -g ${STAFF} ../${ARCHIVE}.tar.* ${LIBRARY}
- cp -r VisualStudioNET/Programs/* ${LIBRARY}/Programs
- cp -r docbook/* ${LIBRARY}/Documents
- ${CRLF} < CHANGES > ${LIBRARY}/_CHANGES.txt
- ${CRLF} < README > ${LIBRARY}/_README.txt
- ${CRLF} < LICENSE > ${LIBRARY}/_LICENSE.txt
- ${CRLF} < NOTICES > ${LIBRARY}/_NOTICES.txt
- ls -la ${LIBRARY}/*.tar.*
- ls -la ${LIBRARY}/*.msi
- # ====================================================================
- # archive targets;
- # --------------------------------------------------------------------
- .PHONY: archive restore
- archive: clean
- tar ${EXCLUDE} -vzcf ../${ARCHIVE}.tar.gz -C .. ${PACKAGE}
- tar ${EXCLUDE} -vjcf ../${ARCHIVE}.tar.bz2 -C .. ${PACKAGE}
- restore:
- tar -vzxf ../${PACKAGE}.tar.gz -C ..
|