remove rcmd(3socket) interfaces and rmt(1m)
[unleashed.git] / usr / src / cmd / backup / lib / Makefile
blobf6adb0ee082d4fa11a74a4160e17440c157b4943
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 2006 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 LIBRARY= libdump.a
28 # Has to be before include of Makefile.backup
29 # This should be POFILE=libdump.po, but that causes make to
30 # fall over due to some seriously weird interactions in the
31 # various indirectly-included makefiles. So, since this works
32 # and is otherwise harmless, we fake it.
33 PROG= libdump
35 # Include library definitions, then backup definitions, as in general
36 # we want the flags and such from our tree.
38 include ../../../lib/Makefile.lib
39 include ../Makefile.backup
41 SRCDIR = .
43 # Specifically request the construction of a static library.
44 # This library is not installed in the proto area.
45 LIBS= $(LIBRARY)
47 HDRS= ../include/byteorder.h \
48 ../include/memutils.h \
49 ../../../../../include/protocols/dumprestore.h
52 YFILE= getdate.y
53 YSRC= getdate.c
55 CLOBBERFILES += $(LIBS) $(GLIB)
57 LOBJS= $(YSRC:%.c=%.o) \
58 byteorder.o memutils.o $(RPC_CLNT:%.c=%.o) $(RPC_XDR:%.c=%.o)
60 OBJECTS= $(LOBJS)
61 POFILES= $(OBJECTS:.o=.po)
62 GENERAL= ../include
63 GLOBAL= ../../../../../include
64 CPPFLAGS= -I$(GENERAL) -I$(GLOBAL) $(CPPFLAGS.master)
65 CERRWARN += -Wno-implicit-function-declaration
66 CERRWARN += -Wno-parentheses
67 CERRWARN += -Wno-unused-label
68 CERRWARN += -Wno-unused-variable
69 CLEANFILES= $(OBJECTS) $(DEBUGS) *.ln \
70 $(YSRC) $(LIBRARY)
72 # support for -g library
73 GLIB= libdump_g.a
74 DEBUGS= $(OBJECTS:%=.debug/%)
75 $(GLIB):= AROBJS = $(DEBUGS)
76 $(GLIB):= DIR = .debug
77 $(GLIB):= CFLAGS= -g -DDEBUG -DYYDEBUG ${SBFLAGS}
79 .KEEP_STATE:
81 all: $(LIBS)
83 debug: $(LIBS) $(GLIB)
85 .debug:
86 -@mkdir -p $@
88 .debug/%.o: %.c
89 $(COMPILE.c) -o $@ $<
90 $(POST_PROCESS_O)
92 $(GLIB): .debug $$(DEBUGS)
93 $(BUILD.AR)
94 $(POST_PROCESS_A)
96 $(OBJECTS): $(HDRS)
98 install: all
100 $(POFILE): $(POFILES)
101 $(RM) $@; cat $(POFILES) > $@
103 check: $(HDRS)
104 $(CSTYLE) $(CSTYLEFLAGS) `echo $(SRCS) | sed -e s/getdate.c//` $(HDRS)
105 $(HDRCHK) $(HDRCHKFLAGS) $(HDRS)
107 # include library targets
108 include ../../../lib/Makefile.targ
110 _msg: $(POFILE)