forked from OctaForge/OctaBuild
add octabuild build file for octabuild itself
parent
4b6d9c466a
commit
1e4fa93847
|
@ -40,6 +40,9 @@ Use the provided Makefile to build - adjust the paths to OctaSTD and
|
||||||
libcubescript if necessary. There is a provided example build script
|
libcubescript if necessary. There is a provided example build script
|
||||||
in `example`.
|
in `example`.
|
||||||
|
|
||||||
|
It's also possible to build OctaBuild with OctaBuild. There is a provided
|
||||||
|
obuild.cfg in the main directory.
|
||||||
|
|
||||||
The octabuild binary supports the `-h` option to display help.
|
The octabuild binary supports the `-h` option to display help.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
CXX = (getenv CXX c++)
|
||||||
|
|
||||||
|
OB_CXXFLAGS = "-g -Wall -Wextra -O2"
|
||||||
|
|
||||||
|
CUBESCRIPT_PATH = "../libcubescript"
|
||||||
|
OCTASTD_PATH = "../octastd"
|
||||||
|
|
||||||
|
FILES = [main.o globs.o cubescript.o]
|
||||||
|
|
||||||
|
OB_CXXFLAGS = [@OB_CXXFLAGS -std=c++11 -I. -I@CUBESCRIPT_PATH -I@OCTASTD_PATH -pthread]
|
||||||
|
|
||||||
|
rule obuild $FILES [
|
||||||
|
echo " LD" $target
|
||||||
|
shell $CXX $OB_CXXFLAGS -o obuild $sources
|
||||||
|
]
|
||||||
|
|
||||||
|
rule cubescript.o [@CUBESCRIPT_PATH/cubescript.cc] [
|
||||||
|
echo " CXX" $target
|
||||||
|
shell $CXX $OB_CXXFLAGS -c -o $target $source
|
||||||
|
]
|
||||||
|
|
||||||
|
rule %.o %.cc [
|
||||||
|
echo " CXX" $target
|
||||||
|
shell $CXX $OB_CXXFLAGS -c -o $target $source
|
||||||
|
]
|
||||||
|
|
||||||
|
action clean [
|
||||||
|
echo " CLEAN" $FILES obuild
|
||||||
|
shell rm -f $FILES obuild
|
||||||
|
]
|
||||||
|
|
||||||
|
depend main.o globs.hh tpool.hh [@CUBESCRIPT_PATH/cubescript.hh]
|
||||||
|
depend globs.o globs.hh [@CUBESCRIPT_PATH/cubescript.hh]
|
||||||
|
depend cubescript.o [@CUBESCRIPT_PATH/cubescript.hh]
|
||||||
|
|
||||||
|
rule default obuild
|
Loading…
Reference in New Issue