16449 Want smbios additional information (Type 40) decoding
[illumos-gate.git] / usr / src / test / util-tests / tests / smbios / Makefile
blob530af0f56b39543c3cdf6aa5db8ab8ce3ba5cc1f
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.
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.
13 # Copyright (c) 2018, Joyent, Inc.
14 # Copyright 2024 Oxide Computer Company
17 include $(SRC)/Makefile.master
19 ROOTOPTPKG = $(ROOT)/opt/util-tests
20 TESTDIR = $(ROOTOPTPKG)/tests/
22 OBJS = smbios.o \
23 smbios_test_addinfo.o \
24 smbios_test_chassis.o \
25 smbios_test_errors.o \
26 smbios_test_extmemdevice.o \
27 smbios_test_fwinfo.o \
28 smbios_test_memdevice.o \
29 smbios_test_proc.o \
30 smbios_test_pinfo.o \
31 smbios_test_slot.o \
32 smbios_test_strings.o \
33 smbios_test_strprop.o
34 PROGS = smbios
36 include $(SRC)/cmd/Makefile.cmd
37 include $(SRC)/test/Makefile.com
39 CMDS = $(PROGS:%=$(TESTDIR)/%)
40 $(CMDS) := FILEMODE = 0555
41 CSTD = $(GNU_C99)
44 # Since this program uses quite a number of variables declared on the
45 # stack that are then written to by libsmbios, we opt to pay the cost
46 # of always have the stack protector on every function as an additional
47 # means of checking ourselves.
49 STACKPROTECT = all
51 LDLIBS += -lsmbios -lumem
52 CFLAGS += -_gcc=-Wall -_gcc=-Wextra -_gcc=-Wno-unknown-pragmas
54 all: $(PROGS)
56 install: all $(CMDS)
58 clobber: clean
59 -$(RM) $(PROGS)
61 clean:
62 -$(RM) $(OBJS)
64 $(CMDS): $(TESTDIR) $(PROGS)
66 $(TESTDIR):
67 $(INS.dir)
69 $(TESTDIR)/%: %
70 $(INS.file)
72 $(PROGS): $(OBJS)
73 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
74 $(POST_PROCESS)