1 | # Copyright (C) 1989 by Kenneth Almquist. All rights reserved.
|
---|
2 | # This file is part of ash, which is distributed under the terms specified
|
---|
3 | # by the Ash General Public License. See the file named LICENSE.
|
---|
4 |
|
---|
5 | LIBFILES=catfcmd.o echocmd.o exprcmd.o linecmd.o nlechocmd.o\
|
---|
6 | operators.o regexp.o
|
---|
7 | DEBUG=-g
|
---|
8 | CFLAGS=$(DEBUG)
|
---|
9 | #CC=gcc
|
---|
10 |
|
---|
11 | all:$P bltinlib.a catf echo expr line nlecho true umask
|
---|
12 |
|
---|
13 | bltinlib.a:$P $(LIBFILES)
|
---|
14 | ar rc $@ $(LIBFILES)
|
---|
15 |
|
---|
16 | catf: catf.c bltin.h ../shell.h ../error.h error.o stalloc.o
|
---|
17 | $(CC) $(CFLAGS) -o $@ catf.c error.o stalloc.o
|
---|
18 |
|
---|
19 | catfcmd.o: catf.c bltin.h ../shell.h ../error.h
|
---|
20 | $(CC) -DSHELL $(CFLAGS) -c catf.c
|
---|
21 | mv catf.o $@
|
---|
22 |
|
---|
23 | expr: expr.c bltin.h ../shell.h operators.h operators.o regexp.o error.o stalloc.o
|
---|
24 | $(CC) $(CFLAGS) -o $@ expr.c operators.o regexp.o error.o stalloc.o
|
---|
25 | -rm -f test '['
|
---|
26 | ln expr test
|
---|
27 | ln expr '['
|
---|
28 |
|
---|
29 | exprcmd.o: expr.c bltin.h ../shell.h operators.h
|
---|
30 | $(CC) -DSHELL $(CFLAGS) -c expr.c
|
---|
31 | mv expr.o $@
|
---|
32 |
|
---|
33 | operators.c operators.h: unary_op binary_op mkexpr
|
---|
34 | ./mkexpr
|
---|
35 |
|
---|
36 | operators.o: ../shell.h operators.h
|
---|
37 |
|
---|
38 | regexp.o: bltin.h ../shell.h
|
---|
39 |
|
---|
40 | echo: echo.c bltin.h ../shell.h
|
---|
41 | $(CC) $(CFLAGS) -o $@ echo.c
|
---|
42 |
|
---|
43 | echocmd.o: echo.c bltin.h ../shell.h
|
---|
44 | $(CC) -DSHELL $(CFLAGS) -c echo.c
|
---|
45 | mv echo.o $@
|
---|
46 |
|
---|
47 | line: line.c bltin.h ../shell.h
|
---|
48 | $(CC) $(CFLAGS) -o $@ line.c
|
---|
49 |
|
---|
50 | linecmd.o: line.c bltin.h ../shell.h
|
---|
51 | $(CC) -DSHELL $(CFLAGS) -c line.c
|
---|
52 | mv line.o $@
|
---|
53 |
|
---|
54 | nlecho: nlecho.c bltin.h ../shell.h
|
---|
55 | $(CC) $(CFLAGS) -o $@ nlecho.c
|
---|
56 |
|
---|
57 | nlechocmd.o: nlecho.c bltin.h ../shell.h
|
---|
58 | $(CC) -DSHELL $(CFLAGS) -c nlecho.c
|
---|
59 | mv nlecho.o $@
|
---|
60 |
|
---|
61 | umask: umask.c bltin.h
|
---|
62 | $(CC) $(CFLAGS) -o $@ umask.c
|
---|
63 |
|
---|
64 | true:
|
---|
65 | > :
|
---|
66 | chmod 755 :
|
---|
67 | rm -f true
|
---|
68 | ln : true
|
---|
69 |
|
---|
70 | stalloc.o: ../shell.h
|
---|
71 |
|
---|