]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/dash/contrib/src/Makefile.am
Update
[l4.git] / l4 / pkg / dash / contrib / src / Makefile.am
1 AM_YFLAGS = -d
2
3 COMMON_CFLAGS = -Wall
4 COMMON_CPPFLAGS = \
5         -include $(top_builddir)/config.h \
6         -DBSD=1 -DSHELL \
7         -DIFS_BROKEN
8
9 AM_CFLAGS = $(COMMON_CFLAGS)
10 AM_CPPFLAGS = $(COMMON_CPPFLAGS)
11 AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS) 
12 AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS)
13
14 COMPILE_FOR_BUILD = \
15         $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS_FOR_BUILD) \
16         $(CPPFLAGS_FOR_BUILD) \
17         $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) 
18
19 bin_PROGRAMS = dash
20
21 dash_CFILES = \
22         alias.c arith_yacc.c arith_yylex.c cd.c error.c eval.c exec.c expand.c \
23         histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
24         mystring.c options.c parser.c redir.c show.c trap.c output.c \
25         bltin/printf.c system.c bltin/test.c bltin/times.c var.c
26 dash_SOURCES = \
27         $(dash_CFILES) \
28         alias.h arith_yacc.h bltin/bltin.h cd.h error.h eval.h exec.h \
29         expand.h hetio.h \
30         init.h input.h jobs.h machdep.h mail.h main.h memalloc.h miscbltin.h \
31         myhistedit.h mystring.h options.h output.h parser.h redir.h shell.h \
32         show.h system.h trap.h var.h
33 dash_LDADD = builtins.o init.o nodes.o signames.o syntax.o
34
35 HELPERS = mkinit mksyntax mknodes mksignames
36
37 BUILT_SOURCES = builtins.h nodes.h syntax.h token.h token_vars.h
38 CLEANFILES = \
39         $(BUILT_SOURCES) $(patsubst %.o,%.c,$(dash_LDADD)) \
40         $(HELPERS) builtins.def
41
42 man_MANS = dash.1
43 EXTRA_DIST = \
44         $(man_MANS) \
45         mktokens mkbuiltins builtins.def.in mkinit.c \
46         mknodes.c nodetypes nodes.c.pat mksyntax.c mksignames.c
47
48 token.h token_vars.h: mktokens
49         sh $^
50
51 builtins.def: builtins.def.in $(top_builddir)/config.h
52         $(COMPILE) -E -x c -o $@ $<
53
54 builtins.c builtins.h: mkbuiltins builtins.def
55         sh $^
56
57 init.c: mkinit $(dash_CFILES)
58         ./$^
59
60 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
61         ./$^
62
63 syntax.c syntax.h: mksyntax
64         ./$^
65
66 signames.c: mksignames
67         ./$^
68
69 mksyntax: token.h
70
71 $(HELPERS): %: %.c
72         $(COMPILE_FOR_BUILD) -o $@ $<