Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 02646ebc08 |
+3
-10
@@ -1,8 +1,6 @@
|
|||||||
COMPILE_OPTIONS = -O3 -fomit-frame-pointer -ffast-math -fno-math-errno -g -fPIC -fno-strict-aliasing -Wall -Wno-unused-value -Wno-unused -march=core2
|
COMPILE_OPTIONS = -O3 -fomit-frame-pointer -ffast-math -fno-math-errno -g -fno-strict-aliasing -Wall -Wno-unused-value -Wno-unused -march=core2
|
||||||
LINKER_OPTIONS = -lpthread -g
|
LINKER_OPTIONS = -lpthread -g
|
||||||
|
|
||||||
LIBCRUNCH = libcrunch.a
|
|
||||||
|
|
||||||
OBJECTS = \
|
OBJECTS = \
|
||||||
crn_arealist.o \
|
crn_arealist.o \
|
||||||
crn_assert.o \
|
crn_assert.o \
|
||||||
@@ -84,9 +82,6 @@ all: crunch
|
|||||||
%.o: %.cpp
|
%.o: %.cpp
|
||||||
g++ $< -o $@ -c $(COMPILE_OPTIONS)
|
g++ $< -o $@ -c $(COMPILE_OPTIONS)
|
||||||
|
|
||||||
$(LIBCRUNCH): $(OBJECTS)
|
|
||||||
ar rcs $(LIBCRUNCH) $(OBJECTS)
|
|
||||||
|
|
||||||
crunch.o: ../crunch/crunch.cpp
|
crunch.o: ../crunch/crunch.cpp
|
||||||
g++ $< -o $@ -c -I../inc -I../crnlib $(COMPILE_OPTIONS)
|
g++ $< -o $@ -c -I../inc -I../crnlib $(COMPILE_OPTIONS)
|
||||||
|
|
||||||
@@ -96,8 +91,6 @@ corpus_gen.o: ../crunch/corpus_gen.cpp
|
|||||||
corpus_test.o: ../crunch/corpus_test.cpp
|
corpus_test.o: ../crunch/corpus_test.cpp
|
||||||
g++ $< -o $@ -c -I../inc -I../crnlib $(COMPILE_OPTIONS)
|
g++ $< -o $@ -c -I../inc -I../crnlib $(COMPILE_OPTIONS)
|
||||||
|
|
||||||
crunch: $(LIBCRUNCH) crunch.o corpus_gen.o corpus_test.o
|
crunch: $(OBJECTS) crunch.o corpus_gen.o corpus_test.o
|
||||||
g++ crunch.o corpus_gen.o corpus_test.o -o crunch $(LIBCRUNCH) $(LINKER_OPTIONS)
|
g++ $(OBJECTS) crunch.o corpus_gen.o corpus_test.o -o crunch $(LINKER_OPTIONS)
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf $(LIBCRUNCH) crunch *.o
|
|
||||||
|
|||||||
@@ -56,12 +56,7 @@ namespace crnlib
|
|||||||
|
|
||||||
template<typename T> inline T square(T value) { return value * value; }
|
template<typename T> inline T square(T value) { return value * value; }
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#if CRNLIB_64BIT_POINTERS==0
|
|
||||||
inline bool is_power_of_2(uint32 x) { return x && ((x & (x - 1U)) == 0U); }
|
inline bool is_power_of_2(uint32 x) { return x && ((x & (x - 1U)) == 0U); }
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline bool is_power_of_2(uint64 x) { return x && ((x & (x - 1U)) == 0U); }
|
inline bool is_power_of_2(uint64 x) { return x && ((x & (x - 1U)) == 0U); }
|
||||||
|
|
||||||
template<typename T> inline T align_up_value(T x, uint alignment)
|
template<typename T> inline T align_up_value(T x, uint alignment)
|
||||||
@@ -85,8 +80,6 @@ namespace crnlib
|
|||||||
return align_up_value(x, alignment) - x;
|
return align_up_value(x, alignment) - x;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#if CRNLIB_64BIT_POINTERS==0
|
|
||||||
// From "Hackers Delight"
|
// From "Hackers Delight"
|
||||||
inline uint32 next_pow2(uint32 val)
|
inline uint32 next_pow2(uint32 val)
|
||||||
{
|
{
|
||||||
@@ -98,8 +91,6 @@ namespace crnlib
|
|||||||
val |= val >> 1;
|
val |= val >> 1;
|
||||||
return val + 1;
|
return val + 1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
inline uint64 next_pow2(uint64 val)
|
inline uint64 next_pow2(uint64 val)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ namespace crnlib
|
|||||||
} // namespace crnlib
|
} // namespace crnlib
|
||||||
|
|
||||||
using namespace crnlib;
|
using namespace crnlib;
|
||||||
using crnlib::uint;
|
|
||||||
|
|
||||||
const char* crn_get_format_string(crn_format fmt)
|
const char* crn_get_format_string(crn_format fmt)
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -374,7 +374,7 @@ namespace crnd
|
|||||||
|
|
||||||
const uint32 cIntBits = 32U;
|
const uint32 cIntBits = 32U;
|
||||||
|
|
||||||
#if CRNLIB_64BIT_POINTERS
|
#ifdef _WIN64
|
||||||
typedef uint64 ptr_bits;
|
typedef uint64 ptr_bits;
|
||||||
#else
|
#else
|
||||||
typedef uint32 ptr_bits;
|
typedef uint32 ptr_bits;
|
||||||
|
|||||||
Reference in New Issue
Block a user