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# 13# Copyright (c) 2018, Joyent, Inc. 14# 15 16include $(SRC)/Makefile.master 17 18ROOTOPTPKG = $(ROOT)/opt/util-tests 19TESTDIR = $(ROOTOPTPKG)/tests/ 20 21OBJS = smbios.o \ 22 smbios_test_errors.o \ 23 smbios_test_memdevice.o \ 24 smbios_test_pinfo.o \ 25 smbios_test_slot.o 26PROGS = smbios 27 28include $(SRC)/cmd/Makefile.cmd 29include $(SRC)/test/Makefile.com 30 31CMDS = $(PROGS:%=$(TESTDIR)/%) 32$(CMDS) := FILEMODE = 0555 33 34LDLIBS += -lsmbios -lumem 35CFLAGS += -_gcc=-Wall -_gcc=-Wextra -_gcc=-Wno-unknown-pragmas 36 37all: $(PROGS) 38 39install: all $(CMDS) 40 41clobber: clean 42 -$(RM) $(PROGS) 43 44clean: 45 -$(RM) $(OBJS) 46 47$(CMDS): $(TESTDIR) $(PROGS) 48 49$(TESTDIR): 50 $(INS.dir) 51 52$(TESTDIR)/%: % 53 $(INS.file) 54 55$(PROGS): $(OBJS) 56 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 57 $(POST_PROCESS) 58