summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 35bdbcf..b0d909c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,7 @@
 AM_CPPFLAGS = -include $(top_builddir)/config.h
 AM_YFLAGS = -d
 
-CFLAGS = -g -O2 -Wall
+AM_CFLAGS = -g -O2 -Wall
 DEFS = \
 	-DBSD=1 -DSMALL -DSHELL \
 	-DGLOB_BROKEN -DFNMATCH_BROKEN -DIFS_BROKEN \
@@ -24,6 +24,8 @@ dash_SOURCES = \
 	show.h system.h trap.h var.h
 dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o
 
+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)) \
@@ -52,3 +54,6 @@ syntax.c syntax.h: mksyntax
 
 signames.c: mksignames
 	./$^
+
+$(HELPERS): %: %.c
+	$(CC_FOR_BUILD) -o $@ $<