Make /dev/c1* device nodes on disk and on the boot ramdisk.
[minix3.git] / commands / ash / Makefile
blobc0c5058865fea72a9225e7937f6c40aab8a9140b
1 # Makefile for ash.
3 SRCS= alias.c builtins.c cd.c error.c eval.c exec.c expand.c histedit.c \
4 input.c \
5 jobs.c mail.c main.c memalloc.c miscbltin.c mystring.c nodes.c \
6 options.c parser.c redir.c setmode.c show.c signames.c syntax.c \
7 trap.c \
8 output.c var.c
10 OBJS= alias.o builtins.o cd.o error.o eval.o exec.o expand.o histedit.o \
11 input.o \
12 jobs.o mail.o main.o memalloc.o miscbltin.o mystring.o nodes.o \
13 options.o parser.o redir.o setmode.o show.o signames.o syntax.o \
14 trap.o \
15 output.o var.o init.o \
16 bltin/echo.o bltin/expr.o bltin/operators.o bltin/regexp.o \
17 arith.o arith_lex.o
19 LEX=flex
20 YACC=/usr/bin/yacc
21 .c.o:
22 $(CC) $(CFLAGS) -c $< -o $@
24 # Enable this line to disable command line editing
25 #EDIT=-DNO_HISTORY
26 # Enable this line to use the editline library instead of libedit
27 EDIT=-DEDITLINE
28 EDITLIB=-ledit
30 FLEXLIB=-lfl
32 # Enable this line if your system does not have a <paths.h>
33 NO_PATHS_H=-DNO_PATHS_H
35 # Enable this if you don't want job control
36 NO_JOBS=-DJOBS=0
37 MKB_NO_JOBS=-j
39 CPPFLAGS= -DSHELL -I. -D_MINIX $(EDIT) $(NO_PATHS_H) $(NO_JOBS)
40 CFLAGS= $(OPT) $(CPPFLAGS)
41 LIBS= $(EDITLIB) $(FLEXLIB)
43 CLEANFILES= $(OBJS) \
44 arith.c arith_y.h arith_lex.c builtins.c builtins.h init.c \
45 mkinit mknodes mksignames mksyntax \
46 nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.h \
47 bltin/operators.h bltin/operators.c
49 all: sh
51 sh: $(OBJS)
52 $(CC) $(CFLAGS) -fnone -o sh $(OBJS) $(LIBS)
53 install -S 116k sh
55 install: /usr/bin/ash /usr/bin/sh /bin/sh /bin/bigsh
57 /usr/bin/ash: sh
58 install -cs -o bin $? $@
60 /usr/bin/sh: /usr/bin/ash
61 install -l $? $@
63 /bin/sh: /usr/bin/ash
64 install -lcs $? $@
66 /bin/bigsh: /usr/bin/ash
67 install -S 6600k -lcs $? $@
69 clean:
70 rm -f $(CLEANFILES) sh core
72 parser.o: token.def
74 token.def: mktokens
75 sh mktokens
77 arith.c: arith.y
78 $(YACC) -d $?
79 mv y.tab.c $@
80 mv y.tab.h arith_y.h
82 arith_lex.c: arith_lex.l
84 builtins.c builtins.h: builtins.def shell.h
85 sh mkbuiltins $(MKB_NO_JOBS) . shell.h builtins.def
87 init.c: mkinit $(SRCS)
88 ./mkinit $(SRCS)
90 mkinit: mkinit.c
91 $(CC) $(CFLAGS) mkinit.c -o $@
93 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
94 ./mknodes nodetypes nodes.c.pat
96 mknodes: mknodes.c
97 $(CC) $(CFLAGS) mknodes.c -o $@
99 signames.c signames.h: mksignames
100 ./mksignames
102 mksignames: mksignames.c
103 $(CC) $(CFLAGS) mksignames.c -o $@
105 syntax.c syntax.h: mksyntax
106 ./mksyntax
108 mksyntax: mksyntax.c parser.h
109 $(CC) $(CFLAGS) mksyntax.c -o $@
111 bltin/operators.h: bltin/mkexpr bltin/unary_op bltin/binary_op
112 cd bltin && sh mkexpr unary_op binary_op
114 # Dependencies you say? This will have to do.
115 $(OBJS): error.h eval.h exec.h expand.h init.h input.h \
116 jobs.h machdep.h mail.h main.h memalloc.h mystring.h options.h \
117 output.h parser.h redir.h shell.h trap.h var.h \
118 builtins.h nodes.h signames.h syntax.h
120 bltin/expr.o bltin/operators.o: bltin/operators.h
123 # $PchId: Makefile,v 1.4 2006/05/22 12:40:46 philip Exp $