8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / backup / restore / Makefile
blobb68aa1f2aaf4f217a550e558c8b3df66e5b1ce8c
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.
15 FSTYPE= ufs
17 UFSRESTORE= ufsrestore
19 PROG= $(UFSRESTORE)
20 ROOTFS_PROG= $(PROG)
21 PRODUCT= $(PROG)
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
30 POFILE= ufsrestore.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)
40 LOCAL= .
41 GENERAL= ../include
42 GLOBAL= ../../../head
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)
52 FILEMODE= 04555
54 .KEEP_STATE:
56 all: $(ROOTFS_PROG)
58 $(PROG): $(OBJECTS) $$(LIBDUMP)
59 $(LINK.c) -o $@ $(OBJECTS) $(LDLIBS)
60 $(POST_PROCESS)
62 $(LIBDUMP): FRC
63 $(DO_LIBDIR)
65 FRC:
67 install: all $(UFSROOTPKGUSRLIBFSTYPE) $(UFSROOTLINK)
69 lint: $(SRCS) $(LINTLIBDUMP)
70 $(LINT.c) $(SRCS) $(LINTLIBDUMP) 2>&1 \
71 | sed -f lint.sed | grep -v '^[ ]'
73 $(LINTLIBDUMP): FRC
74 cd ../lib; pwd; $(MAKE) lint
75 pwd
77 check:
78 $(CSTYLE) $(CSTYLEFLAGS) $(SRCS) $(HEADERS)
79 $(HDRCHK) $(HDRCHKFLAGS) $(HEADERS)
81 clean:
82 $(RM) $(OBJECTS) $(DEBUGOBJS) *.ln
84 $(UFSROOTLINK):
85 -$(RM) $@; $(SYMLINK) $(LINKVALUE) $(UFSROOTLINK)
87 $(POFILE): $(POFILES)
88 $(RM) $@; cat $(POFILES) > $@
90 ../lib/libdump.po:
91 cd ../lib ; pwd ; $(MAKE) libdump.po
93 include ../Makefile.targ