xref: /illumos-gate/usr/src/tools/makesoftcore/Makefile (revision c3232c9513a02e659ae9307db0fc93d9730704f6)
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 2019 Toomas Soome <tsoome@me.com>
14#
15# Copyright (c) 2018, Joyent, Inc.
16
17include		../Makefile.tools
18
19SOFTCORE=	$(SRC)/common/ficl/softcore
20LZ4=		$(SRC)/common/lz4
21PROG=		makesoftcore
22
23CSTD=		$(CSTD_GNU99)
24CPPFLAGS +=	-I$(SRC)/lib/libficl -I$(SRC)/common/ficl -I$(LZ4)
25CPPFLAGS +=	-I../../uts/common
26OBJS=		makesoftcore.o lz4.o
27SRCS=		makesoftcore.c $(LZ4)/lz4.c
28LDLIBS=		-lumem
29
30# not linted
31SMOFF += all_func_returns
32
33.KEEP_STATE:
34
35all:		$(PROG)
36
37install:	all .WAIT $(ROOTONBLDMACHPROG)
38
39clean:
40		$(RM) $(PROG) $(OBJS)
41
42$(PROG):	$(OBJS)
43		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
44		$(POST_PROCESS)
45
46%.o:		$(SOFTCORE)/%.c
47		$(COMPILE.c) -o $@ $<
48
49%.o:		$(LZ4)/%.c
50		$(COMPILE.c) -o $@ $<
51
52include		../Makefile.targ
53