1PROJECT=$(shell basename `pwd -P` | sed -e 's/\(.*\)-[0-9][0-9.]*$$/\1/')
2VERSION=$(shell basename `pwd -P` | sed -e 's/.*-\([0-9][0-9.]*$$\)/\1/')
3
4#----------------------------------------------------------------------
5#
6# Build for [current] release
7#
8#----------------------------------------------------------------------
9
10all :
11	/usr/local/bin/buildit .				\
12	  -noinstallsrc -noinstallhdrs -noverify -nosum		\
13	  -arch i386 -arch x86_64 -arch ppc 			\
14	  -target All						\
15	  -project ${PROJECT}-${VERSION}			\
16	  -configuration Debug					\
17	  -release $(shell cat /usr/share/buildit/.releaseName)	\
18
19#----------------------------------------------------------------------
20#
21# Darwin build
22#
23#----------------------------------------------------------------------
24
25darwin :
26	/usr/local/bin/buildit .				\
27	  -noinstallsrc -noinstallhdrs -noverify -nosum		\
28	  -arch i386 -arch x86_64 -arch ppc 			\
29	  -target All						\
30	  -project ${PROJECT}_darwin-${VERSION}			\
31	  -configuration Debug					\
32	  -release $(shell cat /usr/share/buildit/.releaseName)	\
33	  -othercflags "\"-D_OPEN_SOURCE_\""			\
34
35#----------------------------------------------------------------------
36#
37# Build for Lion, SULionXXX, ...
38#
39#----------------------------------------------------------------------
40
41LION_CFLAGS=
42LION_CFLAGS+=-D__MAC_10_8=1070
43LION_CFLAGS+=-D__AVAILABILITY_INTERNAL__MAC_10_8=__attribute__((visibility(\\\"default\\\")))
44LION_CFLAGS+=-DHAVE_REACHABILITY_SERVER=YES
45
46LION_SDKROOT=$(shell xcodebuild -version -sdk macosx10.7internal Path)
47
48lion :
49	/usr/local/bin/buildit .				\
50	  -noinstallsrc -noinstallhdrs -noverify -nosum		\
51	  -arch i386 -arch x86_64				\
52	  -target All						\
53	  -project ${PROJECT}-${VERSION}			\
54	  -configuration Debug					\
55	  -release $(shell cat /usr/share/buildit/.releaseName)	\
56	  -othercflags "$(LION_CFLAGS)"				\
57	  --							\
58	  SDKROOT=$(LION_SDKROOT)				\
59
60