move 32-bit libs to lib/i386 subdirs & 64-bit libs to lib/
[unleashed.git] / usr / src / lib / fm / libfmevent / Makefile.com
blobd22ffe7109e6adef622a63ad83dfd1e7569d11ac
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
25 LIBRARY = libfmevent.a
26 VERS = .1
28 LIBSRCS = fmev_subscribe.c \
29         fmev_evaccess.c \
30         fmev_errstring.c \
31         fmev_util.c \
32         fmev_publish.c
34 OBJECTS = $(LIBSRCS:%.c=%.o)
36 include ../../../Makefile.lib
38 # This library must install in /lib/fm since it is a dependency of
39 # svc.startd and may be required in early boot.  Thus we cannot
40 # include ../Makefile.lib - instead we set ROOTFMHDRDIR and
41 # ROOTFMHDRS and redefine ROOTLIBDIR and ROOTLIBDIR64 accordingly
43 ROOTFMHDRDIR = $(ROOTHDRDIR)/fm
44 ROOTFMHDRS   = $(FMHDRS:%=$(ROOTFMHDRDIR)/%)
46 ROOTLIBDIR=     $(ROOT)/lib/fm/$(MACH32)
47 ROOTLIBDIR64=   $(ROOT)/lib/fm
49 SRCS = $(LIBSRCS:%.c=../common/%.c)
50 LIBS = $(DYNLIB)
52 SRCDIR =        ../common
54 CSTD = $(CSTD_GNU99)
56 CPPFLAGS += -I../common -I.
57 $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
59 CFLAGS += $(C_BIGPICFLAGS)
60 CFLAGS64 += $(C_BIGPICFLAGS)
62 CERRWARN += -Wno-parentheses
63 CERRWARN += -Wno-unused-function
64 CERRWARN += -Wno-uninitialized
66 FMLIBDIR=usr/lib/fm/$(MACH32)
67 FMLIBDIR64=usr/lib/fm
69 $(DYNLIB) := LDLIBS += -lumem -lnvpair -luutil -lsysevent \
70         -L$(ROOT)/$(FMLIBDIR) -ltopo -lc
72 $(BUILD64)$(DYNLIB) := LDLIBS64 += -lumem -lnvpair -luutil -lsysevent \
73         -L$(ROOT)/$(FMLIBDIR64) -ltopo -lc
77 CLEANFILES += ../common/fmev_errstring.c
79 .KEEP_STATE:
81 all: $(LIBS)
84 pics/%.o: ../$(MACH)/%.c
85         $(COMPILE.c) -o $@ $<
86         $(POST_PROCESS_O)
88 ../common/fmev_errstring.c: ../common/mkerror.sh ../common/libfmevent.h
89         sh ../common/mkerror.sh ../common/libfmevent.h > $@
91 %.o: ../common/%.c
92         $(COMPILE.c) -o $@ $<
93         $(POST_PROCESS_O)
95 include ../../../Makefile.targ
96 include ../../Makefile.targ