b98147c972
- add tommath_private.h to HEADERS - only install public header files - move more shared stuff to makefile.include - make it possible to override the *PATH makefile variables
75 lines
1.3 KiB
Plaintext
75 lines
1.3 KiB
Plaintext
#
|
|
# Include makefile for libtommath
|
|
#
|
|
|
|
# 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
|
|
|
|
CFLAGS += -I./ -Wall -Wsign-compare -Wextra -Wshadow
|
|
|
|
ifndef NO_ADDTL_WARNINGS
|
|
# additional warnings
|
|
CFLAGS += -Wsystem-headers -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align
|
|
CFLAGS += -Wstrict-prototypes -Wpointer-arith
|
|
endif
|
|
|
|
ifdef COMPILE_DEBUG
|
|
#debug
|
|
CFLAGS += -g3
|
|
else
|
|
|
|
ifdef COMPILE_SIZE
|
|
#for size
|
|
CFLAGS += -Os
|
|
else
|
|
|
|
ifndef IGNORE_SPEED
|
|
#for speed
|
|
CFLAGS += -O3 -funroll-loops
|
|
|
|
#x86 optimizations [should be valid for any GCC install though]
|
|
CFLAGS += -fomit-frame-pointer
|
|
endif
|
|
|
|
endif # COMPILE_SIZE
|
|
endif # COMPILE_DEBUG
|
|
|
|
HEADERS_PUB=tommath.h tommath_class.h tommath_superclass.h
|
|
HEADERS=tommath_private.h $(HEADERS_PUB)
|
|
|
|
test_standalone: CFLAGS+=-DLTM_DEMO_TEST_VS_MTEST=0
|
|
|
|
#install as this user
|
|
ifndef INSTALL_GROUP
|
|
GROUP=wheel
|
|
else
|
|
GROUP=$(INSTALL_GROUP)
|
|
endif
|
|
|
|
ifndef INSTALL_USER
|
|
USER=root
|
|
else
|
|
USER=$(INSTALL_USER)
|
|
endif
|
|
|
|
#LIBPATH-The directory for libtommath to be installed to.
|
|
#INCPATH-The directory to install the header files for libtommath.
|
|
#DATAPATH-The directory to install the pdf docs.
|
|
LIBPATH?=/usr/lib
|
|
INCPATH?=/usr/include
|
|
DATAPATH?=/usr/share/doc/libtommath/pdf
|
|
|