TOP= . include ${TOP}/Makefile.config PROJECT= "FreeSG" PROJECT_GUID= "2de64baf-317f-4a77-a56e-0dab753711b2" include ${TOP}/Makefile.proj SUBDIR= ${SUBDIR_sg} \ ${SUBDIR_sk} \ ${SUBDIR_pe} \ ${SUBDIR_map} CONFSCRIPTS= freesg-config \ freesg-map-config all: all-subdir clean: clean-subdir cleandir: cleandir-config cleandir-subdir install: install-subdir install-includes install-config deinstall: deinstall-subdir deinstall-includes deinstall-config depend: depend-subdir regress: regress-subdir includes: if [ ! -e "include" ]; then mkdir include; fi if [ "${SRCDIR}" != "${BLDDIR}" ]; then \ (cd "${SRCDIR}" && \ perl mk/gen-includes.pl "${BLDDIR}/include/freesg"); \ else \ perl mk/gen-includes.pl include/freesg; \ fi configure: cat configure.in | mkconfigure > configure chmod 755 configure cleandir-config: rm -fR include config rm -f Makefile.config config.log configure.lua .projfiles.out .projfiles2.out touch Makefile.config -(cd tools && ${MAKE} cleandir) -(cd demos && ${MAKE} cleandir) find . -name premake.lua -exec rm -f {} \; release: -${MAKE} cleandir -${MAKE} all-manlinks sh mk/dist.sh stable install-includes: ${SUDO} ${INSTALL_INCL_DIR} ${INCLDIR} ${SUDO} ${INSTALL_INCL_DIR} ${INCLDIR}/freesg ${SUDO} env \ INSTALL_INCL_DIR="${INSTALL_INCL_DIR}" \ INSTALL_INCL="${INSTALL_INCL}" \ ${FIND} . -type d \! -name .svn \ -exec ${SH} mk/install-includes.sh {} ${INCLDIR}/freesg \; @if [ "${SRC}" != "" ]; then \ (cd ${SRC} && ${SUDO} env \ INSTALL_INCL_DIR="${INSTALL_INCL_DIR}" \ INSTALL_INCL="${INSTALL_INCL}" \ ${FIND} . -type d \! -name .svn \ -exec ${SH} mk/install-includes.sh {} \ ${INCLDIR}/freesg \;); \ echo "${INSTALL_INCL} sg_pub.h ${INCLDIR}/freesg/sg.h"; \ ${SUDO} ${INSTALL_INCL} ${SRC}/sg/sg_pub.h \ ${INCLDIR}/freesg/sg.h; \ else \ echo "${INSTALL_INCL} sg_pub.h ${INCLDIR}/freesg/sg.h"; \ ${SUDO} ${INSTALL_INCL} sg/sg_pub.h ${INCLDIR}/freesg/sg.h; \ fi deinstall-includes: ${FIND} . -type f -name '*.h' -print \ | ${AWK} '{print "${DEINSTALL_INCL} ${INCLDIR}/"$$1}' \ | ${SUDO} ${SH} @if [ "${SRC}" != "" ]; then \ echo "${FIND} ${SRC} -type f -name '*.h' -print \ | ${AWK} '{print "${DEINSTALL_INCL} ${INCLDIR}/"$$1}' \ | ${SUDO} ${SH}"; \ (cd ${SRC} && ${FIND} . -type f -name '*.h' -print \ | ${AWK} '{print "${DEINSTALL_INCL} ${INCLDIR}/"$$1}' \ | ${SUDO} ${SH}); \ fi install-config: @for PROG in ${CONFSCRIPTS}; do \ echo "${INSTALL_PROG} $$PROG ${BINDIR}"; \ ${SUDO} ${INSTALL_PROG} $$PROG ${BINDIR}; \ done @echo "${INSTALL_DATA_DIR} ${PREFIX}/share/aclocal" @${SUDO} ${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/aclocal @echo "${INSTALL_DATA} ${SRCDIR}/mk/freesg.m4 ${PREFIX}/share/aclocal" @${SUDO} ${INSTALL_DATA} ${SRCDIR}/mk/freesg.m4 ${DESTDIR}${PREFIX}/share/aclocal deinstall-config: @for PROG in ${CONFSCRIPTS}; do \ echo "${DEINSTALL_PROG} ${BINDIR}/$$PROG"; \ ${SUDO} ${DEINSTALL_PROG} ${BINDIR}/$$PROG; \ done @echo "${DEINSTALL_DATA} ${PREFIX}/share/aclocal/freesg.m4" @${SUDO} ${DEINSTALL_DATA} ${DESTDIR}${PREFIX}/share/aclocal/freesg.m4 pre-package: @if [ "${PKG_OS}" = "windows" ]; then \ cp -f ${TOP}/mk/install-sdk/install-sdk.exe .; \ echo '' > VisualC.html; \ echo "install-sdk.exe" >> ${PROJFILELIST}; \ echo "VisualC.html" >> ${PROJFILELIST}; \ if [ -e "`which unix2dos 2>/dev/null`" ]; then \ unix2dos -n README README.txt; \ unix2dos -n INSTALL INSTALL.txt; \ unix2dos -n mk/LICENSE.txt LICENSE.txt; \ echo "README.txt" >> ${PROJFILELIST}; \ echo "INSTALL.txt" >> ${PROJFILELIST}; \ echo "LICENSE.txt" >> ${PROJFILELIST}; \ fi; \ else \ cp mk/LICENSE.txt LICENSE; \ fi post-package: @if [ "${PKG_OS}" = "windows" ]; then \ rm -f install-sdk.exe README.txt INSTALL.txt VisualC.html; \ rm -f LICENSE.txt; \ else \ rm -f LICENSE; \ fi function-list: find . -name \*.3 -exec grep ^\.Fn {} \; |awk '{print $$2}' |uniq .PHONY: clean cleandir install deinstall depend regress includes .PHONY: configure cleandir-config release .PHONY: install-includes deinstall-includes install-config deinstall-config .PHONY: pre-package post-package function-list include ${TOP}/mk/build.common.mk include ${TOP}/mk/build.subdir.mk include ${TOP}/mk/build.man.mk include ${TOP}/mk/build.proj.mk