build into separate object files to prevent conflicts with makefile results

master
Daniel Kolesa 2015-11-13 19:08:48 +00:00
parent 1e4fa93847
commit 5461815ae3
1 changed files with 9 additions and 9 deletions

View File

@ -5,32 +5,32 @@ OB_CXXFLAGS = "-g -Wall -Wextra -O2"
CUBESCRIPT_PATH = "../libcubescript"
OCTASTD_PATH = "../octastd"
FILES = [main.o globs.o cubescript.o]
FILES = [main_ob.o globs_ob.o cubescript_ob.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
shell $CXX $OB_CXXFLAGS -o obuild_ob $sources
]
rule cubescript.o [@CUBESCRIPT_PATH/cubescript.cc] [
rule cubescript_ob.o [@CUBESCRIPT_PATH/cubescript.cc] [
echo " CXX" $target
shell $CXX $OB_CXXFLAGS -c -o $target $source
]
rule %.o %.cc [
rule %_ob.o %.cc [
echo " CXX" $target
shell $CXX $OB_CXXFLAGS -c -o $target $source
]
action clean [
echo " CLEAN" $FILES obuild
shell rm -f $FILES obuild
echo " CLEAN" $FILES obuild_ob
shell rm -f $FILES obuild_ob
]
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]
depend main_ob.o globs.hh tpool.hh [@CUBESCRIPT_PATH/cubescript.hh]
depend globs_ob.o globs.hh [@CUBESCRIPT_PATH/cubescript.hh]
depend cubescript_ob.o [@CUBESCRIPT_PATH/cubescript.hh]
rule default obuild