Mercurial > dropbear
comparison libtommath/makefile.shared @ 1470:8bba51a55704
Update to libtommath v1.0.1
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 08 Feb 2018 23:11:40 +0800 |
parents | 60fc6476e044 |
children |
comparison
equal
deleted
inserted
replaced
1469:51043e868f55 | 1470:8bba51a55704 |
---|---|
5 #default files to install | 5 #default files to install |
6 ifndef LIBNAME | 6 ifndef LIBNAME |
7 LIBNAME=libtommath.la | 7 LIBNAME=libtommath.la |
8 endif | 8 endif |
9 | 9 |
10 include makefile.include | 10 include makefile_include.mk |
11 | 11 |
12 LT ?= libtool | 12 |
13 ifndef LT | |
14 ifeq ($(PLATFORM), Darwin) | |
15 LT:=glibtool | |
16 else | |
17 LT:=libtool | |
18 endif | |
19 endif | |
13 LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC) | 20 LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC) |
14 | 21 |
15 LCOV_ARGS=--directory .libs --directory . | 22 LCOV_ARGS=--directory .libs --directory . |
16 | 23 |
17 #START_INS | 24 #START_INS |
45 objs: $(OBJECTS) | 52 objs: $(OBJECTS) |
46 | 53 |
47 .c.o: | 54 .c.o: |
48 $(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $< | 55 $(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $< |
49 | 56 |
57 LOBJECTS = $(OBJECTS:.o=.lo) | |
58 | |
50 $(LIBNAME): $(OBJECTS) | 59 $(LIBNAME): $(OBJECTS) |
51 $(LT) --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) | 60 $(LT) --mode=link --tag=CC $(CC) $(LDFLAGS) $(LOBJECTS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION_SO) |
52 | 61 |
53 install: $(LIBNAME) | 62 install: $(LIBNAME) |
54 install -d $(DESTDIR)$(LIBPATH) | 63 install -d $(DESTDIR)$(LIBPATH) |
55 install -d $(DESTDIR)$(INCPATH) | 64 install -d $(DESTDIR)$(INCPATH) |
56 $(LT) --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) | 65 $(LT) --mode=install install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) |
57 install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH) | 66 install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH) |
67 sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtommath.pc.in > libtommath.pc | |
68 install -d $(DESTDIR)$(LIBPATH)/pkgconfig | |
69 install -m 644 libtommath.pc $(DESTDIR)$(LIBPATH)/pkgconfig/ | |
70 | |
71 uninstall: | |
72 $(LT) --mode=uninstall rm $(DESTDIR)$(LIBPATH)/$(LIBNAME) | |
73 rm $(HEADERS_PUB:%=$(DESTDIR)$(INCPATH)/%) | |
74 rm $(DESTDIR)$(LIBPATH)/pkgconfig/libtommath.pc | |
58 | 75 |
59 test: $(LIBNAME) demo/demo.o | 76 test: $(LIBNAME) demo/demo.o |
60 $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o | 77 $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o |
61 $(LT) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME) | 78 $(LT) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME) |
62 | 79 |