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