Home | History | Annotate | Download | only in efcode
      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 # ident	"%Z%%M%	%I%	%E% SMI"
     26 #
     27 
     28 #
     29 # Common build rules for efcode shared objects.
     30 #
     31 # For historical reasons, these shared objects aren't explicitly versioned, so
     32 # turn off VERS and LIBLINKS (VERS must be cleared before the inclusion of
     33 # Makefile.lib, and LIBLINKS must be cleared afterwards).  Also, because of
     34 # the weird alternate naming scheme, we must define our own symlink macros.
     35 #
     36 
     37 VERS	=
     38 
     39 include $(SRC)/lib/Makefile.lib
     40 
     41 LIBS	= $(DYNLIB)
     42 LDLIBS	+= -lc
     43 LIBLINKS =
     44 
     45 MAPFILES =
     46 
     47 CPPFLAGS += -DDEBUG -DFCODE_INTERNAL
     48 CPPFLAGS += -I $(SRC)/lib/efcode/include -I $(ROOT)/usr/platform/sun4u/include
     49 DYNFLAGS += -R\$$ORIGIN
     50 
     51 EFCODE64DIR = /usr/lib/efcode/$(MACH64)
     52 ROOTLIBDIR = $(ROOT)/usr/lib/efcode
     53 ROOTLIBDIR64 = $(ROOT)/usr/lib/efcode/$(MACH64)
     54 ROOTSYMLINKS64 = $(SYMLINKS:%=$(ROOTLIBDIR64)/%)
     55 
     56 #
     57 # Since a number of efcode shared objects depend on fcode.so, fcdriver.so, and
     58 # fcpackage.so, provide macros that expand to their full paths.
     59 #
     60 FCODE64 = $(ROOTLIBDIR64)/fcode.so
     61 FCDRIVER64 = $(ROOTLIBDIR64)/fcdriver.so
     62 FCPACKAGE64 = $(ROOTLIBDIR64)/fcpackage.so
     63 
     64 .KEEP_STATE:
     65 
     66 all: $(LIBS)
     67 
     68 lint: lintcheck
     69 
     70 $(ROOTSYMLINKS64): $(ROOTLIBDIR64)/$(DYNLIB)
     71 	-$(RM) $@; $(SYMLINK) $(DYNLIB) $@
     72 
     73 include $(SRC)/lib/Makefile.targ
     74