1 #Makefile for GCC by Tom St Denis
2 CFLAGS
+= -I.
-Os
-Wall
-W
6 #default files to install
10 #LIBPATH-The directory for libtomcrypt to be installed to.
11 #INCPATH-The directory to install the header files for libtommath.
12 #DATAPATH-The directory to install the pdf docs.
16 DATAPATH
=/usr
/share
/doc
/libtompoly
/pdf
20 OBJECTS
= pb_init.o pb_clear.o pb_init_size.o pb_grow.o pb_copy.o pb_clamp.o pb_init_copy.o \
21 pb_add.o pb_sub.o pb_mul.o pb_div.o pb_zero.o pb_lshd.o pb_rshd.o pb_exch.o pb_mod.o \
22 pb_addmod.o pb_submod.o pb_mulmod.o pb_gcd.o pb_init_multi.o pb_clear_multi.o pb_invmod.o \
23 pb_cmp.o pb_shrink.o pb_exteuclid.o pb_monic.o pb_exptmod.o pb_isirreduc.o pb_rawsize.o \
24 pb_toraw.o pb_readraw.o
26 libtompoly.a
: $(OBJECTS
)
27 ar $(ARFLAGS
) libtompoly.a
$(OBJECTS
)
30 install -d
-g root
-o root
$(DESTDIR
)$(LIBPATH
)
31 install -d
-g root
-o root
$(DESTDIR
)$(INCPATH
)
32 install -g root
-o root
$(LIBNAME
) $(DESTDIR
)$(LIBPATH
)
33 install -g root
-o root
$(HEADERS
) $(DESTDIR
)$(INCPATH
)
35 demo
: demo
/demo.o libtompoly.a
36 gcc demo
/demo.o libtompoly.a
-ltommath
-o pbdemo
46 pdflatex pb
>/dev
/null
49 rm -f
*.o
*.a
*.obj
*.lib
*.exe pbdemo demo
/*.o demo
/*.obj demo
/*.exe
50 rm -f
*.idx
*.ilg
*.ind
*.lof
*.out
*.toc
*.
dvi *.log
*.aux
53 cd ..
; rm -rf ltp
* libtompoly-
$(VERSION
) ; mkdir libtompoly-
$(VERSION
) ; \
54 cp
-R .
/libtompoly
/* .
/libtompoly-
$(VERSION
)/ ; \
55 tar -c libtompoly-
$(VERSION
)/* | bzip2
-9vvc
> ltp-
$(VERSION
).
tar.bz2
; \
56 zip
-9 -r ltp-
$(VERSION
).zip libtompoly-
$(VERSION
)/*