1*174bc649SRobert Mustacchi# 2*174bc649SRobert Mustacchi# This file and its contents are supplied under the terms of the 3*174bc649SRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0. 4*174bc649SRobert Mustacchi# You may only use this file in accordance with the terms of version 5*174bc649SRobert Mustacchi# 1.0 of the CDDL. 6*174bc649SRobert Mustacchi# 7*174bc649SRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this 8*174bc649SRobert Mustacchi# source. A copy of the CDDL is also available via the Internet at 9*174bc649SRobert Mustacchi# http://www.illumos.org/license/CDDL. 10*174bc649SRobert Mustacchi# 11*174bc649SRobert Mustacchi 12*174bc649SRobert Mustacchi# 13*174bc649SRobert Mustacchi# Copyright (c) 2018, Joyent, Inc. 14*174bc649SRobert Mustacchi# 15*174bc649SRobert Mustacchi 16*174bc649SRobert Mustacchiinclude $(SRC)/Makefile.master 17*174bc649SRobert Mustacchi 18*174bc649SRobert MustacchiROOTOPTPKG = $(ROOT)/opt/util-tests 19*174bc649SRobert MustacchiTESTDIR = $(ROOTOPTPKG)/tests/ 20*174bc649SRobert Mustacchi 21*174bc649SRobert MustacchiPROGS = smbios 22*174bc649SRobert Mustacchi 23*174bc649SRobert MustacchiLINTS = $(PROGS:%=%.ln) 24*174bc649SRobert Mustacchi 25*174bc649SRobert Mustacchiinclude $(SRC)/cmd/Makefile.cmd 26*174bc649SRobert Mustacchiinclude $(SRC)/test/Makefile.com 27*174bc649SRobert Mustacchi 28*174bc649SRobert MustacchiCMDS = $(PROGS:%=$(TESTDIR)/%) 29*174bc649SRobert Mustacchi$(CMDS) := FILEMODE = 0555 30*174bc649SRobert Mustacchi 31*174bc649SRobert MustacchiLDLIBS += -lsmbios -lumem 32*174bc649SRobert MustacchiCFLAGS += -_gcc=-Wall -_gcc=-Wextra -_gcc=-Wno-unknown-pragmas 33*174bc649SRobert Mustacchi 34*174bc649SRobert Mustacchiall: $(PROGS) 35*174bc649SRobert Mustacchi 36*174bc649SRobert Mustacchiinstall: all $(CMDS) $(OUTFILES) 37*174bc649SRobert Mustacchi 38*174bc649SRobert Mustacchiclobber: clean 39*174bc649SRobert Mustacchi -$(RM) $(PROGS) $(LINTS) 40*174bc649SRobert Mustacchi 41*174bc649SRobert Mustacchilint: 42*174bc649SRobert Mustacchi 43*174bc649SRobert Mustacchiclean: 44*174bc649SRobert Mustacchi 45*174bc649SRobert Mustacchi$(CMDS): $(TESTDIR) $(PROG) 46*174bc649SRobert Mustacchi 47*174bc649SRobert Mustacchi$(TESTDIR): 48*174bc649SRobert Mustacchi $(INS.dir) 49*174bc649SRobert Mustacchi 50*174bc649SRobert Mustacchi$(TESTDIR)/%: % 51*174bc649SRobert Mustacchi $(INS.file) 52*174bc649SRobert Mustacchi 53*174bc649SRobert Mustacchi%: %.c 54*174bc649SRobert Mustacchi $(LINK.c) -o $@ $< $(LDLIBS) 55*174bc649SRobert Mustacchi $(POST_PROCESS) 56