xref: /illumos-gate/usr/src/lib/libsmbios/Makefile.com (revision 4c28a617e3922d92a58e813a5b955eb526b9c386)
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
26LIBRARY = libsmbios.a
27VERS = .1
28
29COMMON_OBJS = \
30	smb_error.o \
31	smb_info.o \
32	smb_open.o
33
34LIB_OBJS = \
35	smb_lib.o \
36	smb_subr.o \
37	smb_tables.o
38
39OBJECTS = $(COMMON_OBJS) $(LIB_OBJS)
40
41include ../../Makefile.lib
42
43COMMON_SRCDIR = ../../../common/smbios
44COMMON_HDR = $(SRC)/uts/common/sys/smbios.h
45
46SRCS = $(COMMON_OBJS:%.o=$(COMMON_SRCDIR)/%.c) $(LIB_OBJS:%.o=../common/%.c)
47LIBS = $(DYNLIB) $(LINTLIB)
48
49SRCDIR = ../common
50
51CLEANFILES += ../common/smb_tables.c
52
53CPPFLAGS += -I../common -I$(COMMON_SRCDIR)
54CFLAGS += $(CCVERBOSE)
55LDLIBS += -ldevinfo -lc
56
57$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
58
59.KEEP_STATE:
60
61all: $(LIBS)
62
63lint: lintcheck
64
65include ../../Makefile.targ
66
67objs/%.o pics/%.o: ../../../common/smbios/%.c
68	$(COMPILE.c) -o $@ $<
69	$(POST_PROCESS_O)
70
71../common/smb_tables.c: $(COMMON_SRCDIR)/mktables.sh $(COMMON_HDR)
72	sh $(COMMON_SRCDIR)/mktables.sh $(COMMON_HDR) > $@
73