Last change
on this file since 1850e89 was
1850e89,
checked in by mkvore-commit <mkvore-commit@…>, 11 years ago
|
removes a bug in SAM v1 and v2 (introduced when merging with v3)
|
-
Property mode set to
100755
|
File size:
1.4 KB
|
Line | |
---|
1 | #/bin/sh |
---|
2 | |
---|
3 | case `uname -sr` in |
---|
4 | MINGW*) |
---|
5 | echo "Building windows .dll's";; |
---|
6 | CYGWIN*) |
---|
7 | echo "Building windows .dll's";; |
---|
8 | Linux*) |
---|
9 | echo "Building linux .so's";; |
---|
10 | FreeBSD*) |
---|
11 | echo "Building freebsd .so's";; |
---|
12 | *) |
---|
13 | echo "Unsupported build environment" |
---|
14 | exit;; |
---|
15 | esac |
---|
16 | |
---|
17 | rm -rf lib |
---|
18 | mkdir lib |
---|
19 | mkdir lib/freenet |
---|
20 | mkdir lib/freenet/support |
---|
21 | mkdir lib/freenet/support/CPUInformation |
---|
22 | |
---|
23 | CC="gcc" |
---|
24 | |
---|
25 | case `uname -sr` in |
---|
26 | MINGW*) |
---|
27 | JAVA_HOME="/c/software/j2sdk1.4.2_05" |
---|
28 | COMPILEFLAGS="-Wall" |
---|
29 | INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/win32/" |
---|
30 | LINKFLAGS="-shared -static -static-libgcc -Wl,--kill-at" |
---|
31 | LIBFILE="lib/freenet/support/CPUInformation/jcpuid-x86-windows.dll";; |
---|
32 | FreeBSD*) |
---|
33 | COMPILEFLAGS="-Wall" |
---|
34 | INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/freebsd/" |
---|
35 | LINKFLAGS="-shared -static -Wl,-soname,libjcpuid-x86-freebsd.so" |
---|
36 | LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-freebsd.so";; |
---|
37 | Linux*) |
---|
38 | COMPILEFLAGS="-fPIC -Wall" |
---|
39 | INCLUDES="-I. -Iinclude -I$JAVA_HOME/include -I$JAVA_HOME/include/linux" |
---|
40 | LINKFLAGS="-shared -Wl,-soname,libjcpuid-x86-linux.so" |
---|
41 | LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so";; |
---|
42 | esac |
---|
43 | |
---|
44 | echo "Compiling C code..." |
---|
45 | rm -f $LIBFILE |
---|
46 | $CC $COMPILEFLAGS $LINKFLAGS $INCLUDES src/*.c -o $LIBFILE |
---|
47 | strip $LIBFILE |
---|
48 | echo Built $LIBFILE |
---|
49 | |
---|
50 | #g++ -shared -static -static-libgcc -Iinclude -I$JAVA_HOME/include \ |
---|
51 | # -I$JAVA_HOME/include/linux src/*.cpp \ |
---|
52 | # -o lib/freenet/support/CPUInformation/libjcpuid-x86-linux.so |
---|
Note: See
TracBrowser
for help on using the repository browser.