diff options
author | Jari Aalto <jari.aalto@cante.net> | 1996-12-23 17:02:34 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:49 +0000 |
commit | ccc6cda312fea9f0468ee65b8f368e9653e1380b (patch) | |
tree | b059878adcfd876c4acb8030deda1eeb918c7e75 /examples/loadables/Makefile | |
parent | 726f63884db0132f01745f1fb4465e6621088ccf (diff) | |
download | bash-ccc6cda312fea9f0468ee65b8f368e9653e1380b.tar.gz |
Imported from ../bash-2.0.tar.gz.
Diffstat (limited to 'examples/loadables/Makefile')
-rw-r--r-- | examples/loadables/Makefile | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/examples/loadables/Makefile b/examples/loadables/Makefile new file mode 100644 index 00000000..9f93bca7 --- /dev/null +++ b/examples/loadables/Makefile @@ -0,0 +1,112 @@ +# +# Simple makefile for the sample loadable builtins +# +CC = cc + +# SunOS 4 +PICFLAG = -pic +# Some versions of gcc, esp. on NetBSD and FreeBSD +#PICFLAG = -fpic +# Linux -- could also be -fpic +#PICFLAG = -fPIC +# SunOS 5 +#PICFLAG = -K pic +# SVR4, SVR4.2, Irix +#PICFLAG = -K PIC +# BSD/OS 2.1 +#PICFLAG = +# AIX 4.2 +#PICFLAG = -K + +# SunOS 4, BSD/OS 2.1, SVR4.2, SVR4, Linux, AIX 4.2, etc. +LD = ld +# SunOS 5, Linux +#LD = cc + +# SunOS 4 +LDOPT = -assert pure-text +# OSF/1, Digital UNIX +#LDOPT = -shared -soname $@ -expect_unresolved '*' +# SunOS 5 +#LDOPT = -dy -z text -G -i -h $@ +# SVR4, SVR4.2 +#LDOPT = -dy -z text -G -h $@ +# NetBSD, FreeBSD -- might also need -r +#LDOPT = -x -Bshareable +# Linux +#LDOPT = -shared +# BSD/OS 2.1 +#LDOPT = -r +# AIX 4.2 +#LDOPT = -bdynamic -bnoentry -bexpall -G + +# other libraries to link the shared object against +# BSD/OS 2.1 +#LDLIBS = -lc_s.2.1.0 + +srcdir = ../.. +INC= -I$(srcdir) -I$(srcdir)/builtins -I$(srcdir)/lib + +.c.o: + $(CC) $(PICFLAG) $(CFLAGS) $(INC) -c -o $@ $< + +all: printf print truefalse sleep pushd finfo logname basename dirname \ + tty pathchk tee head rmdir sprintf +others: necho getconf hello cat + +printf: printf.o + $(LD) $(LDOPT) -o $@ printf.o $(LDLIBS) + +sprintf: sprintf.o + $(LD) $(LDOPT) -o $@ sprintf.o $(LDLIBS) + +print: print.o + $(LD) $(LDOPT) -o $@ print.o $(LDLIBS) + +necho: necho.o + $(LD) $(LDOPT) -o $@ necho.o $(LDLIBS) + +getconf: getconf.o + $(LD) $(LDOPT) -o $@ getconf.o $(LDLIBS) + +hello: hello.o + $(LD) $(LDOPT) -o $@ hello.o $(LDLIBS) + +truefalse: truefalse.o + $(LD) $(LDOPT) -o $@ truefalse.o $(LDLIBS) + +sleep: sleep.o + $(LD) $(LDOPT) -o $@ sleep.o $(LDLIBS) + +pushd: pushd.o + $(LD) $(LDOPT) -o $@ pushd.o $(LDLIBS) + +finfo: finfo.o + $(LD) $(LDOPT) -o $@ finfo.o $(LDLIBS) + +cat: cat.o + $(LD) $(LDOPT) -o $@ cat.o $(LDLIBS) + +logname: logname.o + $(LD) $(LDOPT) -o $@ logname.o $(LDLIBS) + +basename: basename.o + $(LD) $(LDOPT) -o $@ basename.o $(LDLIBS) + +dirname: dirname.o + $(LD) $(LDOPT) -o $@ dirname.o $(LDLIBS) + +tty: tty.o + $(LD) $(LDOPT) -o $@ tty.o $(LDLIBS) + +pathchk: pathchk.o + $(LD) $(LDOPT) -o $@ pathchk.o $(LDLIBS) + +tee: tee.o + $(LD) $(LDOPT) -o $@ tee.o $(LDLIBS) + +rmdir: rmdir.o + $(LD) $(LDOPT) -o $@ rmdir.o $(LDLIBS) + +head: head.o + $(LD) $(LDOPT) -o $@ head.o $(LDLIBS) |