blob: d3745d8ecd7b1b9feb5409d423a06b082dee08ed [file] [log] [blame]
CC = gcc
#CC = g++
LD = ld
AR = ar
LDDFLAGS += -fPIC
ARFLAGS = -rc
TSS_DIR?=/tpm2-tss
OPENSSL_DIR?=/usr/local/bin/openssl
OUTPUT=ossl_tpm_duplicate
OBJS= util.o \
marshal.o \
crypto_aux.o \
tpm_duplication_aux.o \
main.o
CFLAGS += -g -fPIC -I./include -I${TSS_DIR}/include/ -I$(TSS_DIR)/sysapi/include #-I${OPENSSL_DIR}/include/
LDFLAGS += -ldl -L/usr/local/lib/ -lsapi -ltcti-device -ltcti-tabrmd
LIBS = -lpthread -lcrypto -lssl
%.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
$(OUTPUT): $(OBJS)
$(CC) $(OBJS) $(LDFLAGS) ${LIBS} -o $(OUTPUT)
.PHONY: all
all: $(OUTPUT)
install:
@set -e; for i in $(OUTPUT); do mv $$i ../../bin/$$i ; done
clean:
rm -f *.o $(OUTPUT) *.so