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
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
CC=libtool --mode=compile gcc
|
||||
|
||||
CFLAGS += -I../src/headers -I./ -Wall -W
|
||||
|
||||
# ranlib tools
|
||||
ifndef RANLIB
|
||||
RANLIB=ranlib
|
||||
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 \
|
||||
@@ -17,8 +16,11 @@ endif
|
||||
|
||||
default: $(LIBTEST)
|
||||
|
||||
.c.o:
|
||||
$(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $<
|
||||
|
||||
$(LIBTEST): $(OBJECTS)
|
||||
libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | xargs` -o $@ -rpath $(LIBPATH) -version-info $(VERSION)
|
||||
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) `find . -type f -name "*.lo"` -o $@ -rpath $(LIBPATH) -version-info $(VERSION)
|
||||
|
||||
install: $(LIBTEST)
|
||||
libtool --silent --mode=install install -c $(LIBTEST) $(DESTDIR)$(LIBPATH)/$(LIBTEST)
|
||||
$(LT) --mode=install install -c $(LIBTEST) $(DESTDIR)$(LIBPATH)/$(LIBTEST)
|
||||
|
||||
Reference in New Issue
Block a user