Skip to content

Commit 0d439e5

Browse files
committed
Add CPU detection and a build system
Also split the file
1 parent 642b2fe commit 0d439e5

9 files changed

Lines changed: 2058 additions & 1737 deletions

File tree

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,19 @@ We now have the original vector `x`.
4141
## Compilation
4242

4343
### Linux
44+
45+
#### With Meson
46+
```
47+
$ meson build
48+
$ ninja -C build
49+
```
50+
51+
#### Manually
4452
```
45-
gcc -std=c99 -shared -fPIC -O2 -march=native descale.c -o libdescale.so
53+
$ gcc -std=c99 -shared -fPIC -O2 -march=native -Isrc -DDESCALE_X86 src/descale.c src/x86/cpuinfo_x86.c src/x86/descale_avx2.c -o libdescale.so
4654
```
4755

4856
### Cross-compilation for Windows
4957
```
50-
x86_64-w64-mingw32-gcc -std=c99 -shared -fPIC -O2 -march=native descale.c -s -o libdescale.dll
58+
$ x86_64-w64-mingw32-gcc -std=c99 -shared -fPIC -O2 -march=native -Isrc -DDESCALE_X86 src/descale.c src/x86/cpuinfo_x86.c src/x86/descale_avx2.c -s -o libdescale.dll
5159
```

0 commit comments

Comments
 (0)