1# $NetBSD: Makefile,v 1.8 2010/11/12 17:05:48 tsutsui Exp $ 2 3# Top level Makefile to cross build xorg inside the NetBSD tree. 4 5.include <bsd.own.mk> 6 7SUBDIR= tools .WAIT include .WAIT lib .WAIT bin share server etc 8 9.if ${MKUPDATE} == "no" && !defined(NOCLEANDIR) 10BUILDTARGETS+= cleandir 11.endif 12.if ${MKOBJDIRS} != "no" 13BUILDTARGETS+= obj 14.endif 15.if !defined(NOINCLUDES) 16BUILDTARGETS+= includes 17.endif 18BUILDTARGETS+= do-tools 19BUILDTARGETS+= do-lib 20BUILDTARGETS+= do-build 21 22.ORDER: ${BUILDTARGETS} 23 24START_TIME!= date 25 26build: check_X11SRCDIR 27 @echo "X11 build started at: ${START_TIME}" 28.for tgt in ${BUILDTARGETS} 29 ${MAKEDIRTARGET} . ${tgt} 30.endfor 31 @echo "X11 build started at: ${START_TIME}" 32 @printf "X11 build finished at: " && date 33 34do-build: 35.for targ in dependall install 36 ${MAKEDIRTARGET} . ${targ} 37.endfor 38 39.for dir in tools lib 40do-${dir:S/\//-/g}: 41. for targ in dependall install 42 ${MAKEDIRTARGET} ${dir} ${targ} 43. endfor 44.endfor 45 46afterinstall: .PHONY 47.if !defined(__MINIX) 48.if ${MKMAN} != "no" 49 ${MAKEDIRTARGET} ${NETBSDSRCDIR}/share/man makedb \ 50 WHATISDBDIR=${X11MANDIR} 51.endif 52.endif # !defined(__MINIX) 53 54 55DISTRIBTARGETS= \ 56 bin/proxymngr \ 57 bin/twm \ 58 bin/xdm/config \ 59 bin/xfs \ 60 bin/xinit \ 61 bin/xsm \ 62 etc \ 63 lib/fontconfig/etc \ 64 lib/fontconfig/etc/conf.avail \ 65 lib/fontconfig/etc/conf.d 66 67distribution: check_X11SRCDIR 68.for tgt in ${DISTRIBTARGETS} 69 ${MAKEDIRTARGET} ${tgt} configinstall 70.endfor 71 72 73check_X11SRCDIR: .PHONY .NOTMAIN 74.if !defined(X11SRCDIR) 75 @echo 76 @echo "ERROR: setenv X11SRCDIR before doing that!" 77 @false 78.elif !exists(${X11SRCDIR.X11}) 79 @echo 80 @echo "ERROR: X11SRCDIR.X11 \`${X11SRCDIR.X11}' does not exist" 81 @false 82.else 83 @true 84.endif 85 86.include <bsd.subdir.mk> 87