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 (c) 2012, 2016 by Delphix. All rights reserved. 14# Copyright 2022 Tintri by DDN, Inc. All rights reserved. 15# 16include $(SRC)/cmd/Makefile.cmd 17include $(SRC)/test/Makefile.com 18 19PROG = large_sids_lib large_sids_kern 20KERN_OBJS = smb_sid.o 21 22large_sids_lib := LDLIBS += -L$(ROOT)/usr/lib/smbsrv -lsmb 23large_sids_lib := LDFLAGS += -R/usr/lib/smbsrv 24large_sids_kern := LDLIBS64 += -lfakekernel 25 26smb_sid.o := CPPFLAGS.first += -I $(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL 27 28ROOTOPTPKG = $(ROOT)/opt/smbsrv-tests 29TESTDIR = $(ROOTOPTPKG)/tests/smb_sid 30 31CMDS = $(PROG:%=$(TESTDIR)/%) 32$(CMDS) := FILEMODE = 0555 33 34CSTD = $(CSTD_GNU99) 35 36all: $(PROG) 37 38$(TESTDIR): 39 $(INS.dir) 40 41$(TESTDIR)/%: % 42 $(INS.file) 43 44%_lib: %.c 45 $(LINK.c) -o $@ $< $(LDLIBS) 46 $(POST_PROCESS) 47 48%_kern: %.c $(KERN_OBJS) 49 $(LINK64.c) -o $@ $^ $(LDLIBS64) 50 $(POST_PROCESS) 51 52smb_sid.c: $(SRC)/common/smbsrv/smb_sid.c 53 $(CP) $^ $@ 54 55%.o: %.c 56 $(COMPILE64.c) $< 57 58install: all $(CMDS) 59 60clobber: clean 61 -$(RM) $(PROG) 62 63clean: 64 -$(RM) $(KERN_OBJS) 65 66$(CMDS): $(TESTDIR) $(PROG) 67