Contents of /trunk/libtommath/patches/libtommath-0.42.0-build-fixes.patch
Parent Directory | Revision Log
Revision 1315 -
(show annotations)
(download)
Fri May 6 18:05:09 2011 UTC (13 years, 4 months ago) by niro
File size: 3091 byte(s)
Fri May 6 18:05:09 2011 UTC (13 years, 4 months ago) by niro
File size: 3091 byte(s)
added build fixes
1 | diff -NrU5 libtommath-0.41.original/makefile.shared libtommath-0.41/makefile.shared |
2 | --- libtommath-0.41.original/makefile.shared 2009-07-28 21:59:47.000000000 -0600 |
3 | +++ libtommath-0.41/makefile.shared 2009-07-28 22:01:32.000000000 -0600 |
4 | @@ -1,11 +1,11 @@ |
5 | #Makefile for GCC |
6 | # |
7 | #Tom St Denis |
8 | VERSION=0:41 |
9 | |
10 | -CC = libtool --mode=compile --tag=CC gcc |
11 | +LTCOMPILE = libtool --mode=compile --tag=CC $(CC) |
12 | |
13 | CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare |
14 | |
15 | ifndef IGNORE_SPEED |
16 | |
17 | @@ -80,23 +80,26 @@ |
18 | bn_mp_init_set_int.o bn_mp_invmod_slow.o bn_mp_prime_rabin_miller_trials.o \ |
19 | bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o |
20 | |
21 | objs: $(OBJECTS) |
22 | |
23 | +.c.o: |
24 | + $(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $< |
25 | + |
26 | $(LIBNAME): $(OBJECTS) |
27 | - libtool --mode=link --tag=CC gcc $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) |
28 | + libtool --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) |
29 | |
30 | install: $(LIBNAME) |
31 | install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) |
32 | libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) |
33 | install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) |
34 | install -m 644 -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) |
35 | |
36 | test: $(LIBNAME) demo/demo.o |
37 | - gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o |
38 | - libtool --mode=link gcc $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S) |
39 | + $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o |
40 | + libtool --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S) |
41 | |
42 | mtest: test |
43 | - cd mtest ; gcc $(CFLAGS) $(LDFLAGS) mtest.c -o mtest |
44 | + cd mtest ; $(CC) $(CFLAGS) $(LDFLAGS) mtest.c -o mtest |
45 | |
46 | timing: $(LIBNAME) |
47 | - libtool --mode=link gcc $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest |
48 | + libtool --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest |
49 | --- makefile.shared.old 2007-03-11 00:45:11.000000000 +0100 |
50 | +++ makefile.shared 2007-11-06 17:21:45.000000000 +0100 |
51 | @@ -83,20 +83,20 @@ |
52 | objs: $(OBJECTS) |
53 | |
54 | $(LIBNAME): $(OBJECTS) |
55 | - libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) |
56 | + libtool --mode=link --tag=CC gcc $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) |
57 | |
58 | install: $(LIBNAME) |
59 | install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) |
60 | libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) |
61 | install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) |
62 | - install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) |
63 | + install -m 644 -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) |
64 | |
65 | test: $(LIBNAME) demo/demo.o |
66 | gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o |
67 | - libtool --mode=link gcc -o test demo/demo.o $(LIBNAME_S) |
68 | + libtool --mode=link gcc $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S) |
69 | |
70 | mtest: test |
71 | - cd mtest ; gcc $(CFLAGS) mtest.c -o mtest |
72 | + cd mtest ; gcc $(CFLAGS) $(LDFLAGS) mtest.c -o mtest |
73 | |
74 | timing: $(LIBNAME) |
75 | - gcc $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest |
76 | + libtool --mode=link gcc $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest |