home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / utils / source / sh / std / posix / makefile < prev    next >
Encoding:
Makefile  |  1995-05-19  |  893 b   |  47 lines

  1. # POSIX P1003.1 compatability
  2.  
  3. SHELL = /bin/sh
  4.  
  5. # This is for the sun386i your mileage may vary :-)
  6. #CC=gcc -ansi -Dsun386 -Dsun -Di386
  7.  
  8. CONFIG = -D_SYSV
  9. #CONFIG = -D_BSD
  10.  
  11. LN = ln
  12. #RANLIB = ranlib        # For BSD systems
  13. RANLIB = echo Updated
  14.  
  15. LIB = libposix.a
  16. INCL = ../h
  17.  
  18. CFLAGS = $(CCOPTS) -I$(INCL) $(CONFIG)
  19.  
  20. MISC =    Makefile 
  21. HDRS =    io.h wait.h times.h unistd.h fcntl.h dirent.h 
  22. SRCS =    unistd.c fcntl.c times.c dup2.c
  23. OBJS =    unistd.o fcntl.o times.o dup2.o
  24.  
  25. all:    $(LIB)
  26.  
  27. link:    $(HDRS)
  28.     [ -d $(INCL) ] || mkdir $(INCL)
  29.     [ -d $(INCL)/sys ] || mkdir $(INCL)/sys
  30.     -$(LN) wait.h time.h times.h $(INCL)/sys
  31.     -$(LN) io.h fcntl.h unistd.h $(INCL)
  32.     -if [ ! -r /usr/include/unistd.h ]; then $(LN) dirent.h $(INCL); fi
  33.  
  34. $(LIB):    $(OBJS)
  35.     ar r $@ $?
  36.     $(RANLIB) $@
  37.  
  38. clean:
  39.     -rm -f *.o *.out
  40.  
  41. clobber: clean
  42.     -rm -f $(LIB)
  43.  
  44. fcntl.o: fcntl.h 
  45.  
  46. times.o: times.h 
  47.