fixup install and clean
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
diff --git a/doc/makefile b/doc/makefile
index fcc47c9..a5ebb6f 100644
--- a/doc/makefile
+++ b/doc/makefile
@@ -42,7 +42,7 @@ poster: poster.tex
docs: docdvi
dvipdf tommath
rm -f tommath.log tommath.aux tommath.dvi tommath.idx tommath.toc tommath.lof tommath.ind tommath.ilg
- cd pics ; MAKE=${MAKE} ${MAKE} clean
+ ${MAKE} -C pics/ clean MAKE=${MAKE}
#LTM user manual
mandvi: bn.tex
@@ -67,3 +67,7 @@ manual: mandvi
sed -b -i 's,^/ID \[.*\]$$,/ID [<0> <0>],g' bn.pdf
mv bn.bak bn.tex
rm -f bn.aux bn.dvi bn.log bn.idx bn.lof bn.out bn.toc
+
+clean:
+ ${MAKE} -C pics/ clean MAKE=${MAKE}
+ rm -f *.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log tommath.tex
diff --git a/makefile b/makefile
index 3fd47d2..5812fe4 100644
--- a/makefile
+++ b/makefile
@@ -83,10 +83,10 @@ profiled_single:
ranlib $(LIBNAME)
install: $(LIBNAME)
- install -d $(DESTDIR)$(LIBPATH)
- install -d $(DESTDIR)$(INCPATH)
- install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH)
- install -m 644 $(HEADERS_PUB) $(DESTDIR)$(INCPATH)
+ install -d $(LIBPATH)
+ install -d $(INCPATH)
+ install -m 644 $(LIBNAME) $(LIBPATH)
+ install -m 644 $(HEADERS_PUB) $(INCPATH)
test: $(LIBNAME) demo/demo.o
$(CC) $(CFLAGS) demo/demo.o $(LIBNAME) $(LFLAGS) -o test
diff --git a/makefile.include b/makefile.include
index d09dc38..4db2fdf 100644
--- a/makefile.include
+++ b/makefile.include
@@ -102,5 +102,5 @@ clean:
rm -f *.gcda *.gcno *.bat *.o *.a *.obj *.lib *.exe *.dll etclib/*.o demo/demo.o test ltmtest mpitest mtest/mtest mtest/mtest.exe \
*.idx *.toc *.log *.aux *.dvi *.lof *.ind *.ilg *.ps *.log *.s mpi.c *.da *.dyn *.dpi tommath.tex `find . -type f | grep [~] | xargs` *.lo *.la
rm -rf .libs/
- cd etc ; MAKE=${MAKE} ${MAKE} clean
- cd pics ; MAKE=${MAKE} ${MAKE} clean
+ ${MAKE} -C etc/ clean MAKE=${MAKE}
+ ${MAKE} -C doc/ clean MAKE=${MAKE}
diff --git a/makefile.shared b/makefile.shared
index 13c8eaf..4e9bf85 100644
--- a/makefile.shared
+++ b/makefile.shared
@@ -53,7 +53,7 @@ $(LIBNAME): $(OBJECTS)
install: $(LIBNAME)
install -d $(LIBPATH)
install -d $(INCPATH)
- $(LT) --mode=install install -c $(LIBNAME) $(LIBPATH)/$(LIBNAME)
+ $(LT) --mode=install install -m 644 $(LIBNAME) $(LIBPATH)/$(LIBNAME)
install -m 644 $(HEADERS_PUB) $(INCPATH)
sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtommath.pc.in > libtommath.pc
install -d $(LIBPATH)/pkgconfig