3 # 19980209 Claudio Matsuoka <claudio@conectiva.com>
4 # Modified for ELKS and bcc
8 include $(BASEDIR
)/Make.defs
10 LOCALFLAGS
= -DSHELL
-I.
-D_MINIX
-D_POSIX_SOURCE
12 ###############################################################################
14 # Include standard packaging commands.
40 include $(BASEDIR
)/Make.rules
42 ###############################################################################
44 SRCS
= builtins.c cd.c dirent.c error.c eval.c exec.c expand.c input.c \
45 jobs.c mail.c main.c memalloc.c miscbltin.c mystring.c nodes.c \
46 options.c parser.c redir.c show.c signames.c syntax.c trap.c \
49 OBJS
= builtins.o cd.o dirent.o error.o eval.o exec.o expand.o input.o \
50 jobs.o mail.o main.o memalloc.o miscbltin.o mystring.o nodes.o \
51 options.o parser.o redir.o show.o signames.o syntax.o trap.o \
52 output.o var.o init.o \
53 bltin
/echo.o bltin
/expr.o bltin
/regexp.o bltin
/operators.o
56 # Set READLINE in shell.h and add -ledit to LIBS if you want to use the
57 # editline package by Simmule Turner and Rich Salz. (The big, bloated
58 # and GPL contaminated FSF readline should work too.)
62 builtins.c builtins.h init.c mkinit mknodes mksignames mksyntax \
63 nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.def \
64 bltin
/operators.h bltin
/operators.c
69 $(CC
) $(CFLAGS
) -o ash
$(OBJS
) $(LIBS
)
80 cp
-p ash
$(TARGET_MNT
)/bin
/ash
81 rm -f
$(TARGET_MNT
)/bin
/sh
82 ln
$(TARGET_MNT
)/bin
/ash
$(TARGET_MNT
)/bin
/sh
85 rm -f core ash
$(CLEANFILES
)
92 builtins.c builtins.h
: builtins.table
shell.h
93 sh mkbuiltins
shell.h builtins.table
95 init.o
: mkinit
$(SRCS
)
96 .
/mkinit
'$(CC) -c $(CFLAGS) init.c' $(SRCS
)
99 gcc
-O2 mkinit.c
-o
$@
101 nodes.c nodes.h
: mknodes nodetypes nodes.c.pat
102 .
/mknodes nodetypes nodes.c.pat
105 gcc
-O2 mknodes.c
-o
$@
107 signames.c signames.h
: mksignames
110 mksignames
: mksignames.c
111 gcc
-O2 mksignames.c
-o
$@
113 syntax.c syntax.h
: mksyntax
116 mksyntax
: mksyntax.c parser.h
117 gcc
-O2 mksyntax.c
-o
$@
119 bltin
/operators.h
: bltin
/mkexpr bltin
/binary_op bltin
/unary_op
120 cd bltin
&& sh mkexpr
122 bltin
/echo.o
: bltin
/echo.c
123 cd bltin
&& $(CC
) -I..
$(CFLAGS
) -c echo.c
125 bltin
/expr.o
: bltin
/expr.c
126 cd bltin
&& $(CC
) -I..
$(CFLAGS
) -c expr.c
128 bltin
/operators.o
: bltin
/operators.c
129 cd bltin
&& $(CC
) -I..
$(CFLAGS
) -c operators.c
131 bltin
/regexp.o
: bltin
/regexp.c
132 cd bltin
&& $(CC
) -I..
$(CFLAGS
) -c regexp.c
134 # Dependencies you say? This will have to do.
135 $(OBJS
): error.h eval.h exec.h expand.h init.h input.h \
136 jobs.h machdep.h mail.h main.h memalloc.h mystring.h options.h \
137 output.h parser.h redir.h
shell.h trap.h var.h \
138 builtins.h nodes.h signames.h syntax.h
140 bltin
/expr.o bltin
/operators.o
: bltin
/operators.h