1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21# 22# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. 23# Copyright 2017 Nexenta Systems, Inc. All rights reserved. 24# Copyright 2019, Joyent, Inc. 25# 26 27PROG= fksmbcl 28 29OBJS_LOCAL = \ 30 fksmbcl_main.o \ 31 fkdev.o \ 32 fknewvc.o \ 33 fkiod_cl.o \ 34 shares.o 35 36OBJS= ${OBJS_LOCAL} 37SRCS= ${OBJS_LOCAL:.o=.c} 38 39include ../../../Makefile.cmd 40include ../../../Makefile.ctf 41 42# Force SOURCEDEBUG 43CSOURCEDEBUGFLAGS = -g 44CCSOURCEDEBUGFLAGS = -g 45STRIP_STABS = : 46 47# Note: need our sys includes _before_ ENVCPPFLAGS, proto etc. 48# Also, like Makefile.uts, reset CPPFLAGS 49# CPPFLAGS.first += -I$(SRC)/lib/libfakekernel/common 50CPPFLAGS.first += -I$(SRC)/lib/smbclnt/libfknsmb/common 51CPPFLAGS= $(CPPFLAGS.first) 52 53INCS += -I$(SRC)/uts/common/fs/smbclnt 54INCS += -I$(SRC)/uts/common 55INCS += -I$(SRC)/common/smbclnt 56INCS += -I$(SRC)/common 57 58# Allow cpp to find libfknsmb.h etc. via 59# include <libfknsmb/common/libfknsmb.h> 60INCS += -I$(SRC)/lib/smbclnt 61INCS += -I$(SRC)/lib/libsmbfs 62INCS += -I$(SRC)/lib/libsmbfs/netsmb 63 64CPPFLAGS += $(INCS) 65CPPFLAGS += -D_REENTRANT 66CPPFLAGS += -D_FILE_OFFSET_BITS=64 67CPPFLAGS += -D_LARGEFILE64_SOURCE=1 68CPPFLAGS += -DFKSMBCL 69# Always want DEBUG here 70CPPFLAGS += -DDEBUG 71 72# needs work 73SMOFF += all_func_returns 74 75CSTD= $(CSTD_GNU99) 76 77CFLAGS += $(CCVERBOSE) 78CFLAGS64 += $(CCVERBOSE) 79 80LDFLAGS += $(ZNOLAZYLOAD) 81LDFLAGS += -R/usr/lib/smbfs 82LDLIBS += -L$(ROOT)/usr/lib/smbfs 83LDLIBS += -lsmbfs -lfksmbfs -lfknsmb 84LDLIBS += -lsocket 85 86ROOTSMBDDIR = $(ROOTLIB)/smbfs 87ROOTSMBDFILE = $(PROG:%=$(ROOTSMBDDIR)/%) 88 89.KEEP_STATE: 90 91all: $(PROG) 92 93$(PROG): $(OBJS) 94 $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS) 95 $(POST_PROCESS) 96 97clean: 98 -$(RM) $(OBJS) 99 100include ../../../Makefile.targ 101 102install: all $(ROOTSMBDFILE) 103 104$(ROOTSMBDDIR)/%: % 105 $(INS.file) 106