makefiles: add makefile.include
to be used in makefile and makefile.shared use -Wextra instead of deprecated -W add additional warnings also used in libtomcrypt can be disabled by defining NO_ADDTL_WARNINGS add possibility to define COMPILE_SIZE or COMPILE_DEBUG
This commit is contained in:
		
							parent
							
								
									35488c9e84
								
							
						
					
					
						commit
						ffb172f403
					
				
							
								
								
									
										20
									
								
								makefile
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								makefile
									
									
									
									
									
								
							@ -5,7 +5,7 @@
 | 
				
			|||||||
#version of library
 | 
					#version of library
 | 
				
			||||||
VERSION=0.42.0
 | 
					VERSION=0.42.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CFLAGS  +=  -I./ -Wall -W -Wshadow -Wsign-compare
 | 
					include makefile.include
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Compiler and Linker Names
 | 
					# Compiler and Linker Names
 | 
				
			||||||
ifndef PREFIX
 | 
					ifndef PREFIX
 | 
				
			||||||
@ -23,22 +23,6 @@ ifndef MAKE
 | 
				
			|||||||
   MAKE=make
 | 
					   MAKE=make
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ifndef IGNORE_SPEED
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#for speed
 | 
					 | 
				
			||||||
CFLAGS += -O3 -funroll-loops
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#for size
 | 
					 | 
				
			||||||
#CFLAGS += -Os
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#x86 optimizations [should be valid for any GCC install though]
 | 
					 | 
				
			||||||
CFLAGS  += -fomit-frame-pointer
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#debug
 | 
					 | 
				
			||||||
#CFLAGS += -g3
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#install as this user
 | 
					#install as this user
 | 
				
			||||||
ifndef INSTALL_GROUP
 | 
					ifndef INSTALL_GROUP
 | 
				
			||||||
   GROUP=wheel
 | 
					   GROUP=wheel
 | 
				
			||||||
@ -59,8 +43,6 @@ endif
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
default: ${LIBNAME}
 | 
					default: ${LIBNAME}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEADERS=tommath.h tommath_class.h tommath_superclass.h
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#LIBPATH-The directory for libtommath to be installed to.
 | 
					#LIBPATH-The directory for libtommath to be installed to.
 | 
				
			||||||
#INCPATH-The directory to install the header files for libtommath.
 | 
					#INCPATH-The directory to install the header files for libtommath.
 | 
				
			||||||
#DATAPATH-The directory to install the pdf docs.
 | 
					#DATAPATH-The directory to install the pdf docs.
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										34
									
								
								makefile.include
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								makefile.include
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,34 @@
 | 
				
			|||||||
 | 
					#
 | 
				
			||||||
 | 
					# Include makefile for libtommath
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ifndef IGNORE_SPEED
 | 
				
			||||||
 | 
					#for speed
 | 
				
			||||||
 | 
					CFLAGS += -O3 -funroll-loops
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#x86 optimizations [should be valid for any GCC install though]
 | 
				
			||||||
 | 
					CFLAGS  += -fomit-frame-pointer
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ifdef COMPILE_SIZE
 | 
				
			||||||
 | 
					#for size
 | 
				
			||||||
 | 
					CFLAGS += -Os
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ifdef COMPILE_DEBUG
 | 
				
			||||||
 | 
					#debug
 | 
				
			||||||
 | 
					CFLAGS += -g3
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					HEADERS=tommath.h tommath_class.h tommath_superclass.h
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -3,24 +3,11 @@
 | 
				
			|||||||
#Tom St Denis
 | 
					#Tom St Denis
 | 
				
			||||||
VERSION=0:42
 | 
					VERSION=0:42
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					include makefile.include
 | 
				
			||||||
 | 
					
 | 
				
			||||||
LT	?= libtool
 | 
					LT	?= libtool
 | 
				
			||||||
LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
 | 
					LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CFLAGS  +=  -I./ -Wall -W -Wshadow -Wsign-compare
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ifndef IGNORE_SPEED
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#for speed
 | 
					 | 
				
			||||||
CFLAGS += -O3 -funroll-loops
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#for size
 | 
					 | 
				
			||||||
#CFLAGS += -Os
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#x86 optimizations [should be valid for any GCC install though]
 | 
					 | 
				
			||||||
CFLAGS  += -fomit-frame-pointer
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
endif
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#install as this user
 | 
					#install as this user
 | 
				
			||||||
ifndef INSTALL_GROUP
 | 
					ifndef INSTALL_GROUP
 | 
				
			||||||
   GROUP=wheel
 | 
					   GROUP=wheel
 | 
				
			||||||
@ -79,8 +66,6 @@ bn_s_mp_add.o bn_s_mp_exptmod.o bn_s_mp_mul_digs.o bn_s_mp_mul_high_digs.o bn_s_
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#END_INS
 | 
					#END_INS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
HEADERS=tommath.h tommath_class.h tommath_superclass.h
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
objs: $(OBJECTS)
 | 
					objs: $(OBJECTS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.c.o:
 | 
					.c.o:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user