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 2006 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 26 # 27 # Common build rules for efcode shared objects. 28 # 29 # For historical reasons, these shared objects aren't explicitly versioned, so 30 # turn off VERS and LIBLINKS (VERS must be cleared before the inclusion of 31 # Makefile.lib, and LIBLINKS must be cleared afterwards). Also, because of 32 # the weird alternate naming scheme, we must define our own symlink macros. 33 # 34 35 VERS = 36 37 include $(SRC)/lib/Makefile.lib 38 39 LIBS = $(DYNLIB) 40 LDLIBS += -lc 41 LIBLINKS = 42 43 MAPFILES = 44 45 CPPFLAGS += -DDEBUG -DFCODE_INTERNAL 46 CPPFLAGS += -I $(SRC)/lib/efcode/include -I $(ROOT)/usr/platform/sun4u/include 47 DYNFLAGS += -R\$$ORIGIN 48 49 CERRWARN += -_gcc=-Wno-unused-variable 50 CERRWARN += -_gcc=-Wno-unused-function 51 CERRWARN += -_gcc=-Wno-unused-value 52 CERRWARN += -_gcc=-Wno-parentheses 53 CERRWARN += -_gcc=-Wno-uninitialized 54 CERRWARN += -_gcc=-Wno-type-limits 55 56 EFCODE64DIR = /usr/lib/efcode/$(MACH64) 57 ROOTLIBDIR = $(ROOT)/usr/lib/efcode 58 ROOTLIBDIR64 = $(ROOT)/usr/lib/efcode/$(MACH64) 59 ROOTSYMLINKS64 = $(SYMLINKS:%=$(ROOTLIBDIR64)/%) 60 61 # 62 # Since a number of efcode shared objects depend on fcode.so, fcdriver.so, and 63 # fcpackage.so, provide macros that expand to their full paths. 64 # 65 FCODE64 = $(ROOTLIBDIR64)/fcode.so 66 FCDRIVER64 = $(ROOTLIBDIR64)/fcdriver.so 67 FCPACKAGE64 = $(ROOTLIBDIR64)/fcpackage.so 68 69 .KEEP_STATE: 70 71 all: $(LIBS) 72 73 lint: lintcheck 74 75 $(ROOTSYMLINKS64): $(ROOTLIBDIR64)/$(DYNLIB) 76 -$(RM) $@; $(SYMLINK) $(DYNLIB) $@ 77 78 include $(SRC)/lib/Makefile.targ