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
= ..
/..
/..
/..
/..
/include/protocols
/dumprestore.h \
35 ..
/include/byteorder.h ..
/include/memutils.h \
38 CLOBBERFILES
+= $(PRODUCT
) $(DEBUGPRODUCTS
)
42 GLOBAL
= ..
/..
/..
/..
/..
/include
43 CPPFLAGS
= -I
$(LOCAL
) -I
$(GENERAL
) -I
$(GLOBAL
) \
44 $(CPPFLAGS.master
) -D_LARGEFILE64_SOURCE
=1
45 LIBDUMP
= ..
/lib
/libdump.a
46 LDLIBS
+= $(BSTATIC
) -L..
/lib
-ldump
$(BDYNAMIC
) -lsec
48 UFSROOTLINK
= $(UFSROOTUSRSBIN
)/$(PROG
)
49 LINKVALUE
= ..
/lib
/fs
/$(FSTYPE
)/$(PROG
)
57 $(PROG
): $(OBJECTS
) $$(LIBDUMP
)
58 $(LINK.c
) -o
$@
$(OBJECTS
) $(LDLIBS
)
66 install: all $(UFSROOTPKGUSRLIBFSTYPE
) $(UFSROOTLINK
)
69 $(CSTYLE
) $(CSTYLEFLAGS
) $(SRCS
) $(HEADERS
)
70 $(HDRCHK
) $(HDRCHKFLAGS
) $(HEADERS
)
73 $(RM
) $(OBJECTS
) $(DEBUGOBJS
) *.ln
76 -$(RM
) $@
; $(SYMLINK
) $(LINKVALUE
) $(UFSROOTLINK
)
79 $(RM
) $@
; cat
$(POFILES
) > $@
82 cd ..
/lib
; pwd
; $(MAKE
) libdump.po
84 include ..
/Makefile.targ