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# Copyright 2024 Oxide Computer Company 15# Copyright 2022 Tintri by DDN, Inc. All rights reserved. 16# 17 18 19PROG= nvmeadm 20 21OBJS= nvme_version.o \ 22 nvmeadm.o \ 23 nvmeadm_ofmt.o \ 24 nvmeadm_print.o \ 25 nvmeadm_wdc.o \ 26 $(HEXDUMP_OBJS) 27 28include ../Makefile.cmd 29include ../Makefile.cmd.64 30include ../Makefile.ctf 31include $(SRC)/common/hexdump/Makefile.com 32 33.KEEP_STATE: 34 35CPPFLAGS += -I$(SRC)/uts/common/io/nvme -I$(SRC)/common/nvme 36LDLIBS += -ldevinfo -lofmt -lcmdutils -lnvme 37CSTD= $(CSTD_GNU99) 38CTF_MODE= link 39 40# 41# nvme_print_uint128() uses VLAs which understandably confuses smatch. 42# It should probably be rewritten so we can smatch the file. 43# 44nvmeadm_print.o := SMATCH=off 45 46all: $(PROG) 47 48$(PROG): $(OBJS) 49 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 50 $(POST_PROCESS) 51 52%.o: %.c 53 $(COMPILE.c) $< 54 $(POST_PROCESS_O) 55 56%.o: $(SRC)/common/nvme/%.c 57 $(COMPILE.c) $< 58 $(POST_PROCESS_O) 59 60install: all $(ROOTUSRSBINPROG) 61 62clean: 63 $(RM) $(OBJS) $(PROG) 64 65lint: lint_SRCS 66 67include $(SRC)/common/hexdump/Makefile.targ 68include ../Makefile.targ 69