2005-04-21 16:53:53 +02:00
|
|
|
# Makefile for ash.
|
|
|
|
|
2006-05-23 14:59:34 +02:00
|
|
|
SRCS= alias.c builtins.c cd.c error.c eval.c exec.c expand.c histedit.c \
|
|
|
|
input.c \
|
2005-04-21 16:53:53 +02:00
|
|
|
jobs.c mail.c main.c memalloc.c miscbltin.c mystring.c nodes.c \
|
2006-05-23 14:59:34 +02:00
|
|
|
options.c parser.c redir.c setmode.c show.c signames.c syntax.c \
|
|
|
|
trap.c \
|
2005-04-21 16:53:53 +02:00
|
|
|
output.c var.c
|
|
|
|
|
2006-05-23 14:59:34 +02:00
|
|
|
OBJS= alias.o builtins.o cd.o error.o eval.o exec.o expand.o histedit.o \
|
|
|
|
input.o \
|
2005-04-21 16:53:53 +02:00
|
|
|
jobs.o mail.o main.o memalloc.o miscbltin.o mystring.o nodes.o \
|
2006-05-23 14:59:34 +02:00
|
|
|
options.o parser.o redir.o setmode.o show.o signames.o syntax.o \
|
|
|
|
trap.o \
|
2005-04-21 16:53:53 +02:00
|
|
|
output.o var.o init.o \
|
2006-05-23 14:59:34 +02:00
|
|
|
bltin/echo.o bltin/expr.o bltin/operators.o bltin/regexp.o \
|
|
|
|
arith.o arith_lex.o
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2006-05-23 14:59:34 +02:00
|
|
|
LEX=flex
|
2006-08-15 17:59:04 +02:00
|
|
|
YACC=/usr/bin/yacc
|
2006-05-23 14:59:34 +02:00
|
|
|
.c.o:
|
|
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
# Enable this line to disable command line editing
|
|
|
|
#EDIT=-DNO_HISTORY
|
|
|
|
# Enable this line to use the editline library instead of libedit
|
|
|
|
EDIT=-DEDITLINE
|
|
|
|
EDITLIB=-ledit
|
|
|
|
|
|
|
|
FLEXLIB=-lfl
|
|
|
|
|
|
|
|
# Enable this line if your system does not have a <paths.h>
|
|
|
|
NO_PATHS_H=-DNO_PATHS_H
|
|
|
|
|
|
|
|
# Enable this if you don't want job control
|
|
|
|
NO_JOBS=-DJOBS=0
|
|
|
|
MKB_NO_JOBS=-j
|
|
|
|
|
|
|
|
CPPFLAGS= -DSHELL -I. -D_MINIX $(EDIT) $(NO_PATHS_H) $(NO_JOBS)
|
|
|
|
CFLAGS= $(OPT) $(CPPFLAGS)
|
|
|
|
LIBS= $(EDITLIB) $(FLEXLIB)
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
CLEANFILES= $(OBJS) \
|
2006-05-23 14:59:34 +02:00
|
|
|
arith.c arith_y.h arith_lex.c builtins.c builtins.h init.c \
|
|
|
|
mkinit mknodes mksignames mksyntax \
|
|
|
|
nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.h \
|
2005-04-21 16:53:53 +02:00
|
|
|
bltin/operators.h bltin/operators.c
|
|
|
|
|
|
|
|
all: sh
|
|
|
|
|
|
|
|
sh: $(OBJS)
|
2006-05-23 14:59:34 +02:00
|
|
|
$(CC) $(CFLAGS) -fnone -o sh $(OBJS) $(LIBS)
|
2007-02-08 14:51:35 +01:00
|
|
|
install -S 116k sh
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2006-06-07 17:03:42 +02:00
|
|
|
install: /usr/bin/ash /usr/bin/sh /bin/sh /bin/bigsh
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/usr/bin/ash: sh
|
2006-06-07 17:03:42 +02:00
|
|
|
install -cs -o bin $? $@
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/usr/bin/sh: /usr/bin/ash
|
|
|
|
install -l $? $@
|
|
|
|
|
|
|
|
/bin/sh: /usr/bin/ash
|
|
|
|
install -lcs $? $@
|
|
|
|
|
2006-06-07 17:03:42 +02:00
|
|
|
/bin/bigsh: /usr/bin/ash
|
2006-07-27 10:51:08 +02:00
|
|
|
install -S 6600k -lcs $? $@
|
2005-09-01 17:23:28 +02:00
|
|
|
|
2005-04-21 16:53:53 +02:00
|
|
|
clean:
|
|
|
|
rm -f $(CLEANFILES) sh core
|
|
|
|
|
|
|
|
parser.o: token.def
|
|
|
|
|
|
|
|
token.def: mktokens
|
|
|
|
sh mktokens
|
|
|
|
|
2006-05-23 14:59:34 +02:00
|
|
|
arith.c: arith.y
|
|
|
|
$(YACC) -d $?
|
|
|
|
mv y.tab.c $@
|
|
|
|
mv y.tab.h arith_y.h
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2006-05-23 14:59:34 +02:00
|
|
|
arith_lex.c: arith_lex.l
|
|
|
|
|
|
|
|
builtins.c builtins.h: builtins.def shell.h
|
|
|
|
sh mkbuiltins $(MKB_NO_JOBS) . shell.h builtins.def
|
|
|
|
|
|
|
|
init.c: mkinit $(SRCS)
|
|
|
|
./mkinit $(SRCS)
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
mkinit: mkinit.c
|
|
|
|
$(CC) $(CFLAGS) mkinit.c -o $@
|
|
|
|
|
|
|
|
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
|
|
|
|
./mknodes nodetypes nodes.c.pat
|
|
|
|
|
|
|
|
mknodes: mknodes.c
|
|
|
|
$(CC) $(CFLAGS) mknodes.c -o $@
|
|
|
|
|
|
|
|
signames.c signames.h: mksignames
|
|
|
|
./mksignames
|
|
|
|
|
|
|
|
mksignames: mksignames.c
|
|
|
|
$(CC) $(CFLAGS) mksignames.c -o $@
|
|
|
|
|
|
|
|
syntax.c syntax.h: mksyntax
|
|
|
|
./mksyntax
|
|
|
|
|
|
|
|
mksyntax: mksyntax.c parser.h
|
|
|
|
$(CC) $(CFLAGS) mksyntax.c -o $@
|
|
|
|
|
2006-05-23 14:59:34 +02:00
|
|
|
bltin/operators.h: bltin/mkexpr bltin/unary_op bltin/binary_op
|
|
|
|
cd bltin && sh mkexpr unary_op binary_op
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
# Dependencies you say? This will have to do.
|
|
|
|
$(OBJS): error.h eval.h exec.h expand.h init.h input.h \
|
|
|
|
jobs.h machdep.h mail.h main.h memalloc.h mystring.h options.h \
|
|
|
|
output.h parser.h redir.h shell.h trap.h var.h \
|
|
|
|
builtins.h nodes.h signames.h syntax.h
|
|
|
|
|
|
|
|
bltin/expr.o bltin/operators.o: bltin/operators.h
|
2006-05-23 14:59:34 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# $PchId: Makefile,v 1.4 2006/05/22 12:40:46 philip Exp $
|