xref: /illumos-gate/usr/src/test/util-tests/tests/smbios/Makefile (revision 176a9270a1856e0e2fddcbc3c7d35aa1f750c6b9)
11566bc34SRobert Mustacchi#
21566bc34SRobert Mustacchi# This file and its contents are supplied under the terms of the
31566bc34SRobert Mustacchi# Common Development and Distribution License ("CDDL"), version 1.0.
41566bc34SRobert Mustacchi# You may only use this file in accordance with the terms of version
51566bc34SRobert Mustacchi# 1.0 of the CDDL.
61566bc34SRobert Mustacchi#
71566bc34SRobert Mustacchi# A full copy of the text of the CDDL should have accompanied this
81566bc34SRobert Mustacchi# source.  A copy of the CDDL is also available via the Internet at
91566bc34SRobert Mustacchi# http://www.illumos.org/license/CDDL.
101566bc34SRobert Mustacchi#
111566bc34SRobert Mustacchi
121566bc34SRobert Mustacchi#
131566bc34SRobert Mustacchi# Copyright (c) 2018, Joyent, Inc.
141566bc34SRobert Mustacchi#
151566bc34SRobert Mustacchi
161566bc34SRobert Mustacchiinclude $(SRC)/Makefile.master
171566bc34SRobert Mustacchi
181566bc34SRobert MustacchiROOTOPTPKG = $(ROOT)/opt/util-tests
191566bc34SRobert MustacchiTESTDIR = $(ROOTOPTPKG)/tests/
201566bc34SRobert Mustacchi
21*176a9270SRobert MustacchiOBJS =	smbios.o \
22*176a9270SRobert Mustacchi	smbios_test_errors.o \
23*176a9270SRobert Mustacchi	smbios_test_memdevice.o \
24*176a9270SRobert Mustacchi	smbios_test_pinfo.o \
25*176a9270SRobert Mustacchi	smbios_test_slot.o
261566bc34SRobert MustacchiPROGS = smbios
271566bc34SRobert Mustacchi
281566bc34SRobert Mustacchiinclude $(SRC)/cmd/Makefile.cmd
291566bc34SRobert Mustacchiinclude $(SRC)/test/Makefile.com
301566bc34SRobert Mustacchi
311566bc34SRobert MustacchiCMDS = $(PROGS:%=$(TESTDIR)/%)
321566bc34SRobert Mustacchi$(CMDS) := FILEMODE = 0555
331566bc34SRobert Mustacchi
341566bc34SRobert MustacchiLDLIBS += -lsmbios -lumem
351566bc34SRobert MustacchiCFLAGS += -_gcc=-Wall -_gcc=-Wextra -_gcc=-Wno-unknown-pragmas
361566bc34SRobert Mustacchi
371566bc34SRobert Mustacchiall: $(PROGS)
381566bc34SRobert Mustacchi
39*176a9270SRobert Mustacchiinstall: all $(CMDS)
401566bc34SRobert Mustacchi
411566bc34SRobert Mustacchiclobber: clean
42*176a9270SRobert Mustacchi	-$(RM) $(PROGS)
431566bc34SRobert Mustacchi
441566bc34SRobert Mustacchiclean:
45*176a9270SRobert Mustacchi	-$(RM) $(OBJS)
461566bc34SRobert Mustacchi
47*176a9270SRobert Mustacchi$(CMDS): $(TESTDIR) $(PROGS)
481566bc34SRobert Mustacchi
491566bc34SRobert Mustacchi$(TESTDIR):
501566bc34SRobert Mustacchi	$(INS.dir)
511566bc34SRobert Mustacchi
521566bc34SRobert Mustacchi$(TESTDIR)/%: %
531566bc34SRobert Mustacchi	$(INS.file)
541566bc34SRobert Mustacchi
55*176a9270SRobert Mustacchi$(PROGS): $(OBJS)
56*176a9270SRobert Mustacchi	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
571566bc34SRobert Mustacchi	$(POST_PROCESS)
58