2014-12-14 18:43:50 +00:00
|
|
|
#
|
|
|
|
# Include makefile for libtommath
|
|
|
|
#
|
|
|
|
|
2015-04-18 11:58:17 +00:00
|
|
|
# Compiler and Linker Names
|
|
|
|
ifndef PREFIX
|
|
|
|
PREFIX=
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CC),cc)
|
|
|
|
CC = $(PREFIX)gcc
|
|
|
|
endif
|
|
|
|
LD=$(PREFIX)ld
|
|
|
|
AR=$(PREFIX)ar
|
|
|
|
RANLIB=$(PREFIX)ranlib
|
|
|
|
|
|
|
|
ifndef MAKE
|
|
|
|
MAKE=make
|
|
|
|
endif
|
|
|
|
|
2015-10-30 21:45:34 +00:00
|
|
|
CFLAGS += -I./ -Wall -Wsign-compare -Wextra -Wshadow
|
2014-12-14 18:43:50 +00:00
|
|
|
|
|
|
|
ifndef NO_ADDTL_WARNINGS
|
|
|
|
# additional warnings
|
|
|
|
CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align
|
|
|
|
CFLAGS += -Wstrict-prototypes -Wpointer-arith
|
|
|
|
endif
|
|
|
|
|
2015-04-26 13:22:49 +00:00
|
|
|
ifdef COMPILE_DEBUG
|
|
|
|
#debug
|
|
|
|
CFLAGS += -g3
|
|
|
|
else
|
|
|
|
|
|
|
|
ifdef COMPILE_SIZE
|
|
|
|
#for size
|
|
|
|
CFLAGS += -Os
|
|
|
|
else
|
|
|
|
|
2014-12-14 18:43:50 +00:00
|
|
|
ifndef IGNORE_SPEED
|
|
|
|
#for speed
|
|
|
|
CFLAGS += -O3 -funroll-loops
|
|
|
|
|
|
|
|
#x86 optimizations [should be valid for any GCC install though]
|
|
|
|
CFLAGS += -fomit-frame-pointer
|
|
|
|
endif
|
|
|
|
|
2015-04-26 13:22:49 +00:00
|
|
|
endif # COMPILE_SIZE
|
|
|
|
endif # COMPILE_DEBUG
|
2014-12-14 18:43:50 +00:00
|
|
|
|
|
|
|
HEADERS=tommath.h tommath_class.h tommath_superclass.h
|
|
|
|
|
2015-04-18 11:58:17 +00:00
|
|
|
test_standalone: CFLAGS+=-DLTM_DEMO_TEST_VS_MTEST=0
|
2014-12-14 18:43:50 +00:00
|
|
|
|
|
|
|
|