Imported from ../bash-2.01.1.tar.gz.
[platform/upstream/bash.git] / examples / loadables / Makefile.in
1 #
2 # Simple makefile for the sample loadable builtins
3 #
4 # This includes some boilerplate definitions added by configure, but will
5 # still need hand-editing
6 #
7 # Include some boilerplate Gnu makefile definitions.
8 prefix = @prefix@
9
10 exec_prefix = @exec_prefix@
11 bindir = @bindir@
12 libdir = @libdir@
13 infodir = @infodir@
14 includedir = @includedir@
15
16 topdir = @top_srcdir@
17 BUILD_DIR = @BUILD_DIR@
18 srcdir = @srcdir@
19 VPATH = .:@srcdir@
20
21 @SET_MAKE@
22 CC = @CC@
23 RM = rm -f
24
25 SHELL = /bin/sh
26
27 # SunOS 4
28 #PICFLAG = -pic
29 # Some versions of gcc, esp. on NetBSD and FreeBSD
30 PICFLAG = -fpic
31 # Linux -- could also be -fpic
32 #PICFLAG = -fPIC
33 # SunOS 5
34 #PICFLAG = -K pic
35 # SVR4, SVR4.2, Irix
36 #PICFLAG = -K PIC
37 # BSD/OS 2.1, BSD/OS 3.x
38 #PICFLAG =
39 # AIX 4.2
40 #PICFLAG = -K
41
42 # SunOS 4, BSD/OS 2.1, BSD/OS 3.x, SVR4.2, SVR4, Linux, AIX 4.2, etc.
43 LD = ld
44 # SunOS 5, Linux
45 #LD = ${CC}
46
47 # SunOS 4
48 #LDOPT = -assert pure-text
49 # OSF/1, Digital UNIX
50 #LDOPT = -shared -soname $@ -expect_unresolved '*'
51 # SunOS 5 using sun cc
52 #LDOPT = -dy -z text -G -i -h $@
53 # SunOS 5 using gcc with Sun ld
54 #LDOPT = -shared -Wl,-dy -Wl,-G -Wl,-i                      
55 # SVR4, SVR4.2
56 #LDOPT = -dy -z text -G -h $@
57 # NetBSD, FreeBSD -- might also need -r
58 LDOPT = -x -Bshareable
59 # Linux
60 #LDOPT = -shared
61 # BSD/OS 2.1, BSD/OS 3.x
62 #LDOPT = -r
63 # AIX 4.2
64 #LDOPT = -bdynamic -bnoentry -bexpall -G
65
66 # other libraries to link the shared object against
67 # BSD/OS 2.1
68 #LDLIBS = -lc_s.2.1.0
69 # BSD/OS 3.0, BSD/OS 3.1
70 #LDLIBS = -lc_s.3.0.0
71
72
73 INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
74       -I$(BUILD_DIR) -I$(BUILD_DIR)/lib -I$(BUILD_DIR)/builtins
75
76 .c.o:
77         $(CC) $(PICFLAG) $(CFLAGS) $(INC) -c -o $@ $<
78
79
80 ALLPROG = print truefalse sleep pushd finfo logname basename dirname \
81           tty pathchk tee head rmdir sprintf
82 OTHERPROG = necho getconf hello cat
83
84 all:    $(ALLPROG)
85 others: $(OTHERPROG)
86
87 everything: all others
88
89 sprintf: sprintf.o
90         $(LD) $(LDOPT) -o $@ sprintf.o $(LDLIBS)
91
92 print:  print.o
93         $(LD) $(LDOPT) -o $@ print.o $(LDLIBS)
94
95 necho:  necho.o
96         $(LD) $(LDOPT) -o $@ necho.o $(LDLIBS)
97
98 getconf: getconf.o
99         $(LD) $(LDOPT) -o $@ getconf.o $(LDLIBS)
100
101 hello:  hello.o
102         $(LD) $(LDOPT) -o $@ hello.o $(LDLIBS)
103
104 truefalse: truefalse.o
105         $(LD) $(LDOPT) -o $@ truefalse.o $(LDLIBS)
106
107 sleep:  sleep.o
108         $(LD) $(LDOPT) -o $@ sleep.o $(LDLIBS)
109
110 pushd:  pushd.o
111         $(LD) $(LDOPT) -o $@ pushd.o $(LDLIBS)
112
113 finfo:  finfo.o
114         $(LD) $(LDOPT) -o $@ finfo.o $(LDLIBS)
115
116 cat:    cat.o
117         $(LD) $(LDOPT) -o $@ cat.o $(LDLIBS)
118
119 logname:        logname.o
120         $(LD) $(LDOPT) -o $@ logname.o $(LDLIBS)
121
122 basename:       basename.o
123         $(LD) $(LDOPT) -o $@ basename.o $(LDLIBS)
124
125 dirname:        dirname.o
126         $(LD) $(LDOPT) -o $@ dirname.o $(LDLIBS)
127
128 tty:    tty.o
129         $(LD) $(LDOPT) -o $@ tty.o $(LDLIBS)
130
131 pathchk:        pathchk.o
132         $(LD) $(LDOPT) -o $@ pathchk.o $(LDLIBS)
133
134 tee:    tee.o
135         $(LD) $(LDOPT) -o $@ tee.o $(LDLIBS)
136
137 rmdir:  rmdir.o
138         $(LD) $(LDOPT) -o $@ rmdir.o $(LDLIBS)
139
140 head:   head.o
141         $(LD) $(LDOPT) -o $@ head.o $(LDLIBS)
142
143 clean:
144         $(RM) $(ALLPROG) $(OTHERPROG) *.o
145
146 mostlyclean:    clean
147
148 distclean maintainer-clean: clean
149         $(RM) Makefile
150
151 print.o: print.c
152 truefalse.o: truefalse.c
153 sleep.o: sleep.c
154 pushd.o: pushd.c
155 finfo.o: finfo.c
156 logname.o: logname.c
157 basename.o: basename.c
158 dirname.o: dirname.c
159 tty.o: tty.c
160 pathchk.o: pathchk.c
161 tee.o: tee.c
162 head.o: head.c
163 rmdir.o: rmdir.c
164 sprintf.o: sprintf.c
165 necho.o: necho.c
166 getconf.o: getconf.c
167 hello.o: hello.c
168 cat.o: cat.c
169