1fcf3ce44SJohn Forte# CDDL HEADER START 2fcf3ce44SJohn Forte# 3fcf3ce44SJohn Forte# The contents of this file are subject to the terms of the 4fcf3ce44SJohn Forte# Common Development and Distribution License (the "License"). 5fcf3ce44SJohn Forte# You may not use this file except in compliance with the License. 6fcf3ce44SJohn Forte# 7fcf3ce44SJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 8fcf3ce44SJohn Forte# or http://www.opensolaris.org/os/licensing. 9fcf3ce44SJohn Forte# See the License for the specific language governing permissions 10fcf3ce44SJohn Forte# and limitations under the License. 11fcf3ce44SJohn Forte# 12fcf3ce44SJohn Forte# When distributing Covered Code, include this CDDL HEADER in each 13fcf3ce44SJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 14fcf3ce44SJohn Forte# If applicable, add the following below this CDDL HEADER, with the 15fcf3ce44SJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying 16fcf3ce44SJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner] 17fcf3ce44SJohn Forte# 18fcf3ce44SJohn Forte# CDDL HEADER END 19fcf3ce44SJohn Forte# 20fcf3ce44SJohn Forte# 213270659fSSrikanth, Ramana# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 22fcf3ce44SJohn Forte# Use is subject to license terms. 23fcf3ce44SJohn Forte# 24fcf3ce44SJohn Forte# lib/libunistat/Makefile.com 25fcf3ce44SJohn Forte# 26fcf3ce44SJohn Forte# include global definitions 27fcf3ce44SJohn Forteinclude ../../../Makefile.master 28fcf3ce44SJohn Forte 29fcf3ce44SJohn ForteLIBRARY= libunistat.a 30fcf3ce44SJohn ForteVERS= .1 31fcf3ce44SJohn Forte 32fcf3ce44SJohn ForteOBJECTS= spcs_s_u.o spcs_log.o 33fcf3ce44SJohn Forte 34fcf3ce44SJohn Forte# include library definitions 35fcf3ce44SJohn Forteinclude ../../Makefile.lib 36fcf3ce44SJohn Forte 37fcf3ce44SJohn ForteSRCS= $(OBJECTS:%.o=../common/%.c) 38fcf3ce44SJohn ForteSRCDIR= ../common 39fcf3ce44SJohn Forte 40fcf3ce44SJohn ForteLIBS += $(DYNLIB) $(LINTLIB) 41fcf3ce44SJohn Forte 42fcf3ce44SJohn Forte# definitions for lint 43fcf3ce44SJohn Forte 44fcf3ce44SJohn ForteLINTFLAGS += -u -I.. 45fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_UNDEFINED_SYMBOL 46fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_STATIC_UNUSED 47fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_BAD_PTR_INT_COMB_ARG 48fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_VAR_USED_BEFORE_SET 49fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_SEC_FORBIDDEN_WARN_CFTIME 50fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_SEC_PRINTF_VAR_FMT 51fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_OLD_STYLE_DECL_OR_BAD_TYPE 52fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_YACC_ERROR 53fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2 54fcf3ce44SJohn ForteLINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 55fcf3ce44SJohn ForteLINTOUT= lint.out 56fcf3ce44SJohn ForteLINTOUT_INTER= lintinter.out 57fcf3ce44SJohn Forte 58*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 59*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 60*7014882cSRichard Lowe 61fcf3ce44SJohn ForteLINTSRC= $(LINTLIB:%.ln=%) 62fcf3ce44SJohn ForteROOTLINTDIR= $(ROOTLIBDIR) 63fcf3ce44SJohn ForteROOTLINT= $(LINTSRC:%=$(ROOTLINTDIR)/%) 64fcf3ce44SJohn Forte 65fcf3ce44SJohn ForteCLEANFILES += $(LINTOUT) $(LINTLIB) $(LINTOUT_INTER) $(LINT_INTER) 66fcf3ce44SJohn Forte 67fcf3ce44SJohn Forteall:= TARGET= all 68fcf3ce44SJohn Forteclean:= TARGET= clean 69fcf3ce44SJohn Forteclobber:= TARGET= clobber 70fcf3ce44SJohn Forteinstall:= TARGET= install 71fcf3ce44SJohn Fortelint:= TARGET= lint 72fcf3ce44SJohn Fortelintinter:= TARGET= lintinter 73fcf3ce44SJohn Forte 74fcf3ce44SJohn ForteMODS= dsw \ 75fcf3ce44SJohn Forte rdc \ 76fcf3ce44SJohn Forte spcs \ 77fcf3ce44SJohn Forte sdbc \ 78fcf3ce44SJohn Forte solaris \ 79fcf3ce44SJohn Forte sv 80fcf3ce44SJohn Forte 81fcf3ce44SJohn ForteERRS= $(MODS:%=$(SRCDIR)/%/%.err) 82fcf3ce44SJohn ForteMSGS= $(MODS:%=$(SRCDIR)/%/%.msg) 83fcf3ce44SJohn ForteEDEFS= $(MODS:%=$(SRCDIR)/%/%.edef) 84fcf3ce44SJohn ForteTRNKS= $(MODS:%=$(SRCDIR)/%/%.trnk) 85fcf3ce44SJohn ForteDTRNKS= $(MODS:%=$(SRCDIR)/%/%.dtrnk) 86fcf3ce44SJohn Forte 873270659fSSrikanth, RamanaERRGEN_DIR= $(SRC)/cmd/avs/errgen 883270659fSSrikanth, RamanaERRGEN= $(ERRGEN_DIR)/errgen 89fcf3ce44SJohn Forte 90fcf3ce44SJohn Forte# production (non-debug) 91fcf3ce44SJohn ForteDFLAGS = -DISSTATIC=static 92fcf3ce44SJohn Forte 93fcf3ce44SJohn Forte# development (debug) - cstyle prohibits use of "STATIC" 94fcf3ce44SJohn ForteDFLAGS = -g -DISSTATIC=" " 95fcf3ce44SJohn Forte 96*7014882cSRichard LoweCFLAGS += $(CCVERBOSE) $(DFLAGS) -I. -DLIBSPCS_CLIENT\ 97fcf3ce44SJohn Forte -I$(JAVAINC) -I$(JAVAINCSOL)\ 98fcf3ce44SJohn Forte -DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\" 99*7014882cSRichard LoweCFLAGS64 += $(CCVERBOSE) $(DFLAGS) -I. -DLIBSPCS_CLIENT\ 100fcf3ce44SJohn Forte -I$(JAVAINC) -I$(JAVAINCSOL)\ 101fcf3ce44SJohn Forte -DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\" 102fcf3ce44SJohn ForteLDLIBS += -lc 103fcf3ce44SJohn Forte 104fcf3ce44SJohn Forte$(LINTLIB) := SRCS = ../common/llib-lunistat 105fcf3ce44SJohn Forte$(LINTLIB) := LINTFLAGS = -nvx -DLIBSPCS_CLIENT -I$(JAVAINC) -I$(JAVAINCSOL)\ 106fcf3ce44SJohn Forte -DISSTATIC=static \ 107fcf3ce44SJohn Forte -DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\" 108fcf3ce44SJohn Forte$(LINTLIB) := LINTFLAGS64 = -nvx -Xarch=v9 -DLIBSPCS_CLIENT \ 109fcf3ce44SJohn Forte -I$(JAVAINC) -I$(JAVAINCSOL) \ 110fcf3ce44SJohn Forte -DISSTATIC=static \ 111fcf3ce44SJohn Forte -DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\" 112fcf3ce44SJohn Forte 113fcf3ce44SJohn Forte$(LINT_INTER) := SRCS += ../common/llib-lunistat 114fcf3ce44SJohn Forte$(LINT_INTER) := LINTFLAGS = -nvx -DLIBSPCS_CLIENT -I$(JAVAINC) -I$(JAVAINCSOL)\ 115fcf3ce44SJohn Forte -DISSTATIC=static \ 116fcf3ce44SJohn Forte -DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\" 117fcf3ce44SJohn Forte$(LINT_INTER) := LINTFLAGS64 = -nvx -Xarch=v9 -DLIBSPCS_CLIENT \ 118fcf3ce44SJohn Forte -I$(JAVAINC) -I$(JAVAINCSOL) \ 119fcf3ce44SJohn Forte -DISSTATIC=static \ 120fcf3ce44SJohn Forte -DLIBUNISTAT_LOCALE=\"/usr/install/unistat/locale\" 121fcf3ce44SJohn Forte 122fcf3ce44SJohn ForteCOMMENT= "/* THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT */" 123fcf3ce44SJohn Forte 124fcf3ce44SJohn ForteCLEANFILES += *.h *.po\ 125fcf3ce44SJohn Forte $(SRCDIR)/*/*.msg\ 126fcf3ce44SJohn Forte $(SRCDIR)/*/*.properties\ 127fcf3ce44SJohn Forte $(SRCDIR)/*/*.exc\ 128fcf3ce44SJohn Forte $(SRCDIR)/*/*.edef\ 129fcf3ce44SJohn Forte $(SRCDIR)/*/*.trnk\ 130fcf3ce44SJohn Forte $(SRCDIR)/*/*.dtrnk 131fcf3ce44SJohn Forte 132fcf3ce44SJohn Forte# note that the properties files are generated in ../libspcs/java 133fcf3ce44SJohn Forte 134fcf3ce44SJohn Forte.SUFFIXES: .err .exc .properties .edef .msg .trnk .dtrnk 135fcf3ce44SJohn Forte 136fcf3ce44SJohn Forte.err.msg: 137fcf3ce44SJohn Forte $(ERRGEN) -m `basename $*` <$*.err >$*.msg 138fcf3ce44SJohn Forte 139fcf3ce44SJohn Forte.err.edef: 140fcf3ce44SJohn Forte $(ERRGEN) -c `basename $*` <$*.err >$*.edef 141fcf3ce44SJohn Forte 142fcf3ce44SJohn Forte.err.trnk: 143fcf3ce44SJohn Forte $(ERRGEN) -t `basename $*` <$*.err >$*.trnk 144fcf3ce44SJohn Forte 145fcf3ce44SJohn Forte.err.dtrnk: 146fcf3ce44SJohn Forte $(ERRGEN) -x `basename $*` <$*.err >$*.dtrnk 147fcf3ce44SJohn Forte 148fcf3ce44SJohn Forteall: spcs_etext.h spcs_errors.h spcs_etrinkets.h spcs_dtrinkets.h $(LIB) 149fcf3ce44SJohn Forte 150fcf3ce44SJohn Fortespcs_dtrinkets.h: $(ERRGEN) $(DTRNKS) 151fcf3ce44SJohn Forte @echo $(COMMENT) > $@ 152fcf3ce44SJohn Forte cat $(DTRNKS) >>spcs_dtrinkets.h 153fcf3ce44SJohn Forte 154fcf3ce44SJohn Fortespcs_etrinkets.h: $(ERRGEN) $(TRNKS) 155fcf3ce44SJohn Forte @echo $(COMMENT) > $@ 156fcf3ce44SJohn Forte cat $(TRNKS) $(SRCDIR)/spcs_etrinkets.stub >> $@ 157fcf3ce44SJohn Forte 158fcf3ce44SJohn Fortespcs_etext.h: $(ERRGEN) $(MSGS) 159fcf3ce44SJohn Forte @echo $(COMMENT) > $@ 160fcf3ce44SJohn Forte $(CAT) $(MSGS) $(SRCDIR)/spcs_etext.stub >> $@ 161fcf3ce44SJohn Forte $(SED) "s/ \"/ gettext(\"/" < $@ |\ 162fcf3ce44SJohn Forte sed "s/\",/\"),/" > temp 163fcf3ce44SJohn Forte xgettext -d unistat temp ; rm temp 164fcf3ce44SJohn Forte 165fcf3ce44SJohn Fortespcs_errors.h: $(ERRGEN) $(EDEFS) 166fcf3ce44SJohn Forte @echo $(COMMENT) > $@ 167fcf3ce44SJohn Forte $(CAT) $(EDEFS) $(SRCDIR)/spcs_errors.stub >> $@ 168fcf3ce44SJohn Forte 169fcf3ce44SJohn Forte$(ERRGEN): 170fcf3ce44SJohn Forte @cd $(ERRGEN_DIR); pwd; $(MAKE) install 171fcf3ce44SJohn Forte 172fcf3ce44SJohn Forte 173fcf3ce44SJohn Forte.KEEP_STATE: 174fcf3ce44SJohn Forte 175fcf3ce44SJohn ForteFRC: 176fcf3ce44SJohn Forte 177fcf3ce44SJohn Fortelint: lintcheck $(LINTLIB) 178fcf3ce44SJohn Fortelintinter: $(LINT_INTER) 179fcf3ce44SJohn Forte 180fcf3ce44SJohn Forte# include library targets 181fcf3ce44SJohn Forteinclude ../../Makefile.targ 182fcf3ce44SJohn Forte 183fcf3ce44SJohn Forteobjs/%.o pics/%.o: ../common/%.c 184fcf3ce44SJohn Forte $(COMPILE.c) -o $@ $< 185fcf3ce44SJohn Forte $(POST_PROCESS_O) 186fcf3ce44SJohn Forte 187fcf3ce44SJohn Forte# install rule for lint library target 188fcf3ce44SJohn Forte$(ROOTLINTDIR)/%: ../common/% 189fcf3ce44SJohn Forte $(INS.file) 190