home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-06-14 | 4.3 KB | 182 lines |
- # Makefile for GNU fileutils.
- # Do not use this makefile directly, but only from `../Makefile'.
- # Copyright (C) 1986, 1988, 1989, 1990 Free Software Foundation, Inc.
-
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2, or (at your option)
- # any later version.
-
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
-
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- SHELL = /bin/sh
-
- YACC = bison -y
- CC = cgcc
- AR = car
- RANLIB = car s
- CFLAGS = -DSTPCPY_MISSING -DSTRDUP_MISSING -DMKFIFO_MISSING\
- -DFTRUNCATE_MISSING -DFCHMOD_MISSING -D_POSIX_SOURCE\
- -DFTIME_MISSING -I. -I../lib -O -fstrength-reduce
-
- LDFLAGS = -s
- LIBS = ../lib/libfu.olb -liio
-
- SOURCES = cat.c chmod.c chgrp.c chown.c cmp.c cp-aux.c cp-hash.c cp.c cut.c \
- dd.c du.c expand.c head.c install.c ln.c ls.c mkdir.c \
- mkfifo.c mv.c mvdir.c paste.c rm.c rmdir.c tac.c \
- split.c tail.c touch.c unexpand.c
-
- DISTFILES = Makefile cp.h system.h $(SOURCES)
-
- # Executable files in this directory.
- PROGS = cat.ttp chmod.ttp cmp.ttp cp.ttp cut.ttp dd.ttp du.ttp\
- expand.ttp head.ttp ln.ttp dir.ttp vdir.ttp ls.ttp mkdir.ttp\
- mv.ttp paste.ttp rm.ttp rmdir.ttp split.ttp tac.ttp tail.ttp\
- touch.ttp ginstall.ttp unexpand.ttp
-
- all: $(PROGS) $(LIBPROGS)
- .PHONY: all
-
- install: all
- [ x$(LIBPROGS) = x ] || ./ginstall -o root -m 4755 $(LIBPROGS) $(LIBDIR)
- ./ginstall $(PROGS) $(BINDIR)
- cd $(BINDIR); ./ln -f dir d; ./ln -f vdir v; ./mv -f ginstall install
- .PHONY: install
-
- tags: $(SOURCES)
- ctags $(SOURCES)
-
- TAGS: $(SOURCES)
- etags $(SOURCES)
-
- # Use /bin/rm instead of ./rm in case ./rm is compiled for a different
- # architecture.
- clean:
- /bin/rm -f $(PROGS) $(LIBPROGS) *.o tags TAGS a.out core
- .PHONY: clean
-
- dist:
- ln $(DISTFILES) ../$(DISTDIR)/src
- .PHONY: dist
-
- # Linking rules.
-
- $(PROGS): ../lib/libfu.olb
-
- cat.ttp: cat.o
- $(CC) $(LDFLAGS) -o $@ cat.o $(LIBS)
-
- chmod.ttp: chmod.o
- $(CC) $(LDFLAGS) -o $@ chmod.o $(LIBS)
-
- chgrp.ttp: chgrp.o
- $(CC) $(LDFLAGS) -o $@ chgrp.o $(LIBS)
-
- chown.ttp: chown.o
- $(CC) $(LDFLAGS) -o $@ chown.o $(LIBS)
-
- cmp.ttp: cmp.o
- $(CC) $(LDFLAGS) -o $@ cmp.o $(LIBS)
-
- cp.ttp: cp.o cp-hash.o cp-aux.o mknod.o
- $(CC) $(LDFLAGS) -o $@ cp.o cp-hash.o cp-aux.o mknod.o $(LIBS)
-
- cut.ttp: cut.o
- $(CC) $(LDFLAGS) -o $@ cut.o $(LIBS)
-
- dd.ttp: dd.o
- $(CC) $(LDFLAGS) -o $@ dd.o $(LIBS)
-
- dir.ttp: dir.o
- $(CC) $(LDFLAGS) -o $@ dir.o $(LIBS)
-
- du.ttp: du.o
- $(CC) $(LDFLAGS) -o $@ du.o $(LIBS)
-
- expand.ttp: expand.o
- $(CC) $(LDFLAGS) -o $@ expand.o $(LIBS)
-
- ginstall.ttp: install.o
- $(CC) $(LDFLAGS) -o $@ install.o $(LIBS)
-
- head.ttp: head.o
- $(CC) $(LDFLAGS) -o $@ head.o $(LIBS)
-
- ln.ttp: ln.o
- $(CC) $(LDFLAGS) -o $@ ln.o $(LIBS)
-
- ls.ttp: ls.o
- $(CC) $(LDFLAGS) -o $@ ls.o $(LIBS)
-
- mkdir.ttp: mkdir.o
- $(CC) $(LDFLAGS) -o $@ mkdir.o $(LIBS)
-
- mkfifo.ttp: mkfifo.o
- $(CC) $(LDFLAGS) -o $@ mkfifo.o $(LIBS)
-
- mv.ttp: mv.o
- $(CC) $(LDFLAGS) -o $@ mv.o $(LIBS)
-
- mvdir.ttp: mvdir.o
- $(CC) $(LDFLAGS) -o $@ mvdir.o $(LIBS)
-
- paste.ttp: paste.o
- $(CC) $(LDFLAGS) -o $@ paste.o $(LIBS)
-
- rm.ttp: rm.o
- $(CC) $(LDFLAGS) -o $@ rm.o $(LIBS)
-
- rmdir.ttp: rmdir.o
- $(CC) $(LDFLAGS) -o $@ rmdir.o $(LIBS)
-
- split.ttp: split.o
- $(CC) $(LDFLAGS) -o $@ split.o $(LIBS)
-
- tac.ttp: tac.o
- $(CC) $(LDFLAGS) -o $@ tac.o $(LIBS)
-
- tail.ttp: tail.o
- $(CC) $(LDFLAGS) -o $@ tail.o $(LIBS)
-
- touch.ttp: touch.o
- $(CC) $(LDFLAGS) -o $@ touch.o $(LIBS)
-
- unexpand.ttp: unexpand.o
- $(CC) $(LDFLAGS) -o $@ unexpand.o $(LIBS)
-
- vdir.ttp: vdir.o
- $(CC) $(LDFLAGS) -o $@ vdir.o $(LIBS)
-
- # Compilation rules.
-
- chmod.o mkdir.o mkfifo.o: ../lib/modechange.h
-
- cp.o mv.o ln.o: ../lib/backupfile.h
-
- cp.o cp-hash.o cp-aux.o: cp.h
-
- tac.o: ../lib/regex.h
-
- # C compilers that can't handle -c and -o together need the following:
- #dir.o: ls.c
- # $(CC) $(CFLAGS) -DMULTI_COL -c ls.c
- # mv ls.o dir.o
- #
- #vdir.o: ls.c
- # $(CC) $(CFLAGS) -DLONG_FORMAT -c ls.c
- # mv ls.o vdir.o
-
- dir.o: ls.c
- $(CC) $(CFLAGS) -DMULTI_COL -o dir.o -c ls.c
-
- vdir.o: ls.c
- $(CC) $(CFLAGS) -DLONG_FORMAT -o vdir.o -c ls.c
-