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 2026 Oxide Computer Company 14# 15 16PROG= pcieadm 17 18include ../Makefile.cmd 19include ../Makefile.cmd.64 20include ../Makefile.ctf 21 22CFLAGS += $(CCVERBOSE) 23CSTD = $(CSTD_GNU17) 24LDLIBS += -ldevinfo -lpcidb -lofmt 25OBJS = \ 26 pcieadm.o \ 27 pcieadm_bar.o \ 28 pcieadm_cfgspace.o \ 29 pcieadm_devs.o \ 30 bitext.o 31ROOTCMDDIR = $(ROOTLIB)/pci 32 33.KEEP_STATE: 34 35$(PROG): $(OBJS) 36 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 37 $(POST_PROCESS) 38 39%.o: %.c 40 $(COMPILE.c) $< 41 $(POST_PROCESS_O) 42 43%.o: $(SRC)/common/bitext/%.c 44 $(COMPILE.c) $< 45 $(POST_PROCESS_O) 46 47all: $(PROG) 48 49install: all $(ROOTCMD) 50 51clean: 52 $(RM) $(OBJS) 53 54include ../Makefile.targ 55