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# Copyright 2019 RackTop Systems. 14 15PROG= make 16CMDDIR= $(SRC)/cmd/make/bin 17OBJS= ar.o \ 18 depvar.o \ 19 doname.o \ 20 dosys.o \ 21 files.o \ 22 globals.o \ 23 implicit.o \ 24 macro.o \ 25 main.o \ 26 misc.o \ 27 nse_printdep.o \ 28 parallel.o \ 29 pmake.o \ 30 read.o \ 31 read2.o \ 32 rep.o \ 33 state.o 34 35include ../../Makefile.tools 36include ../Makefile.com 37 38LDLIBS += ../lib/mksh/libmksh.a ../lib/vroot/libvroot.a 39LDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem 40NATIVE_LIBS += libnsl.so libumem.so 41 42CPPFLAGS += -D_FILE_OFFSET_BITS=64 43 44CCERRWARN += -_gcc=-Wno-unused-variable 45CCERRWARN += -_gcc=-Wno-switch 46CCERRWARN += -_gcc=-Wno-parentheses 47CCERRWARN += -_gcc=-Wno-unused-function 48CCERRWARN += -_gcc=-Wno-clobbered 49CCERRWARN += -_gcc=-Wno-uninitialized 50 51ROOTLINKS = $(ROOTONBLDBINMACH)/dmake 52ROOTRULES = $(ROOTONBLDSHARE)/make.rules 53 54all: $(PROG) 55 56install: all $(ROOTONBLDMACHPROG) $(ROOTLINKS) $(ROOTRULES) 57 58$(PROG): $(OBJS) 59 $(LINK.cc) $(OBJS) -o $@ $(LDLIBS) 60 $(POST_PROCESS) 61 62%.o: $(CMDDIR)/%.cc 63 $(COMPILE.cc) -o $@ $< 64 65$(ROOTONBLDBINMACH)/dmake: 66 -$(RM) $@; $(SYMLINK) ./make $@ 67 68$(ROOTRULES) := FILEMODE = 0444 69 70$(ROOTONBLDSHARE)/%: $(CMDDIR)/%.file 71 $(INS.rename) 72 73 74lint: 75 76clean: 77 $(RM) $(OBJS) 78 79include $(SRC)/tools/Makefile.targ 80 81