1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 # Copyright 2015, Richard Lowe.
  13 
  14 PROG=   make
  15 OBJS=   ar.o            \
  16         depvar.o        \
  17         dist.o          \
  18         doname.o        \
  19         dosys.o         \
  20         files.o         \
  21         globals.o       \
  22         implicit.o      \
  23         macro.o         \
  24         main.o          \
  25         make.o          \
  26         misc.o          \
  27         nse_printdep.o  \
  28         nse.o           \
  29         parallel.o      \
  30         pmake.o         \
  31         read.o          \
  32         read2.o         \
  33         rep.o           \
  34         state.o
  35 
  36 include ../../Makefile.cmd
  37 include ../Makefile.com
  38 
  39 LDLIBS += ../lib/mksh/libmksh.a ../lib/mksdmsi18n/libmksdmsi18n.a ../lib/vroot/libvroot.a
  40 LDLIBS += ../lib/bsd/libbsd.a -lc
  41 
  42 CPPFLAGS += -D_FILE_OFFSET_BITS=64
  43 
  44 ROOTLINKS = $(ROOTCCSBIN)/make $(ROOTXPG4BIN)/make $(ROOTBIN)/dmake $(ROOTCCSLIB)/svr4.make \
  45         $(ROOTLIB)/svr4.make
  46 
  47 ROOTRULES = $(ROOTSHLIB)/make/make.rules $(ROOTSHLIB)/make/svr4.make.rules
  48 
  49 all:    $(PROG)
  50 
  51 install: all $(ROOTPROG) $(ROOTLINKS) $(ROOTRULES)
  52 
  53 $(PROG):        $(OBJS)
  54         $(LINK.cc) $(OBJS) -o $@ $(LDLIBS)
  55         $(POST_PROCESS)
  56 
  57 $(ROOTCCSBIN)/make:
  58         -$(RM) $@; $(SYMLINK) ../../bin/make $@
  59 
  60 $(ROOTCCSLIB)/svr4.make:
  61         -$(RM) $@; $(SYMLINK) ../../bin/make $@
  62 
  63 $(ROOTLIB)/svr4.make:
  64         -$(RM) $@; $(SYMLINK) ../bin/make $@
  65 
  66 $(ROOTXPG4BIN)/make:
  67         -$(RM) $@; $(SYMLINK) ../../bin/make $@
  68 
  69 $(ROOTBIN)/dmake:
  70         -$(RM) $@; $(SYMLINK) ./make $@
  71 
  72 $(ROOTRULES) := FILEMODE = 0444
  73 
  74 $(ROOTRULES): $(ROOTSHLIB)/make
  75 
  76 $(ROOTSHLIB)/make: FRC
  77         $(INS.dir)
  78 
  79 $(ROOTSHLIB)/make/%: %.file
  80         $(INS.rename)
  81 
  82 lint:
  83 
  84 clean:
  85         $(RM) $(OBJS)
  86 
  87 FRC:
  88 
  89 include ../../Makefile.targ
  90