Compare commits
4 Commits
dbdab01a2c
...
99a9cd10f5
Author | SHA1 | Date | |
---|---|---|---|
99a9cd10f5 | |||
7e1c25b649 | |||
9008e10651 | |||
d27fc14b31 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,4 +4,5 @@ test
|
|||||||
test.*
|
test.*
|
||||||
*.dSYM
|
*.dSYM
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
libwapp-build
|
||||||
libwapp.so
|
libwapp.so
|
||||||
|
9
compile
9
compile
@ -30,6 +30,11 @@ SRC="\
|
|||||||
TEST_SRC="\
|
TEST_SRC="\
|
||||||
$(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ") \
|
$(find tests -type f -name "*.c" | xargs -I{} echo -n "{} ") \
|
||||||
"
|
"
|
||||||
|
BUILD_DIR="libwapp-build/posix-$BUILD_TYPE"
|
||||||
|
if [[ -d $BUILD_DIR ]]; then
|
||||||
|
rm -rf $BUILD_DIR
|
||||||
|
fi
|
||||||
|
mkdir -p $BUILD_DIR
|
||||||
|
|
||||||
if [[ $BUILD_TYPE == "release" ]]; then
|
if [[ $BUILD_TYPE == "release" ]]; then
|
||||||
CFLAGS+="-O3"
|
CFLAGS+="-O3"
|
||||||
@ -37,8 +42,8 @@ else
|
|||||||
CFLAGS+="-g -fsanitize=address -fsanitize=undefined"
|
CFLAGS+="-g -fsanitize=address -fsanitize=undefined"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OUT="libwapp.so"
|
OUT="$BUILD_DIR/libwapp.so"
|
||||||
TEST_OUT="./wapptest"
|
TEST_OUT="$BUILD_DIR/wapptest"
|
||||||
|
|
||||||
# Compile tests
|
# Compile tests
|
||||||
if [[ $(echo $TEST_SRC | xargs) != "" ]]; then
|
if [[ $(echo $TEST_SRC | xargs) != "" ]]; then
|
||||||
|
@ -40,7 +40,7 @@ void dirup(char *dst, u64 levels, const char *path) {
|
|||||||
--length;
|
--length;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (u64 i = length - 1; i >= 0; --i) {
|
for (i64 i = length - 1; i >= 0; --i) {
|
||||||
if (path[i] == path_sep) {
|
if (path[i] == path_sep) {
|
||||||
++sep_count;
|
++sep_count;
|
||||||
end_index = i;
|
end_index = i;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "tester.h"
|
#include "tester.h"
|
||||||
#include "aliases.h"
|
#include "aliases.h"
|
||||||
#include "termcolour/termcolour.h"
|
#include "termcolour.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user