home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / pdksh-4.9-src.tgz / tar.out / contrib / pdksh / std / posix / Makefile < prev    next >
Makefile  |  1996-09-28  |  1KB  |  53 lines

  1. # POSIX P1003.1 compatability
  2. # $Id: Makefile,v 1.3 93/05/05 21:17:38 sjg Exp $
  3.  
  4. SHELL = /bin/sh
  5. MAKE  = make
  6.  
  7. #CONFIG = -D_SYSV
  8. CONFIG = -D_BSD
  9.  
  10. LN = ln
  11. RANLIB = ranlib        # For BSD systems
  12. #RANLIB = echo Updated
  13.  
  14. LIB = ../libposix.a
  15. INCL = ../h
  16.  
  17. CFLAGS = $(CCOPTS) -I$(INCL) $(CONFIG)
  18.  
  19. MISC =    Makefile 
  20. HDRS =    io.h unistd.h fcntl.h dirent.h 
  21. SYSHDRS = wait.h time.h times.h
  22.  
  23. SRCS =    unistd.c fcntl.c times.c dup2.c
  24. OBJS =    $(LIB)(unistd.o) \
  25.     $(LIB)(fcntl.o) \
  26.     $(LIB)(times.o) \
  27.     $(LIB)(dup2.o)
  28.  
  29. all:    $(LIB)
  30.  
  31. link:    $(HDRS)
  32.     [ -d $(INCL) ] || mkdir $(INCL)
  33.     [ -d $(INCL)/sys ] || mkdir $(INCL)/sys
  34.     ($(SHELL) ../mklinks $(INCL) $(HDRS))
  35.     ($(SHELL) ../mklinks $(INCL)/sys $(SYSHDRS))
  36.     -if [ -r /usr/include/unistd.h ]; then $(RM) $(INCL)/unistd.h; fi 
  37.  
  38. $(LIB):    $(OBJS)
  39. # if you make doesn't know how to put objects in libraries
  40. # then simply make all the .o's and use the following line
  41. #    ar r $@ $?
  42.     $(RANLIB) $@
  43.  
  44. clean:
  45.     -rm -f *.o *.out
  46.  
  47. clobber: clean
  48.     -rm -f $(LIB)
  49.  
  50. fcntl.o: fcntl.h 
  51.  
  52. times.o: times.h 
  53.