1# Copyright (c) 2010-2012 United States Government, as represented by
2# the Secretary of Defense.  All rights reserved.
3#
4# THIS SOFTWARE AND ITS DOCUMENTATION ARE PROVIDED AS IS AND WITHOUT
5# ANY EXPRESS OR IMPLIED WARRANTIES WHATSOEVER. ALL WARRANTIES
6# INCLUDING, BUT NOT LIMITED TO, PERFORMANCE, MERCHANTABILITY, FITNESS
7# FOR A PARTICULAR  PURPOSE, AND NONINFRINGEMENT ARE HEREBY
8# DISCLAIMED. USERS ASSUME THE ENTIRE RISK AND LIABILITY OF USING THE
9# SOFTWARE.
10#
11
12XEN_ROOT=../..
13
14TARGET=vtpmmgr.a
15OBJS=vtpmmgr.o vtpm_cmd_handler.o init.o tpmrsa.o tpm.o tpm2.o log.o
16OBJS += vtpm_disk.o disk_tpm.o disk_io.o disk_crypto.o disk_read.o disk_write.o
17OBJS += mgmt_authority.o
18
19CFLAGS+=-Werror -Iutil -Icrypto -Itcs
20CFLAGS+=-Wno-declaration-after-statement -Wno-unused-label
21
22build: $(TARGET)
23$(TARGET): $(OBJS)
24	ar -rcs $@ $^
25
26install:
27	$(INSTALL_DIR) "$(DESTDIR)$(LIBEXEC_BIN)"
28	$(INSTALL_PROG) calc.pl "$(DESTDIR)$(LIBEXEC_BIN)"
29	$(INSTALL_PROG) manage-vtpmmgr.pl "$(DESTDIR)$(LIBEXEC_BIN)"
30
31clean:
32	rm -f $(TARGET) $(OBJS)
33
34distclean: clean
35
36.PHONY: clean distclean
37