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 by Delphix. All rights reserved. 14# 15 16SUBDIRS = poll sigqueue spoof-ras 17 18PROGS = \ 19 odirectory 20 21CPPFLAGS += -D_REENTRANT 22PROGS32 = $(PROGS:%=%.32) 23PROGS64 = $(PROGS:%=%.64) 24 25ROOTOPTDIR = $(ROOT)/opt/os-tests/tests 26ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \ 27 $(PROGS64:%=$(ROOTOPTDIR)/%) \ 28 $(SCRIPTS:%=$(ROOTOPTDIR)/%) 29 30odirectory.32 := LDLIBS += -lsocket 31odirectory.64 := LDLIBS64 += -lsocket 32 33include $(SRC)/cmd/Makefile.cmd 34 35all := TARGET = all 36install := TARGET = install 37clean := TARGET = clean 38clobber := TARGET = clobber 39 40.KEEP_STATE: 41 42install: $(SUBDIRS) $(ROOTOPTPROGS) 43 44all: $(SUBDIRS) $(PROGS32) $(PROGS64) 45 46clean: $(SUBDIRS) 47 48$(ROOTOPTPROGS): $(PROGS32) $(PROGS64) $(ROOTOPTDIR) 49 50$(ROOTOPTDIR): 51 $(INS.dir) 52 53$(ROOTOPTDIR)/%: % 54 $(INS.file) 55 56$(ROOTOPTDIR)/%: %.ksh 57 $(INS.rename) 58 59%.64: %.c 60 $(LINK64.c) -o $@ $< $(LDLIBS64) 61 $(POST_PROCESS) 62 63%.32: %.c 64 $(LINK.c) -o $@ $< $(LDLIBS) 65 $(POST_PROCESS) 66 67clobber: $(SUBDIRS) 68 $(RM) $(PROGS32) $(PROGS64) 69 70$(SUBDIRS): FRC 71 @cd $@; pwd; $(MAKE) $(TARGET) 72 73FRC: 74