tomcrypt/testprof/makefile.shared
Steffen Jaeckel 4089cc963c update shared makefiles
split up install target in "install" and "install_test" as in
standard makefile

use libtool to compile and link

clean up and bring in sync with standard makefile targets
2014-07-14 15:35:04 +02:00

27 lines
812 B
Plaintext

ifeq ($(CC),cc)
CC = gcc
endif
LT ?= libtool
LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
CFLAGS += -I../src/headers -I./ -Wall -Wsign-compare -W -Wshadow -Wno-unused-parameter
OBJECTS = base64_test.o cipher_hash_test.o der_tests.o \
dsa_test.o ecc_test.o mac_test.o modes_test.o pkcs_1_test.o rsa_test.o \
store_test.o test_driver.o x86_prof.o katja_test.o dh_test.o misc_test.o
ifndef LIBTEST
LIBTEST=libtomcrypt_prof.la
endif
default: $(LIBTEST)
.c.o:
$(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $<
$(LIBTEST): $(OBJECTS)
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) `find . -type f -name "*.lo"` -o $@ -rpath $(LIBPATH) -version-info $(VERSION)
install: $(LIBTEST)
$(LT) --mode=install install -c $(LIBTEST) $(DESTDIR)$(LIBPATH)/$(LIBTEST)