1b819cea2SGordon Ross# 2b819cea2SGordon Ross# This file and its contents are supplied under the terms of the 3b819cea2SGordon Ross# Common Development and Distribution License ("CDDL"), version 1.0. 4b819cea2SGordon Ross# You may only use this file in accordance with the terms of version 5b819cea2SGordon Ross# 1.0 of the CDDL. 6b819cea2SGordon Ross# 7b819cea2SGordon Ross# A full copy of the text of the CDDL should have accompanied this 8b819cea2SGordon Ross# source. A copy of the CDDL is also available via the Internet at 9b819cea2SGordon Ross# http://www.illumos.org/license/CDDL. 10b819cea2SGordon Ross# 11b819cea2SGordon Ross 12b819cea2SGordon Ross# 13*f37b3cbbSMatt Barden# Copyright 2020 Tintri by DDN, Inc. All rights reserved. 14f06dce2cSAndrew Stormont# Copyright 2017 RackTop Systems. 15b819cea2SGordon Ross# 16b819cea2SGordon Ross 17b819cea2SGordon RossLIBRARY = libfakekernel.a 18b819cea2SGordon RossVERS = .1 19b819cea2SGordon Ross 20b819cea2SGordon RossCOBJS = \ 218f70e16bSGordon Ross callout.o \ 22b819cea2SGordon Ross clock.o \ 23b819cea2SGordon Ross cond.o \ 24b819cea2SGordon Ross copy.o \ 25f06dce2cSAndrew Stormont cred.o \ 26f06dce2cSAndrew Stormont cyclic.o \ 27b819cea2SGordon Ross kiconv.o \ 28b819cea2SGordon Ross kmem.o \ 29b819cea2SGordon Ross kmisc.o \ 30b819cea2SGordon Ross ksocket.o \ 31b819cea2SGordon Ross kstat.o \ 32b819cea2SGordon Ross mutex.o \ 33b819cea2SGordon Ross printf.o \ 34b819cea2SGordon Ross random.o \ 35b819cea2SGordon Ross rwlock.o \ 36b819cea2SGordon Ross sema.o \ 37*f37b3cbbSMatt Barden sid.o \ 38f06dce2cSAndrew Stormont strext.o \ 39b819cea2SGordon Ross taskq.o \ 40b819cea2SGordon Ross thread.o \ 41b819cea2SGordon Ross uio.o 42b819cea2SGordon Ross 43b819cea2SGordon RossOBJECTS= $(COBJS) 44b819cea2SGordon Ross 45b819cea2SGordon Rossinclude ../../Makefile.lib 46b819cea2SGordon Ross 47f06dce2cSAndrew Stormont# libfakekernel must be installed in the root filesystem for libzpool 48f06dce2cSAndrew Stormontinclude ../../Makefile.rootfs 49f06dce2cSAndrew Stormont 50b819cea2SGordon RossSRCDIR= ../common 51b819cea2SGordon Ross 52241c90a0SRichard LoweLIBS = $(DYNLIB) 53b819cea2SGordon RossSRCS= $(COBJS:%.o=$(SRCDIR)/%.c) 54b819cea2SGordon Ross 55bd0ce624SYuri PankovCSTD = $(CSTD_GNU99) 56b819cea2SGordon Ross 578329232eSGordon RossCFLAGS += $(CCVERBOSE) 588329232eSGordon Ross 59b819cea2SGordon Ross# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc. 608329232eSGordon Ross# Also Note: intentionally override CPPFLAGS, not += 61b819cea2SGordon RossCPPFLAGS.first += -I../common 628329232eSGordon RossCPPFLAGS= $(CPPFLAGS.first) 638329232eSGordon Ross 64*f37b3cbbSMatt BardenINCS += -I$(SRC)/uts/common -I $(SRC)/common -I$(ROOT)/usr/include 65b819cea2SGordon Ross 66b819cea2SGordon RossCPPFLAGS += $(INCS) -D_REENTRANT -D_FAKE_KERNEL 67b819cea2SGordon RossCPPFLAGS += -D_FILE_OFFSET_BITS=64 68b819cea2SGordon Ross 69b819cea2SGordon Ross# Could make this $(NOT_RELEASE_BUILD) but as the main purpose of 70b819cea2SGordon Ross# this library is for debugging, let's always define DEBUG here. 71b819cea2SGordon RossCPPFLAGS += -DDEBUG 72b819cea2SGordon Ross 738222814eSRichard Lowe# libfakekernel isn't delivered, and is a special case, disable global data 748222814eSRichard Lowe# complaints 758222814eSRichard LoweZGUIDANCE= -Wl,-zguidance=noasserts 768222814eSRichard Lowe 77*f37b3cbbSMatt BardenLDLIBS += -lumem -lcryptoutil -lsocket -lc -lavl 78b819cea2SGordon Ross 79b819cea2SGordon Ross.KEEP_STATE: 80b819cea2SGordon Ross 81b819cea2SGordon Rossall: $(LIBS) 82b819cea2SGordon Ross 83*f37b3cbbSMatt Barden$(SRCDIR)/sid.c: $(SRC)/uts/common/os/sid.c 84*f37b3cbbSMatt Barden $(CP) $^ $@ 85b819cea2SGordon Ross 86b819cea2SGordon Rossinclude ../../Makefile.targ 87