target "libgenetic.a" { rule "lib"; input files("src/*.cpp"); CXXFLAGS += "-I. -ggdb"; } for src in files("src/tests/*.cpp") do { target src.replace("src/","").replace(".cpp","") { rule "exe"; input src; requires "libgenetic.a"; CXXFLAGS += "-I. -ggdb"; LDFLAGS += "-L. -lgenetic -lbu++ -ggdb"; } }