add UNLEASHED_OBJ to unleashed.mk
[unleashed/tickless.git] / usr / src / cmd / backup / restore / Makefile
bloba42c36ddd7e45f95e5e6bddcbaaeaaedcd4a6153
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= ../../../../../include/protocols/dumprestore.h \
35 ../include/byteorder.h ../include/memutils.h \
36 restore.h
38 CLOBBERFILES += $(PRODUCT) $(DEBUGPRODUCTS)
40 LOCAL= .
41 GENERAL= ../include
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)
51 FILEMODE= 04555
53 .KEEP_STATE:
55 all: $(ROOTFS_PROG)
57 $(PROG): $(OBJECTS) $$(LIBDUMP)
58 $(LINK.c) -o $@ $(OBJECTS) $(LDLIBS)
59 $(POST_PROCESS)
61 $(LIBDUMP): FRC
62 $(DO_LIBDIR)
64 FRC:
66 install: all $(UFSROOTPKGUSRLIBFSTYPE) $(UFSROOTLINK)
68 check:
69 $(CSTYLE) $(CSTYLEFLAGS) $(SRCS) $(HEADERS)
70 $(HDRCHK) $(HDRCHKFLAGS) $(HEADERS)
72 clean:
73 $(RM) $(OBJECTS) $(DEBUGOBJS) *.ln
75 $(UFSROOTLINK):
76 -$(RM) $@; $(SYMLINK) $(LINKVALUE) $(UFSROOTLINK)
78 $(POFILE): $(POFILES)
79 $(RM) $@; cat $(POFILES) > $@
81 ../lib/libdump.po:
82 cd ../lib ; pwd ; $(MAKE) libdump.po
84 include ../Makefile.targ