xref: /illumos-gate/usr/src/tools/makesoftcore/Makefile (revision 689b9301078f0c35c7f198fcee8032a0d30eff3a)
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
29NATIVE_LIBS +=	libumem.so
30
31# not linted
32SMOFF += all_func_returns
33
34.KEEP_STATE:
35
36all:		$(PROG)
37
38install:	all .WAIT $(ROOTONBLDMACHPROG)
39
40clean:
41		$(RM) $(PROG) $(OBJS)
42
43$(PROG):	$(OBJS)
44		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
45		$(POST_PROCESS)
46
47%.o:		$(SOFTCORE)/%.c
48		$(COMPILE.c) -o $@ $<
49
50%.o:		$(LZ4)/%.c
51		$(COMPILE.c) -o $@ $<
52
53include		../Makefile.targ
54