2 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
3 # Use is subject to license terms.
5 # cmd/backup/restore/Makefile
7 # Copyright (c) 1983 Regents of the University of California.
8 # All rights reserved. The Berkeley software License Agreement
9 # specifies the terms and conditions for redistribution.
11 # CAUTION: FSTYPE must be defined before including ../Makefile.backup,
12 # otherwise UTFROOTPKGUSRLIBFSTYPE doesn't get expanded
13 # properly and the magic doesn't happen.
17 UFSRESTORE
= ufsrestore
23 include ..
/Makefile.backup
25 OBJECTS
= dirs.o interactive.o main.o restore.o \
26 symtab.o tape.o utilities.o
27 SRCS
= $(OBJECTS
:%.o
=%.c
)
29 POFILES
= $(OBJECTS
:%.o
=%.po
) ..
/lib
/libdump.po
32 # XXX This is only needed for the check: target. It would be nice to
33 # XXX automatically generate the list when needed.
34 HEADERS
= ..
/..
/..
/head
/protocols
/dumprestore.h \
35 ..
/include/byteorder.h ..
/include/memutils.h \
36 ..
/include/rmt.h restore.h
38 CLOBBERFILES
+= $(PRODUCT
) $(DEBUGPRODUCTS
)
43 CPPFLAGS
= -I
$(LOCAL
) -I
$(GENERAL
) -I
$(GLOBAL
) \
44 $(CPPFLAGS.master
) -D_LARGEFILE64_SOURCE
=1
45 LIBDUMP
= ..
/lib
/libdump.a
46 LINTLIBDUMP
= ..
/lib
/llib-ldump.ln
47 LDLIBS
+= $(BSTATIC
) -L..
/lib
-ldump
$(BDYNAMIC
) -lsocket
-lnsl
-lsec
49 UFSROOTLINK
= $(UFSROOTUSRSBIN
)/$(PROG
)
50 LINKVALUE
= ..
/lib
/fs
/$(FSTYPE
)/$(PROG
)
58 $(PROG
): $(OBJECTS
) $$(LIBDUMP
)
59 $(LINK.c
) -o
$@
$(OBJECTS
) $(LDLIBS
)
67 install: all $(UFSROOTPKGUSRLIBFSTYPE
) $(UFSROOTLINK
)
69 lint
: $(SRCS
) $(LINTLIBDUMP
)
70 $(LINT.c
) $(SRCS
) $(LINTLIBDUMP
) 2>&1 \
71 | sed
-f lint.sed | grep
-v
'^[ ]'
74 cd ..
/lib
; pwd
; $(MAKE
) lint
78 $(CSTYLE
) $(CSTYLEFLAGS
) $(SRCS
) $(HEADERS
)
79 $(HDRCHK
) $(HDRCHKFLAGS
) $(HEADERS
)
82 $(RM
) $(OBJECTS
) $(DEBUGOBJS
) *.ln
85 -$(RM
) $@
; $(SYMLINK
) $(LINKVALUE
) $(UFSROOTLINK
)
88 $(RM
) $@
; cat
$(POFILES
) > $@
91 cd ..
/lib
; pwd
; $(MAKE
) libdump.po
93 include ..
/Makefile.targ