xref: /illumos-gate/usr/src/cmd/make/bin/Makefile (revision eef4f27b270242808b43b4b23bd161df52839361)
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
15POFILE=	make.po
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
33POFILES= $(OBJS:%.o=%.po)
34
35include ../../Makefile.cmd
36include ../Makefile.com
37
38LDLIBS += ../lib/mksh/libmksh.a ../lib/vroot/libvroot.a
39LDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem
40
41CPPFLAGS += -D_FILE_OFFSET_BITS=64
42
43ROOTLINKS = $(ROOTCCSBIN)/make $(ROOTXPG4BIN)/make $(ROOTBIN)/dmake $(ROOTCCSLIB)/svr4.make \
44	$(ROOTLIB)/svr4.make
45
46ROOTRULES = $(ROOTSHLIB)/make/make.rules $(ROOTSHLIB)/make/svr4.make.rules
47
48all:	$(PROG)
49
50install: all $(ROOTPROG) $(ROOTLINKS) $(ROOTRULES)
51
52$(PROG):	$(OBJS)
53	$(LINK.cc) $(OBJS) -o $@ $(LDLIBS)
54	$(POST_PROCESS)
55
56$(ROOTCCSBIN)/make:
57	-$(RM) $@; $(SYMLINK) ../../bin/make $@
58
59$(ROOTCCSLIB)/svr4.make:
60	-$(RM) $@; $(SYMLINK) ../../bin/make $@
61
62$(ROOTLIB)/svr4.make:
63	-$(RM) $@; $(SYMLINK) ../bin/make $@
64
65$(ROOTXPG4BIN)/make:
66	-$(RM) $@; $(SYMLINK) ../../bin/make $@
67
68$(ROOTBIN)/dmake:
69	-$(RM) $@; $(SYMLINK) ./make $@
70
71$(ROOTRULES) := FILEMODE = 0444
72
73$(ROOTRULES): $(ROOTSHLIB)/make
74
75$(ROOTSHLIB)/make: FRC
76	$(INS.dir)
77
78$(ROOTSHLIB)/make/%: %.file
79	$(INS.rename)
80
81lint:
82
83clean:
84	$(RM) $(OBJS)
85
86FRC:
87
88include ../../Makefile.targ
89
90