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         misc.o          \
  26         nse_printdep.o  \
  27         parallel.o      \
  28         pmake.o         \
  29         read.o          \
  30         read2.o         \
  31         rep.o           \
  32         state.o
  33 
  34 include ../../Makefile.cmd
  35 include ../Makefile.com
  36 
  37 LDLIBS += ../lib/mksh/libmksh.a ../lib/mksdmsi18n/libmksdmsi18n.a ../lib/vroot/libvroot.a
  38 LDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem
  39 
  40 CPPFLAGS += -D_FILE_OFFSET_BITS=64
  41 
  42 ROOTLINKS = $(ROOTCCSBIN)/make $(ROOTXPG4BIN)/make $(ROOTBIN)/dmake $(ROOTCCSLIB)/svr4.make \
  43         $(ROOTLIB)/svr4.make
  44 
  45 ROOTRULES = $(ROOTSHLIB)/make/make.rules $(ROOTSHLIB)/make/svr4.make.rules
  46 
  47 all:    $(PROG)
  48 
  49 install: all $(ROOTPROG) $(ROOTLINKS) $(ROOTRULES)
  50 
  51 $(PROG):        $(OBJS)
  52         $(LINK.cc) $(OBJS) -o $@ $(LDLIBS)
  53         $(POST_PROCESS)
  54 
  55 $(ROOTCCSBIN)/make:
  56         -$(RM) $@; $(SYMLINK) ../../bin/make $@
  57 
  58 $(ROOTCCSLIB)/svr4.make:
  59         -$(RM) $@; $(SYMLINK) ../../bin/make $@
  60 
  61 $(ROOTLIB)/svr4.make:
  62         -$(RM) $@; $(SYMLINK) ../bin/make $@
  63 
  64 $(ROOTXPG4BIN)/make:
  65         -$(RM) $@; $(SYMLINK) ../../bin/make $@
  66 
  67 $(ROOTBIN)/dmake:
  68         -$(RM) $@; $(SYMLINK) ./make $@
  69 
  70 $(ROOTRULES) := FILEMODE = 0444
  71 
  72 $(ROOTRULES): $(ROOTSHLIB)/make
  73 
  74 $(ROOTSHLIB)/make: FRC
  75         $(INS.dir)
  76 
  77 $(ROOTSHLIB)/make/%: %.file
  78         $(INS.rename)
  79 
  80 lint:
  81 
  82 clean:
  83         $(RM) $(OBJS)
  84 
  85 FRC:
  86 
  87 include ../../Makefile.targ
  88