move 32-bit libs to lib/i386 subdirs & 64-bit libs to lib/
[unleashed.git] / usr / src / cmd / svc / configd / Makefile
blobc98afb7090467ddf72caa6b9be4dd399c2616f44
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 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # Copyright 2015 RackTop Systems.
28 MYPROG = svc.configd
29 MYOBJS = \
30 backend.o \
31 configd.o \
32 client.o \
33 file_object.o \
34 maindoor.o \
35 object.o \
36 rc_node.o \
37 snapshot.o
39 PROG = $(MYPROG)
40 OBJS = $(MYOBJS)
42 SRCS = $(MYOBJS:%.o=%.c)
44 include ../../Makefile.cmd
45 include ../../Makefile.ctf
47 NATIVE_BUILD=$(POUND_SIGN)
48 $(NATIVE_BUILD)PROG = $(MYPROG:%=%-native)
49 $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o)
51 ROOTCMDDIR= $(ROOT)/lib/svc/bin
53 MYCPPFLAGS = -I. -I../common -I../../../common/svc \
54 -I$(ROOT)/usr/include/sqlite-sys
55 CPPFLAGS += $(MYCPPFLAGS)
56 CERRWARN += -Wno-parentheses
57 CERRWARN += -Wno-type-limits
58 CERRWARN += -Wno-unused-label
59 CERRWARN += -Wno-unused-variable
60 CERRWARN += -Wno-unused-function
61 MYLDLIBS = -lumem -luutil
62 LDLIBS += -lsecdb $(MYLDLIBS)
64 CLOBBERFILES += $(MYPROG:%=%-native)
66 LIBSCF = $(SRC)/lib/libscf
68 SCRIPTFILE = restore_repository
69 ROOTSCRIPTFILE = $(ROOTCMDDIR)/$(SCRIPTFILE)
72 # Native variant (used in ../seed)
74 $(NATIVE_BUILD)CC = $(NATIVECC)
75 $(NATIVE_BUILD)LD = $(NATIVELD)
76 $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
77 $(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBSCF)/inc
78 $(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD
79 $(NATIVE_BUILD)LDFLAGS =
80 $(NATIVE_BUILD)LDLIBS = -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
81 $(MYLDLIBS)
83 DIRMODE = 0755
84 FILEMODE = 0555
86 OBJSQLITE =
87 LIBSQLITE = -lsqlite-sys
88 $(NATIVE_BUILD)OBJSQLITE = $(ROOT)/lib/$(MACH32)/libsqlite-native.o
89 $(NATIVE_BUILD)LIBSQLITE =
91 OBJS += $(OBJSQLITE)
92 LDLIBS += $(LIBSQLITE)
94 install := TARGET = install
95 clobber := TARGET = clobber
97 .KEEP_STATE:
98 .PARALLEL: $(MYOBJS) $(MYOBJS:%.o=%-native.o)
100 all: $(PROG)
102 native: FRC
103 @NATIVE_BUILD= $(MAKE) $(MFLAGS) all
105 $(PROG): $(OBJS)
106 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
107 $(POST_PROCESS)
109 %-native.o: %.c
110 $(COMPILE.c) -o $@ $<
111 $(POST_PROCESS_O)
113 $(ROOTCMDDIR)/%: %.sh
114 $(INS.rename)
116 install: all $(ROOTCMD) $(ROOTVARSADMFILE) $(ROOTSCRIPTFILE)
118 clean: FRC
119 $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o)
121 clobber:
123 include ../../Makefile.targ
125 FRC: