Example for cross-compiling
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- export CROSS_COMPILE='armv6j-hardfloat-linux-gnueabi-'
+ export CC='armv6j-hardfloat-linux-gnueabi-gcc'
export PATH="/usr/cross/arm/bin:$PATH"
- export CC=${CROSS_COMPILE}gcc
-
export LDFLAGS='
-L/usr/sysroot/arm/lib
-L/usr/sysroot/arm/usr/lib
autoconf
autoheader
./configure --host=arm-linux-gnueabi --prefix /usr/sysroot/arm/usr/local
- make CROSS_COMPILE=$CROSS_COMPILE
+ make
For details see the user manual:
vardir := /var/paraslash
mandir := $(datarootdir)/man/man1
-STRIP := $(CROSS_COMPILE)strip
MKDIR_P := mkdir -p
prefixed_executables := $(addprefix para_, $(executables))
tarball_delete := $(addprefix $(tarball_pfx)/, web .gitignore)
tarball := $(tarball_pfx).tar.bz2
-.PHONY: all mostlyclean clean distclean maintainer-clean install man tarball
all: $(prefixed_executables) $(man_pages)
+.PHONY: all mostlyclean clean distclean maintainer-clean install \
+ install-strip man tarball
man: $(man_pages)
tarball: $(tarball)
$(Q) rm -f *.tar.bz2
$(Q) rm -f GPATH GRTAGS GSYMS GTAGS
-install: all man
+INSTALL ?= install
+INSTALL_PROGRAM ?= $(INSTALL)
+INSTALL_DATA ?= $(INSTALL) -m 644
+ifneq ($(findstring strip, $(MAKECMDGOALS)),)
+ strip_option := -s
+endif
+
+install install-strip: all man
$(MKDIR_P) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)
- $(INSTALL) -s --strip-program $(STRIP) -m 755 \
- $(prefixed_executables) $(DESTDIR)$(bindir)
- $(INSTALL) -m 644 $(man_pages) $(DESTDIR)$(mandir)
+ $(INSTALL) $(strip_option) $(prefixed_executables) $(DESTDIR)$(bindir)
+ $(INSTALL_DATA) $(man_pages) $(DESTDIR)$(mandir)
$(MKDIR_P) $(DESTDIR)$(vardir) >/dev/null 2>&1 || true # not fatal, so don't complain
$(tarball):
test -z "$HELP2MAN" && AC_MSG_ERROR(
[help2man is required to build this package])
-AC_PATH_PROG([INSTALL], [install])
-test -z "$INSTALL" && AC_MSG_ERROR(
- [The install program is required to build this package])
-
AC_PROG_CC
AC_PROG_CPP