xref: /illumos-gate/usr/src/cmd/sgs/elfcap.chk/Makefile (revision 56726c7e321b6e5ecb2f10215f5386016547e68c)
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 2022 Oxide Computer Company
14#
15
16PROG	= elfcap.chk
17OBJS	= elfcap_chk.o elfcap.o
18
19include	$(SRC)/Makefile.master
20include	$(SRC)/Makefile.master.64
21include ../Makefile.com
22
23CSTD =		$(GNU_C99)
24NATIVE_LIBS +=	libc.so
25CPPFLAGS =	$(CPPFLAGS.native)
26CFLAGS =	$(NATIVE_CFLAGS)
27CC =		$(NATIVECC)
28LDCHECKS =
29
30CPPFLAGS += -I$(ELFCAP)
31
32all: $(PROG)
33
34install:
35
36check: $(PROG)
37	./$(PROG)
38
39$(PROG): $(OBJS)
40	$(LINK.c) -o $@ $(OBJS)
41	$(POST_PROCESS)
42
43%.o: %.c
44	$(COMPILE.c) $<
45
46%.o: $(ELFCAP)/%.c
47	$(COMPILE.c) $<
48
49clean:
50	$(RM) $(OBJS)
51
52clobber: clean
53	$(RM) $(PROG)
54