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 src/sun_nws/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 src/sun_nws/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 2008 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 #ident "@(#)Makefile 1.13 08/07/01 SMI" 26 # 27 # src/sun_nws/liba5k/Makefile 28 # 29 30 include ../Makefile.config 31 include ../Makefile.libs 32 33 NAME = liba5k.a 34 VERS = .2 35 36 #MODULE = $(NAME)$(VERS) 37 38 DYNLIB = $(NAME:.a=.so$(VERS)) 39 LIBLINKS = $(NAME:.a=.so) 40 LIBNAME = $(NAME:lib%.a=%) 41 42 MODULE = $(DYNLIB) 43 44 STAGING32 = $(PROTO_ROOT)/lib 45 sparc_STAGING64 = $(STAGING32)/sparcv9 46 i386_STAGING64 = $(STAGING32)/amd64 47 STAGING64 = $($(MACH)_STAGING64) 48 49 GENCAT_NAME = a5k_g_fc_i18n_cat 50 GENCAT_COMMON_DIR= $(COM_OBJ)/$(OBJ32) 51 GENMSG_LIB = $(OBJ32)/$(NAME).msg 52 LUXGENCAT = $(LCMESSAGES)/$(GENCAT_NAME) 53 54 MODULE_PKGS = SUNWluxop 55 MODULE_PKGS += SUNWluxop 56 57 PKG_PROJ_DEPENDS = libg_fc 58 PKG_PROJ_DEPENDS += luxadm 59 60 MODULE_SRC = diag.c 61 MODULE_SRC += lhot.c 62 MODULE_SRC += mon.c 63 64 MODULE_OBJ_32 = $(MODULE_SRC:%.c=$(OBJ32)/%.o) 65 MODULE_OBJ_64 = $(MODULE_SRC:%.c=$(OBJ64)/%.o) 66 67 BINARY32 = $(OBJ32)/$(MODULE) 68 $(BUILD64)BINARY64 = $(OBJ64)/$(MODULE) 69 BINARIES = $(BINARY32) $(BINARY64) 70 71 MAPDIR = $(SRC_DIR) 72 MAPFILE = $(MAPDIR)/mapfile 73 74 LIBS = $(DYNLIB) 75 76 DYNFLAGS += -M $(MAPFILE) 77 78 COMMON_INCLUDES += -I$(COM_INC) 79 COMMON_INCLUDES += -I$(MOD_INC_LIBG_FC) 80 COMMON_INCLUDES += -I$(COM_INC_FC) 81 COMMON_INCLUDES += -I$(COMMON_FC_IMPL_HDRS_DIR) 82 83 LDLIBS = -lc 84 LDLIBS += -lg_fc 85 LDLIBS += -ldevice 86 87 LDLIBS32 = -L$(LIBG_FC_32) 88 LDLIBS32 += -L$(ON_LIB_32) 89 LDLIBS32 += -R$(OS_LIB_32) 90 LDLIBS32 += $(LDLIBS) 91 92 LDLIBS64 = -L$(LIBG_FC_64) 93 LDLIBS64 += -L$(ON_LIB_64) 94 LDLIBS64 += -R$(OS_LIB_64) 95 LDLIBS64 += $(LDLIBS) 96 97 LINT_TARGETS = lib_lint32 98 $(BUILD64)LINT_TARGETS += .WAIT 99 $(BUILD64)LINT_TARGETS += lib_lint64 100 101 102 sparc_C_PICFLAGS = -K PIC 103 i386_C_PICFLAGS = -K pic 104 105 # Handle creating our directories when needed 106 DIRS += $(LCMESSAGES) 107 DIRS += $(GENCAT_COMMON_DIR) 108 109 sparc_ALLPREQ = libg_fc 110 111 ALLPREQ = $($(MACH)_ALLPREQ) 112 ALLPREQ += $(OBJ32) 113 $(BUILD64)ALLPREQ += $(OBJ64) 114 ALLPREQ += .WAIT 115 ALLPREQ += $(BINARIES) 116 ALLPREQ += .WAIT 117 ALLPREQ += $(OBJ32)/$(LIBLINKS) 118 $(BUILD64)ALLPREQ += $(OBJ64)/$(LIBLINKS) 119 120 INSTALLPREQ = all 121 INSTALLPREQ += .WAIT 122 INSTALLPREQ += $(STAGING32) 123 $(BUILD64)INSTALLPREQ += $(STAGING64) 124 INSTALLPREQ += $(LCMESSAGES) 125 INSTALLPREQ += $(GENCAT_COMMON_DIR) 126 INSTALLPREQ += .WAIT 127 INSTALLPREQ += $(STAGING32)/$(MODULE) 128 INSTALLPREQ += $(STAGING32)/$(LIBLINKS) 129 $(BUILD64)INSTALLPREQ += $(STAGING64)/$(MODULE) 130 $(BUILD64)INSTALLPREQ += $(STAGING64)/$(LIBLINKS) 131 INSTALLPREQ += $(LUXGENCAT) 132 133 PKGPREQ = install 134 PKGPREQ += .WAIT 135 PKGPREQ += $(PKG_PROJ_DEPENDS:%=%_installed) 136 PKGPREQ += $(PKGAREA) 137 PKGPREQ += .WAIT 138 PKGPREQ += $(PKGAREA)/SUNWluxop 139 PKGPREQ += $(PKGAREA)/SUNWluxopr 140 141 CLEANFILES = $(MODULE_OBJ_32) 142 CLEANFILES += $(MODULE_OBJ_64) 143 144 CLOBBERFILES = 145 CLOBBERFILES += $(GENCAT_COMMON_DIR)/$(GENCAT_NAME) 146 CLOBBERFILES += $(MOD_LINT_LIB) 147 148 NUKEFILES = $(CLOBBERFILES) 149 NUKEFILES += $(STAGING32)/$(MODULE) 150 NUKEFILES += $(STAGING32)/$(LIBLINKS) 151 NUKEFILES += $(STAGING64)/$(MODULE) 152 NUKEFILES += $(STAGING64)/$(LIBLINKS) 153 NUKEFILES += $(LUXGENCAT) 154 NUKEFILES += $(MODULE_PKGS:%=$(PKGAREA)/%) 155 156 include ../Makefile.common 157 158 $(MODULE_OBJ_64):= SPARC64_CFLAGS += -xregs=no%appl 159 $(MODULE_OBJ_64):= SPARC64_CFLAGS += $(sparc_C_PICFLAGS) 160 161 COMPILE.cpp = $(CC) -E -C $(CFLAGS32) $(CPPFLAGS32) $(INCLUDES) 162 163 $(GENMSG_LIB): $(MODULE_SRC:%=$(SRC_DIR)/%) 164 genmsg -d -p '$(COMPILE.cpp)' -o $@ $(MODULE_SRC:%=$(SRC_DIR)/%) 165 166 $(GENCAT_COMMON_DIR)/$(GENCAT_NAME): $(GENMSG_LIB) 167 gencat $@ $(GENMSG_LIB) 168 169 $(LUXGENCAT): $(LCMESSAGES) $(GENCAT_COMMON_DIR)/$(GENCAT_NAME) 170 $(INSTALL) -s -m 644 -f $(LCMESSAGES) $(GENCAT_COMMON_DIR)/$(GENCAT_NAME) 171