From 7f869bf1061a2206424c9436b4d40f4821bef306 Mon Sep 17 00:00:00 2001 From: herbert Date: Fri, 25 Mar 2005 18:09:43 +1100 Subject: Cleaned up src/Makefile.am. --- ChangeLog | 2 ++ src/Makefile.am | 19 ++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3d2e0fa..3d4412b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + * Cleaned up src/Makefile.am. + 2005-03-25 Gilles Chanteperdrix * Fixed support for cross-compilation. diff --git a/src/Makefile.am b/src/Makefile.am index b0d909c..1675d9f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,14 +1,23 @@ # $Id$ -AM_CPPFLAGS = -include $(top_builddir)/config.h AM_YFLAGS = -d -AM_CFLAGS = -g -O2 -Wall -DEFS = \ +COMMON_CFLAGS = -g -O2 -Wall +COMMON_CPPFLAGS = \ + -include $(top_builddir)/config.h \ -DBSD=1 -DSMALL -DSHELL \ -DGLOB_BROKEN -DFNMATCH_BROKEN -DIFS_BROKEN \ -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -D_DIAGASSERT\(x\)= +AM_CFLAGS = $(COMMON_CFLAGS) +AM_CPPFLAGS = $(COMMON_CPPFLAGS) +AM_CFLAGS_FOR_BUILD = $(COMMON_CFLAGS) +AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS) + +COMPILE_FOR_BUILD = \ + $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \ + $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) + bin_PROGRAMS = dash dash_CFILES = \ @@ -29,7 +38,7 @@ HELPERS = mkinit mksyntax mknodes mksignames BUILT_SOURCES = arith.h builtins.h nodes.h syntax.h token.h CLEANFILES = \ $(BUILT_SOURCES) $(patsubst %.o,%.c,$(dash_LDADD)) \ - arith.c mkinit mknodes mksignames mksyntax + arith.c $(HELPERS) man_MANS = dash.1 EXTRA_DIST = \ @@ -56,4 +65,4 @@ signames.c: mksignames ./$^ $(HELPERS): %: %.c - $(CC_FOR_BUILD) -o $@ $< + $(COMPILE_FOR_BUILD) -o $@ $< -- cgit 1.4.1