xref: /illumos-gate/usr/src/cmd/make/bin/Makefile (revision ae389aa988ce154c9f8d5d4dbe4a63c3744339f4)
110d63b7dSRichard Lowe#
210d63b7dSRichard Lowe# This file and its contents are supplied under the terms of the
310d63b7dSRichard Lowe# Common Development and Distribution License ("CDDL"), version 1.0.
410d63b7dSRichard Lowe# You may only use this file in accordance with the terms of version
510d63b7dSRichard Lowe# 1.0 of the CDDL.
610d63b7dSRichard Lowe#
710d63b7dSRichard Lowe# A full copy of the text of the CDDL should have accompanied this
810d63b7dSRichard Lowe# source.  A copy of the CDDL is also available via the Internet at
910d63b7dSRichard Lowe# http://www.illumos.org/license/CDDL.
1010d63b7dSRichard Lowe#
1110d63b7dSRichard Lowe
1210d63b7dSRichard Lowe# Copyright 2015, Richard Lowe.
13*8e0c8248SAndrew Stormont# Copyright 2019 RackTop Systems.
1410d63b7dSRichard Lowe
1510d63b7dSRichard LowePROG=	make
1610d63b7dSRichard LowePOFILE=	make.po
1710d63b7dSRichard LoweOBJS=	ar.o		\
1810d63b7dSRichard Lowe	depvar.o	\
1910d63b7dSRichard Lowe	doname.o	\
2010d63b7dSRichard Lowe	dosys.o		\
2110d63b7dSRichard Lowe	files.o		\
2210d63b7dSRichard Lowe	globals.o	\
2310d63b7dSRichard Lowe	implicit.o	\
2410d63b7dSRichard Lowe	macro.o		\
2510d63b7dSRichard Lowe	main.o		\
2610d63b7dSRichard Lowe	misc.o		\
2710d63b7dSRichard Lowe	nse_printdep.o	\
2810d63b7dSRichard Lowe	parallel.o	\
2910d63b7dSRichard Lowe	pmake.o		\
3010d63b7dSRichard Lowe	read.o		\
3110d63b7dSRichard Lowe	read2.o		\
3210d63b7dSRichard Lowe	rep.o		\
3310d63b7dSRichard Lowe	state.o
3410d63b7dSRichard LowePOFILES= $(OBJS:%.o=%.po)
3510d63b7dSRichard Lowe
3610d63b7dSRichard Loweinclude ../../Makefile.cmd
3710d63b7dSRichard Loweinclude ../Makefile.com
3810d63b7dSRichard Lowe
3910d63b7dSRichard LoweLDLIBS += ../lib/mksh/libmksh.a ../lib/vroot/libvroot.a
4010d63b7dSRichard LoweLDLIBS += ../lib/bsd/libbsd.a -lc -lnsl -lumem
4110d63b7dSRichard Lowe
4210d63b7dSRichard LoweCPPFLAGS += -D_FILE_OFFSET_BITS=64
4310d63b7dSRichard Lowe
44*8e0c8248SAndrew StormontCCERRWARN += -_gcc=-Wno-unused-variable
45*8e0c8248SAndrew StormontCCERRWARN += -_gcc=-Wno-switch
46*8e0c8248SAndrew StormontCCERRWARN += -_gcc=-Wno-parentheses
47*8e0c8248SAndrew StormontCCERRWARN += -_gcc=-Wno-unused-function
48*8e0c8248SAndrew StormontCCERRWARN += -_gcc=-Wno-clobbered
49*8e0c8248SAndrew StormontCCERRWARN += -_gcc=-Wno-uninitialized
50*8e0c8248SAndrew Stormont
5110d63b7dSRichard LoweROOTLINKS = $(ROOTCCSBIN)/make $(ROOTXPG4BIN)/make $(ROOTBIN)/dmake $(ROOTCCSLIB)/svr4.make \
5210d63b7dSRichard Lowe	$(ROOTLIB)/svr4.make
5310d63b7dSRichard Lowe
5410d63b7dSRichard LoweROOTRULES = $(ROOTSHLIB)/make/make.rules $(ROOTSHLIB)/make/svr4.make.rules
5510d63b7dSRichard Lowe
5610d63b7dSRichard Loweall:	$(PROG)
5710d63b7dSRichard Lowe
5810d63b7dSRichard Loweinstall: all $(ROOTPROG) $(ROOTLINKS) $(ROOTRULES)
5910d63b7dSRichard Lowe
6010d63b7dSRichard Lowe$(PROG):	$(OBJS)
6110d63b7dSRichard Lowe	$(LINK.cc) $(OBJS) -o $@ $(LDLIBS)
6210d63b7dSRichard Lowe	$(POST_PROCESS)
6310d63b7dSRichard Lowe
6410d63b7dSRichard Lowe$(ROOTCCSBIN)/make:
6510d63b7dSRichard Lowe	-$(RM) $@; $(SYMLINK) ../../bin/make $@
6610d63b7dSRichard Lowe
6710d63b7dSRichard Lowe$(ROOTCCSLIB)/svr4.make:
6810d63b7dSRichard Lowe	-$(RM) $@; $(SYMLINK) ../../bin/make $@
6910d63b7dSRichard Lowe
7010d63b7dSRichard Lowe$(ROOTLIB)/svr4.make:
7110d63b7dSRichard Lowe	-$(RM) $@; $(SYMLINK) ../bin/make $@
7210d63b7dSRichard Lowe
7310d63b7dSRichard Lowe$(ROOTXPG4BIN)/make:
7410d63b7dSRichard Lowe	-$(RM) $@; $(SYMLINK) ../../bin/make $@
7510d63b7dSRichard Lowe
7610d63b7dSRichard Lowe$(ROOTBIN)/dmake:
7710d63b7dSRichard Lowe	-$(RM) $@; $(SYMLINK) ./make $@
7810d63b7dSRichard Lowe
7910d63b7dSRichard Lowe$(ROOTRULES) := FILEMODE = 0444
8010d63b7dSRichard Lowe
8110d63b7dSRichard Lowe$(ROOTRULES): $(ROOTSHLIB)/make
8210d63b7dSRichard Lowe
8310d63b7dSRichard Lowe$(ROOTSHLIB)/make: FRC
8410d63b7dSRichard Lowe	$(INS.dir)
8510d63b7dSRichard Lowe
8610d63b7dSRichard Lowe$(ROOTSHLIB)/make/%: %.file
8710d63b7dSRichard Lowe	$(INS.rename)
8810d63b7dSRichard Lowe
8910d63b7dSRichard Loweclean:
9010d63b7dSRichard Lowe	$(RM) $(OBJS)
9110d63b7dSRichard Lowe
9210d63b7dSRichard LoweFRC:
9310d63b7dSRichard Lowe
9410d63b7dSRichard Loweinclude ../../Makefile.targ
9510d63b7dSRichard Lowe
96