aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/build-aux
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux')
-rw-r--r--build-aux/Makefile-xcode109
1 files changed, 109 insertions, 0 deletions
diff --git a/build-aux/Makefile-xcode b/build-aux/Makefile-xcode
new file mode 100644
index 0000000..da38c10
--- /dev/null
+++ b/build-aux/Makefile-xcode
@@ -0,0 +1,109 @@
1#
2# Syzdek Coding Tools
3# Copyright (C) 2008 David M. Syzdek <david@syzdek.net>
4#
5# @SYZDEK_LICENSE_HEADER_START@
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License Version 2 as
9# published by the Free Software Foundation.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19#
20# @SYZDEK_LICENSE_HEADER_END@
21#
22# http://www.syzdek.net/
23#
24# Makefile-xcode - Makefile wrapper for compiling from Xcode
25#
26# Notes:
27# Tested on OS X 10.5.4 with Xcode 3.1 Beta 7. Set any one of the the
28# variables below in the Xcode build settings for the target to override
29# the defaults.
30#
31
32# build tools
33ACLOCAL ?= /usr/bin/aclocal
34AUTOCONF ?= /usr/bin/autoconf
35AUTOHEADER ?= /usr/bin/autoheader
36AUTOMAKE ?= /usr/bin/automake
37LIBTOOLIZE ?= /usr/bin/glibtoolize
38TOUCH ?= /usr/bin/touch
39
40# tool flags
41ACLOCAL_FLAGS ?= -I m4
42AUTOCONF_FLAGS ?=
43AUTOHEADER_FLAGS ?=
44AUTOMAKE_FLAGS ?= -c -a
45LIBTOOLIZE_FLAGS ?= -c
46TOUCH_FLAGS ?=
47
48# file locations
49BUILD_DIR ?= .
50MAKEFILE ?= Makefile-xcode
51PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
52SRCROOT ?= .
53builddir ?= $(BUILD_DIR)
54srcdir ?= $(SRCROOT)
55
56# build options
57CONFIGURE_FLAGS ?=
58CONFIGURE_FLAGS += --enable-dependency-tracking
59MAKEFLAGS ?= 2
60DEBUG ?= NO
61DISTCLEAN ?= NO
62DISTFILES ?= NO
63
64# make targets
65all: debugOutput $(builddir)/Makefile $(srcdir)/config.h.in
66 test -f $(builddir)/Makefile && cd $(builddir) && make -j $(MAKEFLAGS)
67 test "x$(DISTFILES)" == "xYES" && test -f $(builddir)/Makefile && \
68 cd $(builddir) && make -j 2 distcheck && make dist-gzip && \
69 make dist-bzip2 && make dist-zip || exit 0
70
71debugOutput:
72 @echo ""
73 @echo "Build Directory: $(builddir)"
74 @echo "Source Directory: $(srcdir)"
75 @echo "Configure Flags: $(CONFIGURE_FLAGS)"
76 @echo ""
77 @test "x$(DEBUG)" == "xYES" && echo "Environment variables: " && \
78 bash -c set && echo "" && echo "" || exit 0
79
80$(srcdir)/aclocal.m4: $(MAKEFILE) $(srcdir)/acinclude.m4 $(srcdir)/configure.ac
81 $(ACLOCAL) $(ACLOCAL_FLAGS) && \
82 $(TOUCH) $(srcdir)/aclocal.m4
83
84$(srcdir)/configure: $(MAKEFILE) $(srcdir)/aclocal.m4 $(srcdir)/configure.ac
85 $(AUTOCONF) $(AUTOCONF_FLAGS) && \
86 $(TOUCH) $(srcdir)/configure
87
88$(srcdir)/config.h.in: $(MAKEFILE) $(srcdir)/aclocal.m4 $(srcdir)/configure
89 $(AUTOHEADER) $(AUTOHEADER_FLAGS) && \
90 $(TOUCH) $(srcdir)/config.h.in
91
92$(srcdir)/Makefile.in: $(MAKEFILE) $(srcdir)/Makefile.am $(srcdir)/aclocal.m4
93 $(LIBTOOLIZE) $(LIBTOOLIZE_FLAGS) && \
94 $(AUTOMAKE) $(AUTOMAKE_FLAGS) && \
95 $(TOUCH) $(srcdir)/Makefile.in
96
97$(builddir)/Makefile: $(MAKEFILE) $(srcdir)/configure $(srcdir)/Makefile.in
98 mkdir -p $(builddir)
99 cd $(builddir) && \
100 $(srcdir)/configure $(CONFIGURE_FLAGS)
101
102clean:
103 test -f $(builddir)/Makefile && cd $(builddir) && make clean
104 test "x$(DISTCLEAN)" == "xYES" && test -f $(builddir)/Makefile && \
105 cd $(builddir) && make distclean || exit 0
106
107install:
108
109# end of Makefile file