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 14PROG= make 15CMDDIR= $(SRC)/cmd/make/bin 16OBJS= ar.o \ 17 depvar.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 34include ../../Makefile.tools 35include ../Makefile.com 36 37LDLIBS += ../lib/mksh/libmksh.a ../lib/vroot/libvroot.a 38LDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem 39 40CPPFLAGS += -D_FILE_OFFSET_BITS=64 41 42ROOTLINKS = $(ROOTONBLDBINMACH)/dmake 43ROOTRULES = $(ROOTONBLDSHARE)/make.rules 44 45all: $(PROG) 46 47install: all $(ROOTONBLDMACHPROG) $(ROOTLINKS) $(ROOTRULES) 48 49$(PROG): $(OBJS) 50 $(LINK.cc) $(OBJS) -o $@ $(LDLIBS) 51 $(POST_PROCESS) 52 53%.o: $(CMDDIR)/%.cc 54 $(COMPILE.cc) -o $@ $< 55 56$(ROOTONBLDBINMACH)/dmake: 57 -$(RM) $@; $(SYMLINK) ./make $@ 58 59$(ROOTRULES) := FILEMODE = 0444 60 61$(ROOTONBLDSHARE)/%: $(CMDDIR)/%.file 62 $(INS.rename) 63 64 65lint: 66 67clean: 68 $(RM) $(OBJS) 69 70include $(SRC)/tools/Makefile.targ 71 72