1e86c665fSToomas Soome#
2e86c665fSToomas Soome# This file and its contents are supplied under the terms of the
3e86c665fSToomas Soome# Common Development and Distribution License ("CDDL"), version 1.0.
4e86c665fSToomas Soome# You may only use this file in accordance with the terms of version
5e86c665fSToomas Soome# 1.0 of the CDDL.
6e86c665fSToomas Soome#
7e86c665fSToomas Soome# A full copy of the text of the CDDL should have accompanied this
8e86c665fSToomas Soome# source.  A copy of the CDDL is also available via the Internet at
9e86c665fSToomas Soome# http://www.illumos.org/license/CDDL.
10e86c665fSToomas Soome#
11e86c665fSToomas Soome
12e86c665fSToomas Soome#
1310ae99eeSToomas Soome# Copyright 2019 Toomas Soome <tsoome@me.com>
14e86c665fSToomas Soome#
1593b88728SJohn Levon# Copyright (c) 2018, Joyent, Inc.
16e86c665fSToomas Soome
17e86c665fSToomas Soomeinclude		../Makefile.tools
18e86c665fSToomas Soome
19e86c665fSToomas SoomeSOFTCORE=	$(SRC)/common/ficl/softcore
2010ae99eeSToomas SoomeLZ4=		$(SRC)/common/lz4
21e86c665fSToomas SoomePROG=		makesoftcore
22e86c665fSToomas Soome
2310ae99eeSToomas SoomeCSTD=		$(CSTD_GNU99)
2410ae99eeSToomas SoomeCPPFLAGS +=	-I$(SRC)/lib/libficl -I$(SRC)/common/ficl -I$(LZ4)
2510ae99eeSToomas SoomeCPPFLAGS +=	-I../../uts/common
26e86c665fSToomas SoomeOBJS=		makesoftcore.o lz4.o
2710ae99eeSToomas SoomeSRCS=		makesoftcore.c $(LZ4)/lz4.c
28e86c665fSToomas SoomeLDLIBS=		-lumem
29*5801b0f0SToomas SoomeNATIVE_LIBS +=	libumem.so
30e86c665fSToomas Soome
3193b88728SJohn Levon# not linted
3293b88728SJohn LevonSMOFF += all_func_returns
3393b88728SJohn Levon
34e86c665fSToomas Soome.KEEP_STATE:
35e86c665fSToomas Soome
36e86c665fSToomas Soomeall:		$(PROG)
37e86c665fSToomas Soome
38e86c665fSToomas Soomeinstall:	all .WAIT $(ROOTONBLDMACHPROG)
39e86c665fSToomas Soome
40e86c665fSToomas Soomeclean:
41e86c665fSToomas Soome		$(RM) $(PROG) $(OBJS)
42e86c665fSToomas Soome
43e86c665fSToomas Soome$(PROG):	$(OBJS)
44*5801b0f0SToomas Soome		$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
45e86c665fSToomas Soome		$(POST_PROCESS)
46e86c665fSToomas Soome
47e86c665fSToomas Soome%.o:		$(SOFTCORE)/%.c
48e86c665fSToomas Soome		$(COMPILE.c) -o $@ $<
49e86c665fSToomas Soome
5010ae99eeSToomas Soome%.o:		$(LZ4)/%.c
5110ae99eeSToomas Soome		$(COMPILE.c) -o $@ $<
5210ae99eeSToomas Soome
53e86c665fSToomas Soomeinclude		../Makefile.targ
54