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