Makefile revision 10d63b7db37a83b39c7f511cf9426c9d03ea0760
11f343b8117dbf56931f537820c2749a8232fec2Liam P. White#
11f343b8117dbf56931f537820c2749a8232fec2Liam P. White# This file and its contents are supplied under the terms of the
7b1443968fea3c27f050045c4c16820211119099jeff_schiller# Common Development and Distribution License ("CDDL"), version 1.0.
7b1443968fea3c27f050045c4c16820211119099jeff_schiller# You may only use this file in accordance with the terms of version
7b1443968fea3c27f050045c4c16820211119099jeff_schiller# 1.0 of the CDDL.
7b1443968fea3c27f050045c4c16820211119099jeff_schiller#
7b1443968fea3c27f050045c4c16820211119099jeff_schiller# A full copy of the text of the CDDL should have accompanied this
7b1443968fea3c27f050045c4c16820211119099jeff_schiller# source. A copy of the CDDL is also available via the Internet at
7b1443968fea3c27f050045c4c16820211119099jeff_schiller# http://www.illumos.org/license/CDDL.
7b1443968fea3c27f050045c4c16820211119099jeff_schiller#
7b1443968fea3c27f050045c4c16820211119099jeff_schiller
7b1443968fea3c27f050045c4c16820211119099jeff_schiller# Copyright 2015, Richard Lowe.
7b1443968fea3c27f050045c4c16820211119099jeff_schiller
7b1443968fea3c27f050045c4c16820211119099jeff_schillerPROG= make
7b1443968fea3c27f050045c4c16820211119099jeff_schillerCMDDIR= $(SRC)/cmd/make/bin
7b1443968fea3c27f050045c4c16820211119099jeff_schillerOBJS= ar.o \
aded4b44e9194df7c9905c5787d1c7a9553d12cdMarkus Engel depvar.o \
d74e415b7dd25ccb70d40a9f11ec99f23b57ed63Markus Engel doname.o \
7b1443968fea3c27f050045c4c16820211119099jeff_schiller dosys.o \
35087bff7509c736a32e0b74fd9ff0834bde7b6bMarkus Engel files.o \
5be4458b67cd4fa563753e5f373bb0b01c2d15e0Markus Engel globals.o \
a2e796b608034e2c62290378d713058b8b58ef8fMarkus Engel implicit.o \
2ee985b728402e20092ee821697f4c5117247290Markus Engel macro.o \
5be4458b67cd4fa563753e5f373bb0b01c2d15e0Markus Engel main.o \
81092741e7a5b65552e8224f5cb152a618d54a48Markus Engel misc.o \
11f343b8117dbf56931f537820c2749a8232fec2Liam P. White nse_printdep.o \
5be4458b67cd4fa563753e5f373bb0b01c2d15e0Markus Engel parallel.o \
5be4458b67cd4fa563753e5f373bb0b01c2d15e0Markus Engel pmake.o \
7b1443968fea3c27f050045c4c16820211119099jeff_schiller read.o \
read2.o \
rep.o \
state.o
SRCS=$(OBJS:%.o:$(CMDDIR)/%.cc)
include ../../Makefile.tools
include ../Makefile.com
LDLIBS += ../lib/mksh/libmksh.a ../lib/vroot/libvroot.a
LDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem
CPPFLAGS += -D_FILE_OFFSET_BITS=64
ROOTLINKS = $(ROOTONBLDBINMACH)/dmake
ROOTRULES = $(ROOTONBLDSHARE)/make.rules
all: $(PROG)
install: all $(ROOTONBLDMACHPROG) $(ROOTLINKS) $(ROOTRULES)
$(PROG): $(OBJS)
$(LINK.cc) $(OBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
%.o: $(CMDDIR)/%.cc
$(COMPILE.cc) -o $@ $<
$(ROOTONBLDBINMACH)/dmake:
-$(RM) $@; $(SYMLINK) ./make $@
$(ROOTRULES) := FILEMODE = 0444
$(ROOTONBLDSHARE)/%: $(CMDDIR)/%.file
$(INS.rename)
lint:
clean:
$(RM) $(OBJS)
include $(SRC)/tools/Makefile.targ