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 2008 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# 26 27LIBRARY= libtnf.a 28VERS= .1 29OBJECTS= $(MACH)dep.o \ 30 ref.o \ 31 abi.o \ 32 util.o \ 33 info.o \ 34 datum.o \ 35 record.o \ 36 scalar.o \ 37 array.o \ 38 struct.o \ 39 type.o \ 40 error.o \ 41 access.o \ 42 reader.o 43 44include ../Makefile.lib 45 46SRCDIR = . 47 48TEXT_DOMAIN= SUNW_OST_OSLIB 49XGETFLAGS= -a 50POFILE= $(LIBRARY:%.a=%.po) 51POFILES= _error.po 52 53SED= sed 54GREP= grep 55 56LIBS= $(DYNLIB) 57 58LDLIBS += -lc 59 60HDRS= tnf.h 61ROOTHDRDIR= $(ROOT)/usr/include/tnf 62ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%) 63CHECKHDRS= $(HDRS:%.h=%.check) 64$(ROOTHDRS) := FILEMODE = 0644 65CHECKHDRS = $(HDRS:%.h=%.check) 66 67$(ROOTHDRS) := FILEMODE = 644 68 69CPPFLAGS += -D_DATUM_MACROS -D_REENTRANT 70 71LINTFLAGS += -y 72 73CERRWARN += -_gcc=-Wno-unused-variable 74 75.KEEP_STATE: 76 77all: $(LIBS) 78 79install: all $(ROOTLIBDIR) $(ROOTLIBS) $(ROOTLINKS) 80 81install_h: $(ROOTHDRDIR) $(ROOTHDRS) 82 83lint: 84 $(LINT.c) $(SRCS) 85 86check: $(CHECKHDRS) 87 88$(ROOTLIBDIR) $(ROOTHDRDIR): 89 $(INS.dir) 90 91$(ROOTHDRDIR)/% : % 92 $(INS.file) 93 94ASFLAGS= $(AS_PICFLAGS) -P -D_SYS_SYS_S -D_LOCORE -D_ASM -DPIC -DLOCORE $(CPPFLAGS) 95BUILD.s= $(AS) $(ASFLAGS) $< -o $@ 96 97pics/%.o: ./%.s 98 $(BUILD.s) 99 $(POST_PROCESS_O) 100 101objs/%.o: ./%.s 102 $(BUILD.s) 103 $(POST_PROCESS_O) 104 105_msg: $(MSGDOMAIN) $(POFILE) 106 $(RM) $(MSGDOMAIN)/$(POFILE) 107 $(CP) $(POFILE) $(MSGDOMAIN) 108 109$(POFILE): $(POFILES) 110 $(RM) $@ 111 $(CAT) $(POFILES) > $@ 112 113$(POFILES): 114 $(RM) messages.po 115 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]*` 116 $(SED) -e '/^# msg/d' -e '/^domain/d' messages.po > $@ 117 $(RM) messages.po 118 119include ../Makefile.targ 120