diff --git a/ChangeLog b/ChangeLog index 6b6c386..5a720f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2001-04-25 Richard Kreckel + + * src/base/cl_low.h: Added several checks if NO_ASM is defined, so + this definition becomes actually useful. This is needed for + compilation on Arm until somebody fixes the assembler files for Arm. + * src/base/digitseq/cl_asm.h: Likewise. + * src/base/digitseq/cl_asm_.cc: Likewise. + * */Makefile.in: Added `override' in front of `CPPFLAGS +=' so + one can say `make CPPFLAGS=-DFOOBAR'. + 2001-03-26 Arvid Norberg * src/base/random/cl_random_from.cc: ported to beos. diff --git a/benchmarks/Makefile.in b/benchmarks/Makefile.in index 0cc970c..19ecb0e 100644 --- a/benchmarks/Makefile.in +++ b/benchmarks/Makefile.in @@ -16,7 +16,7 @@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ CXXCPP = @CXXCPP@ INCLUDES = -I../include -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(srcdir) -CPPFLAGS += $(INCLUDES) +override CPPFLAGS += $(INCLUDES) LIBTOOL = @LIBTOOL@ LIBTOOL_LINK = $(LIBTOOL) --mode=link MV = mv diff --git a/examples/Makefile.in b/examples/Makefile.in index c6540a5..51fb722 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -19,7 +19,7 @@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ CXXCPP = @CXXCPP@ INCLUDES = -I../include -I$(top_srcdir)/include -I$(srcdir) -CPPFLAGS += $(INCLUDES) +override CPPFLAGS += $(INCLUDES) LIBTOOL = @LIBTOOL@ LIBTOOL_LINK = $(LIBTOOL) --mode=link MV = mv diff --git a/src/Makefile.in b/src/Makefile.in index 1c91c1e..1a6c95a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -26,7 +26,7 @@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ CXXCPP = @CXXCPP@ INCLUDES = -I../include -I$(top_srcdir)/include -CPPFLAGS += $(INCLUDES) +override CPPFLAGS += $(INCLUDES) LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile @@ -69,7 +69,7 @@ VPATH = $(srcdir)/$(SUBDIR) # : # Add subdirectory specific flags. include $(srcdir)/$(SUBDIR)/Makeflags -CPPFLAGS += $(SUBDIR_INCLUDES) +override CPPFLAGS += $(SUBDIR_INCLUDES) # Need to know the system name. SYSTEM := $(shell uname -s) diff --git a/src/base/cl_low.h b/src/base/cl_low.h index d146f27..27a3b70 100644 --- a/src/base/cl_low.h +++ b/src/base/cl_low.h @@ -295,7 +295,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) #else #define mulu32(x,y,hi_zuweisung,lo_zuweisung) \ { lo_zuweisung mulu32_(x,y); hi_zuweisung mulu32_high; } - #if defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__mips__) || defined(__hppa__) + #if (defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__mips__) || defined(__hppa__)) && !defined(NO_ASM) // mulu32_ extern in Assembler #if defined(__sparc__) || defined(__sparc64__) extern "C" uint32 _get_g1 (void); @@ -344,7 +344,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) hi_zuweisung _hi; \ lo_zuweisung _lo; \ }) -#elif defined(__GNUC__) && defined(__sparc64__) +#elif defined(__GNUC__) && defined(__sparc64__) && !defined(NO_ASM) #define mulu64(x,y,hi_zuweisung,lo_zuweisung) \ ({ lo_zuweisung mulu64_(x,y); /* extern in Assembler */ \ {var register uint64 _hi __asm__("%g2"); \ @@ -415,7 +415,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) q_zuweisung (uint16)__q; \ r_zuweisung (uint16)__r; \ }) -#elif defined(__GNUC__) && (defined(__sparc__) || defined(__sparc64__)) +#elif defined(__GNUC__) && (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ ({ var uint32 __qr = divu_3216_1616_(x,y); /* extern in Assembler */\ q_zuweisung low16(__qr); \ @@ -459,13 +459,13 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) q_zuweisung __q; \ r_zuweisung (__x - __q * __y); \ }) -#elif defined(__sparc__) || defined(__sparc64__) +#elif (defined(__sparc__) || defined(__sparc64__)) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { var uint32 __qr = divu_3216_1616_(x,y); /* extern in Assembler */ \ q_zuweisung low16(__qr); \ r_zuweisung high16(__qr); \ } -#elif defined(__arm__) +#elif defined(__arm__) && !defined(NO_ASM) #define divu_3216_1616(x,y,q_zuweisung,r_zuweisung) \ { q_zuweisung divu_3216_1616_(x,y); /* extern in Assembler */ \ r_zuweisung divu_16_rest; \ @@ -723,7 +723,7 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2) #else #define divu_6432_3232(xhi,xlo,y,q_zuweisung,r_zuweisung) \ { q_zuweisung divu_6432_3232_(xhi,xlo,y); r_zuweisung divu_32_rest; } - #if defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__hppa__) + #if (defined(__m68k__) || defined(__sparc__) || defined(__sparc64__) || defined(__arm__) || (defined(__i386__) && !defined(WATCOM) && !defined(MICROSOFT)) || defined(__hppa__)) && !defined(NO_ASM) // divu_6432_3232_ extern in Assembler #if defined(__sparc__) || defined(__sparc64__) extern "C" uint32 _get_g1 (void); diff --git a/src/base/digitseq/cl_asm.h b/src/base/digitseq/cl_asm.h index 1a460c4..68a109d 100644 --- a/src/base/digitseq/cl_asm.h +++ b/src/base/digitseq/cl_asm.h @@ -3,6 +3,8 @@ #include "cln/config.h" #include "cl_DS_endian.h" +#ifndef NO_ASM + #ifdef __m68k__ #include "cl_asm_m68k.h" #endif @@ -31,3 +33,4 @@ #include "cl_asm_arm.h" #endif +#endif // ndef NO_ASM diff --git a/src/base/digitseq/cl_asm_.cc b/src/base/digitseq/cl_asm_.cc index 60b9ff1..a0ed0d5 100644 --- a/src/base/digitseq/cl_asm_.cc +++ b/src/base/digitseq/cl_asm_.cc @@ -3,6 +3,8 @@ #include "cln/config.h" #include "cl_DS_endian.h" +#ifndef NO_ASM + #ifdef __m68k__ #include "cl_asm_m68k_.cc" #endif @@ -31,3 +33,4 @@ #include "cl_asm_arm_.cc" #endif +#endif // ndef NO_ASM diff --git a/tests/Makefile.in b/tests/Makefile.in index 3807271..9cc9ee2 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -16,7 +16,7 @@ CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ CXXCPP = @CXXCPP@ INCLUDES = -I../include -I$(top_srcdir)/include -I$(srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/base -I$(top_srcdir)/src/float -I$(top_srcdir)/src/float/lfloat -I$(top_srcdir)/src/integer -I$(top_srcdir)/src/base/random -I$(top_srcdir)/src/base/digitseq -I$(top_srcdir)/src/base/digit -I../src/base -I$(top_srcdir)/src/base -CPPFLAGS += $(INCLUDES) +override CPPFLAGS += $(INCLUDES) LIBTOOL = @LIBTOOL@ LIBTOOL_LINK = $(LIBTOOL) --mode=link MV = mv