xref: /titanic_41/usr/src/tools/make/bin/Makefile (revision 3625efb1376c3d31a0e742ed72b778e5b3add543)
1*3625efb1SRichard Lowe#
2*3625efb1SRichard Lowe# This file and its contents are supplied under the terms of the
3*3625efb1SRichard Lowe# Common Development and Distribution License ("CDDL"), version 1.0.
4*3625efb1SRichard Lowe# You may only use this file in accordance with the terms of version
5*3625efb1SRichard Lowe# 1.0 of the CDDL.
6*3625efb1SRichard Lowe#
7*3625efb1SRichard Lowe# A full copy of the text of the CDDL should have accompanied this
8*3625efb1SRichard Lowe# source.  A copy of the CDDL is also available via the Internet at
9*3625efb1SRichard Lowe# http://www.illumos.org/license/CDDL.
10*3625efb1SRichard Lowe#
11*3625efb1SRichard Lowe
12*3625efb1SRichard Lowe# Copyright 2015, Richard Lowe.
13*3625efb1SRichard Lowe
14*3625efb1SRichard LowePROG=	make
15*3625efb1SRichard LoweCMDDIR=	$(SRC)/cmd/make/bin
16*3625efb1SRichard LoweOBJS=	ar.o		\
17*3625efb1SRichard Lowe	depvar.o	\
18*3625efb1SRichard Lowe	doname.o	\
19*3625efb1SRichard Lowe	dosys.o		\
20*3625efb1SRichard Lowe	files.o		\
21*3625efb1SRichard Lowe	globals.o	\
22*3625efb1SRichard Lowe	implicit.o	\
23*3625efb1SRichard Lowe	macro.o		\
24*3625efb1SRichard Lowe	main.o		\
25*3625efb1SRichard Lowe	misc.o		\
26*3625efb1SRichard Lowe	nse_printdep.o	\
27*3625efb1SRichard Lowe	parallel.o	\
28*3625efb1SRichard Lowe	pmake.o		\
29*3625efb1SRichard Lowe	read.o		\
30*3625efb1SRichard Lowe	read2.o		\
31*3625efb1SRichard Lowe	rep.o		\
32*3625efb1SRichard Lowe	state.o
33*3625efb1SRichard LoweSRCS=$(OBJS:%.o:$(CMDDIR)/%.cc)
34*3625efb1SRichard Lowe
35*3625efb1SRichard Loweinclude ../../Makefile.tools
36*3625efb1SRichard Loweinclude ../Makefile.com
37*3625efb1SRichard Lowe
38*3625efb1SRichard LoweLDLIBS += ../lib/mksh/libmksh.a ../lib/vroot/libvroot.a
39*3625efb1SRichard LoweLDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem
40*3625efb1SRichard Lowe
41*3625efb1SRichard LoweCPPFLAGS += -D_FILE_OFFSET_BITS=64
42*3625efb1SRichard Lowe
43*3625efb1SRichard LoweROOTLINKS = $(ROOTONBLDBINMACH)/dmake
44*3625efb1SRichard LoweROOTRULES = $(ROOTONBLDSHARE)/make.rules
45*3625efb1SRichard Lowe
46*3625efb1SRichard Loweall:	$(PROG)
47*3625efb1SRichard Lowe
48*3625efb1SRichard Loweinstall: all $(ROOTONBLDMACHPROG) $(ROOTLINKS) $(ROOTRULES)
49*3625efb1SRichard Lowe
50*3625efb1SRichard Lowe$(PROG):	$(OBJS)
51*3625efb1SRichard Lowe	$(LINK.cc) $(OBJS) -o $@ $(LDLIBS)
52*3625efb1SRichard Lowe	$(POST_PROCESS)
53*3625efb1SRichard Lowe
54*3625efb1SRichard Lowe%.o:	$(CMDDIR)/%.cc
55*3625efb1SRichard Lowe	$(COMPILE.cc) -o $@ $<
56*3625efb1SRichard Lowe
57*3625efb1SRichard Lowe$(ROOTONBLDBINMACH)/dmake:
58*3625efb1SRichard Lowe	-$(RM) $@; $(SYMLINK) ./make $@
59*3625efb1SRichard Lowe
60*3625efb1SRichard Lowe$(ROOTRULES) := FILEMODE = 0444
61*3625efb1SRichard Lowe
62*3625efb1SRichard Lowe$(ROOTONBLDSHARE)/%: $(CMDDIR)/%.file
63*3625efb1SRichard Lowe	$(INS.rename)
64*3625efb1SRichard Lowe
65*3625efb1SRichard Lowe
66*3625efb1SRichard Lowelint:
67*3625efb1SRichard Lowe
68*3625efb1SRichard Loweclean:
69*3625efb1SRichard Lowe	$(RM) $(OBJS)
70*3625efb1SRichard Lowe
71*3625efb1SRichard Loweinclude $(SRC)/tools/Makefile.targ
72*3625efb1SRichard Lowe
73