|
|
1.1 ! root 1: ############################################################################### ! 2: # Instructions to Make, for compilation of UNIX compatibility library ! 3: ############################################################################### ! 4: ! 5: ! 6: ############################################################################### ! 7: # ! 8: # This package was generously supplied by Doug Gwyn. It is a public domain ! 9: # implementation of the SVR3 directory access routines. ! 10: # ! 11: # I have slightly edited the package to produce a stand-alone library ! 12: # (normally it updates libc.a). The reason for this, is that the package ! 13: # is used primarily for ISODE's ftam responder, and it's too much heartburn ! 14: # to ask someone to reload libc.a just for that (sorry, doug!) ! 15: # ! 16: # I've also prepended a "_" to the names to avoid any conflicts with routines ! 17: # which might already be installed (especially for lint) ! 18: # ! 19: ############################################################################### ! 20: ! 21: LIBES = libdirent.a $(TOPDIR)libcompat.a ! 22: LLIBS = ! 23: HFILES = $(HDIR)usr.dirent.h $(HDIR)sys.dirent.h ! 24: ! 25: ! 26: ################################################################## ! 27: # Here it is... ! 28: ################################################################## ! 29: ! 30: all: libdirent testdir ! 31: inst-all: # inst-libdirent manuals ! 32: install: install ! 33: lint: l-libdirent l-testdir ! 34: ! 35: ! 36: ################################################################ ! 37: # libdirent ! 38: ################################################################ ! 39: ! 40: CFILES = closedir.c getdents.c opendir.c readdir.c rewinddir.c \ ! 41: seekdir.c telldir.c getcwd.c ! 42: OFILES = closedir.o getdents.o opendir.o readdir.o rewinddir.o \ ! 43: seekdir.o telldir.o getcwd.o $(OSTRINGS) ! 44: ! 45: ! 46: inst-libdirent: $(LIBDIR)libdirent.a $(LINTDIR)llib-ldirent ! 47: ! 48: $(LIBDIR)libdirent.a: libdirent.a ! 49: -rm -f $@ ! 50: cp libdirent.a $@ ! 51: @$(UTILDIR)make-lib.sh $(SYSTEM) $@ -ranlib ! 52: -@ls -gls $@ ! 53: -@echo "" ! 54: ! 55: $(LINTDIR)llib-ldirent: llib-ldirent ! 56: -cp $@ zllib-ldirent ! 57: -rm -f $@ ! 58: sed -e 's%#include "\(.*\)"%#include "$(INCDIR)\1"%' \ ! 59: < llib-ldirent | \ ! 60: sed -e 's%#include "/usr/include/\(.*\)"%#include <\1>%' > $@ ! 61: @$(UTILDIR)inst-lint.sh $(SYSTEM) $(OPTIONS) $@ ! 62: -@ls -gls $@ [email protected] ! 63: -@echo "" ! 64: ! 65: libdirent: libdirent.a ! 66: ! 67: libdirent.a: direntvrsn.o ! 68: -rm -f $@ ! 69: @$(UTILDIR)make-lib.sh $(SYSTEM) $(ARFLAGS) $@ $(OFILES) \ ! 70: direntvrsn.o ! 71: -@rm -f $(TOPDIR)libdirent.a $(TOPDIR)llib-ldirent ! 72: -@$(LN) libdirent.a $(TOPDIR)libdirent.a ! 73: -@$(LN) llib-ldirent $(TOPDIR)llib-ldirent ! 74: -@ls -l $@ ! 75: -@echo "DIRENT library built normally" ! 76: ! 77: direntvrsn.c: $(OFILES) ! 78: @$(UTILDIR)version.sh dirent > $@ ! 79: ! 80: l-libdirent:; $(LINT) $(LFLAGS) $(CFILES) direntvrsn.c $(LLIBS) ! 81: ! 82: closedir.o: $(HFILES) ! 83: getdents.o: $(HFILES) $(HDIR)config.h ! 84: opendir.o: $(HFILES) ! 85: readdir.o: $(HFILES) ! 86: rewinddir.o: $(HFILES) ! 87: seekdir.o: $(HFILES) ! 88: telldir.o: $(HFILES) ! 89: ! 90: getcwd.o: $(HFILES) ! 91: $(CC) $(LIBCFLAGS) -c $*.c ! 92: ! 93: ! 94: ################################################################ ! 95: # testdir ! 96: ################################################################ ! 97: ! 98: testdir: testdir.o $(LIBES) ! 99: $(LDCC) $(LDFLAGS) -o $@ testdir.o $(LIBES) $(LSOCKET) ! 100: ! 101: testdir.o: $(HFILES) ! 102: $(CC) $(CFLAGS) -c $*.c ! 103: ! 104: l-testdir:; $(LINT) $(LFLAGS) testdir.c llib-ldirent ! 105: ! 106: ! 107: ################################################################ ! 108: # manual pages ! 109: ################################################################ ! 110: ! 111: MANUALS = directory.3c dirent.4 getdents.2 ! 112: ! 113: manuals:; @$(UTILDIR)inst-man.sh $(MANOPTS) $(MANUALS) ! 114: -@echo "" ! 115: ! 116: ! 117: ################################################################ ! 118: # clean ! 119: ################################################################ ! 120: ! 121: clean:; rm -f *.o *.a z* _* core testdir direntvrsn.c ! 122: ! 123: grind:; iprint Makefile ! 124: tgrind -lc $(CFILES) direntvrsn.c testdir.c ! 125: @echo $(MANUALS) | \ ! 126: tr " " "\012" | \ ! 127: sed -e "s%.*%itroff -man &%" | \ ! 128: sh -ve
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.