xref: /illumos-gate/usr/src/cmd/i2cadm/Makefile (revision 32002227574cf0a435dc03de622191ca53724f0a)
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 2025 Oxide Computer Company
14#
15
16PROG= i2cadm
17OBJS =	i2cadm.o \
18	i2cadm_controller.o \
19	i2cadm_device.o \
20	i2cadm_io.o \
21	i2cadm_mux.o \
22	i2cadm_port.o \
23	i2cadm_scan.o \
24	$(HEXDUMP_OBJS)
25
26include ../Makefile.cmd
27include ../Makefile.cmd.64
28include ../Makefile.ctf
29include $(SRC)/common/hexdump/Makefile.com
30
31CFLAGS += $(CCVERBOSE)
32CSTD = $(CSTD_GNU17)
33LDLIBS += -li2c -ldevinfo -lofmt
34CTF_MODE = link
35
36.KEEP_STATE:
37
38$(PROG): $(OBJS)
39	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
40	$(POST_PROCESS)
41
42all: $(PROG)
43
44install: all $(ROOTUSRSBINPROG)
45
46clean:
47	$(RM) $(OBJS)
48
49include $(SRC)/common/hexdump/Makefile.targ
50include ../Makefile.targ
51