diff options
Diffstat (limited to 'build-aux')
| -rw-r--r-- | build-aux/Makefile-xcode | 109 |
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 | ||
| 33 | ACLOCAL ?= /usr/bin/aclocal | ||
| 34 | AUTOCONF ?= /usr/bin/autoconf | ||
| 35 | AUTOHEADER ?= /usr/bin/autoheader | ||
| 36 | AUTOMAKE ?= /usr/bin/automake | ||
| 37 | LIBTOOLIZE ?= /usr/bin/glibtoolize | ||
| 38 | TOUCH ?= /usr/bin/touch | ||
| 39 | |||
| 40 | # tool flags | ||
| 41 | ACLOCAL_FLAGS ?= -I m4 | ||
| 42 | AUTOCONF_FLAGS ?= | ||
| 43 | AUTOHEADER_FLAGS ?= | ||
| 44 | AUTOMAKE_FLAGS ?= -c -a | ||
| 45 | LIBTOOLIZE_FLAGS ?= -c | ||
| 46 | TOUCH_FLAGS ?= | ||
| 47 | |||
| 48 | # file locations | ||
| 49 | BUILD_DIR ?= . | ||
| 50 | MAKEFILE ?= Makefile-xcode | ||
| 51 | PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin | ||
| 52 | SRCROOT ?= . | ||
| 53 | builddir ?= $(BUILD_DIR) | ||
| 54 | srcdir ?= $(SRCROOT) | ||
| 55 | |||
| 56 | # build options | ||
| 57 | CONFIGURE_FLAGS ?= | ||
| 58 | CONFIGURE_FLAGS += --enable-dependency-tracking | ||
| 59 | MAKEFLAGS ?= 2 | ||
| 60 | DEBUG ?= NO | ||
| 61 | DISTCLEAN ?= NO | ||
| 62 | DISTFILES ?= NO | ||
| 63 | |||
| 64 | # make targets | ||
| 65 | all: 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 | |||
| 71 | debugOutput: | ||
| 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 | |||
| 102 | clean: | ||
| 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 | |||
| 107 | install: | ||
| 108 | |||
| 109 | # end of Makefile file | ||
