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		\
13	  -arch x86_64						\
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	  -novalidateParameters					\
28	  -noinstallsrc -noinstallhdrs -noverify		\
29	  -arch x86_64						\
30	  -target All						\
31	  -project ${PROJECT}_darwin-${VERSION}			\
32	  -configuration Debug					\
33	  -release $(shell cat /usr/share/buildit/.releaseName)	\
34	  -othercflags "\"-D__OPEN_SOURCE__\""			\
35
36#----------------------------------------------------------------------
37#
38# Build for Lion, SULionXXX, ...
39#
40#----------------------------------------------------------------------
41
42LION_CFLAGS=
43LION_CFLAGS+=-D__MAC_10_8=1070
44LION_CFLAGS+=-D__AVAILABILITY_INTERNAL__MAC_10_8=__attribute__((visibility(\\\"default\\\")))
45LION_CFLAGS+=-DHAVE_REACHABILITY_SERVER=YES
46
47LION_SDKROOT=$(shell xcodebuild -version -sdk macosx10.7internal Path)
48
49lion :
50	/usr/local/bin/buildit .				\
51	  -noinstallsrc -noinstallhdrs -noverify		\
52	  -arch x86_64						\
53	  -target All						\
54	  -project ${PROJECT}-${VERSION}			\
55	  -configuration Debug					\
56	  -release $(shell cat /usr/share/buildit/.releaseName)	\
57	  -othercflags "$(LION_CFLAGS)"				\
58	  --							\
59	  SDKROOT=$(LION_SDKROOT)				\
60
61