source: trunk/minix/commands/ash/Makefile@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.6 KB
RevLine 
[9]1# Makefile for ash.
2
3SRCS= builtins.c cd.c dirent.c error.c eval.c exec.c expand.c input.c \
4 jobs.c mail.c main.c memalloc.c miscbltin.c mystring.c nodes.c \
5 options.c parser.c redir.c show.c signames.c syntax.c trap.c \
6 output.c var.c
7
8OBJS= builtins.o cd.o dirent.o error.o eval.o exec.o expand.o input.o \
9 jobs.o mail.o main.o memalloc.o miscbltin.o mystring.o nodes.o \
10 options.o parser.o redir.o show.o signames.o syntax.o trap.o \
11 output.o var.o init.o \
12 bltin/echo.o bltin/expr.o bltin/operators.o bltin/regexp.o
13
14#
15# Set READLINE in shell.h and add -ledit to LIBS if you want to use the
16# editline package by Simmule Turner and Rich Salz. (The big, bloated
17# and GPL contaminated FSF readline should work too.)
18#
19CPPFLAGS= -DSHELL -I. -D_MINIX -D_POSIX_SOURCE
20CFLAGS= -wo -i $(CPPFLAGS)
21LIBS= -ledit
22CC = exec cc
23
24CLEANFILES= $(OBJS) \
25 builtins.c builtins.h init.c mkinit mknodes mksignames mksyntax \
26 nodes.c nodes.h signames.c signames.h syntax.c syntax.h token.def \
27 bltin/operators.h bltin/operators.c
28
29all: sh
30
31sh: $(OBJS)
32 $(CC) $(CFLAGS) -o sh $(OBJS) $(LIBS)
33 install -S 100k sh
34
35install: /usr/bin/ash /usr/bin/sh /bin/sh /bin/bigsh
36
37/usr/bin/ash: sh
38 install -cs -o bin $? $@
39
40/usr/bin/sh: /usr/bin/ash
41 install -l $? $@
42
43/bin/sh: /usr/bin/ash
44 install -lcs $? $@
45
46/bin/bigsh: /usr/bin/ash
47 install -S 1500000 -lcs $? $@
48
49clean:
50 rm -f $(CLEANFILES) sh core
51
52parser.o: token.def
53
54token.def: mktokens
55 sh mktokens
56
57builtins.c builtins.h: builtins.table shell.h
58 sh mkbuiltins shell.h builtins.table
59
60init.o: mkinit $(SRCS)
61 ./mkinit '$(CC) -c $(CFLAGS) init.c' $(SRCS)
62
63mkinit: mkinit.c
64 $(CC) $(CFLAGS) mkinit.c -o $@
65
66nodes.c nodes.h: mknodes nodetypes nodes.c.pat
67 ./mknodes nodetypes nodes.c.pat
68
69mknodes: mknodes.c
70 $(CC) $(CFLAGS) mknodes.c -o $@
71
72signames.c signames.h: mksignames
73 ./mksignames
74
75mksignames: mksignames.c
76 $(CC) $(CFLAGS) mksignames.c -o $@
77
78syntax.c syntax.h: mksyntax
79 ./mksyntax
80
81mksyntax: mksyntax.c parser.h
82 $(CC) $(CFLAGS) mksyntax.c -o $@
83
84bltin/operators.h: bltin/mkexpr bltin/binary_op bltin/unary_op
85 cd bltin && sh mkexpr
86
87bltin/echo.o: bltin/echo.c
88 cd bltin && $(CC) -I.. $(CFLAGS) -c echo.c
89
90bltin/expr.o: bltin/expr.c
91 cd bltin && $(CC) -I.. $(CFLAGS) -c expr.c
92
93bltin/operators.o: bltin/operators.c
94 cd bltin && $(CC) -I.. $(CFLAGS) -c operators.c
95
96bltin/regexp.o: bltin/regexp.c
97 cd bltin && $(CC) -I.. $(CFLAGS) -c regexp.c
98
99# Dependencies you say? This will have to do.
100$(OBJS): error.h eval.h exec.h expand.h init.h input.h \
101 jobs.h machdep.h mail.h main.h memalloc.h mystring.h options.h \
102 output.h parser.h redir.h shell.h trap.h var.h \
103 builtins.h nodes.h signames.h syntax.h
104
105bltin/expr.o bltin/operators.o: bltin/operators.h
Note: See TracBrowser for help on using the repository browser.