fixed build.sh
This commit is contained in:
parent
0737916f1a
commit
500bbb02ea
1
TODO
1
TODO
@ -49,6 +49,5 @@ BUGS:
|
||||
xargs (getopt with glibc)
|
||||
|
||||
FIX:
|
||||
ps (proc_parser.h)
|
||||
echo (escape)
|
||||
que (unicode)
|
||||
|
14
build.sh
14
build.sh
@ -1,11 +1,23 @@
|
||||
#!/bin/sh
|
||||
CFLAGS="-s -Os -Wextra -Wall -pedantic"
|
||||
./clean.sh
|
||||
|
||||
if [ -z $CC ]; then
|
||||
CC="cc"
|
||||
fi
|
||||
|
||||
if [ -z $CFLAGS ]; then
|
||||
CFLAGS="-s -Os -Wextra -Wall -pedantic"
|
||||
fi
|
||||
|
||||
chmod +x ./libmu/build-libmu.sh
|
||||
./libmu/build-libmu.sh
|
||||
|
||||
if [[ $1 == "box" ]]; then
|
||||
env CC="$CC" CFLAGS="$CFLAGS" ./scripts/build-box.sh
|
||||
|
||||
else
|
||||
for i in $(ls src); do
|
||||
echo "CC $i"
|
||||
echo $CFLAGS | xargs $CC -Iconfigs -Ilibmu src/$i -o bin/$(basename $i .c) obj/*.o
|
||||
done
|
||||
fi
|
||||
|
@ -1,10 +1,4 @@
|
||||
#!/bin/sh
|
||||
CFLAGS="-s -Os -Wextra -Wall -pedantic"
|
||||
CC="cc"
|
||||
|
||||
chmod +x ./libmu/build-libmu.sh
|
||||
./libmu/build-libmu.sh
|
||||
|
||||
cat > mutils.c << EOF
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -24,7 +18,7 @@ $(for i in $(ls src); do
|
||||
#EDIT SOURCES
|
||||
cat src/$i | sed "s/main(/"$f"_main(/g" > bin/$i
|
||||
|
||||
#MAKE STRUCTURE
|
||||
#FILL STRUCTURE
|
||||
echo -e "\t{"$f"_main, \"$f\"},"
|
||||
done)
|
||||
};
|
||||
@ -47,4 +41,4 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
EOF
|
||||
|
||||
echo $CFLAGS | xargs $CC -Iconfigs -Ilibmu bin/*.c obj/*.o mutils.c -omutils
|
||||
echo $CFLAGS | xargs $CC -Iconfigs -Ilibmu mutils.c obj/*.o bin/*.c -o mutils
|
@ -13,7 +13,6 @@ static size_t r_size;
|
||||
|
||||
static char i_flag;
|
||||
static char F_flag;
|
||||
static char E_flag;
|
||||
static char H_flag;
|
||||
|
||||
static int addpattern(char *str) {
|
||||
|
Loading…
Reference in New Issue
Block a user