From: fennecdjay Date: Tue, 15 Oct 2019 23:42:28 +0000 (+0200) Subject: :art: Remove -k X-Git-Tag: nightly~2127 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c877c10fa8116a4aa072be5e43b777e79859e0c2;p=gwion.git :art: Remove -k --- diff --git a/Makefile b/Makefile index 63c2dc24..fb5f6c4c 100644 --- a/Makefile +++ b/Makefile @@ -12,14 +12,8 @@ CFLAGS += -DGWION_PACKAGE='"${GWION_PACKAGE}"' GIT_BRANCH=$(shell git branch | grep "*" | cut -d" " -f2) -# initialize source lists -src_src := $(wildcard src/*.c) -lib_src := $(wildcard src/lib/*.c) -oo_src := $(wildcard src/oo/*.c) -vm_src := $(wildcard src/vm/*.c) -parse_src := $(wildcard src/parse/*.c) -util_src := $(wildcard src/util/*.c) -emit_src := $(wildcard src/emit/*.c) +src := $(wildcard src/*.c) +src += $(wildcard src/*/*.c) test_dir_all := $(wildcard tests/*) test_ignore = tests/benchmark tests/import @@ -36,21 +30,8 @@ else LDFLAGS += -ldl -lpthread endif -# add directories -CFLAGS+=-DGWPLUG_DIR=\"${GWPLUG_DIR}\" - -# initialize object lists -src_obj := $(src_src:.c=.o) -lib_obj := $(lib_src:.c=.o) -ast_obj := $(ast_src:.c=.o) -parse_obj := $(parse_src:.c=.o) -emit_obj := $(emit_src:.c=.o) -oo_obj := $(oo_src:.c=.o) -vm_obj := $(vm_src:.c=.o) -util_obj := $(util_src:.c=.o) -GW_OBJ=${src_obj} ${ast_obj} ${parse_obj} ${emit_obj} ${oo_obj} ${vm_obj} ${util_obj} ${lib_obj} -src=${src_src} ${ast_src} ${parse_src} ${emit_src} ${oo_src} ${vm_src} ${util_src} ${lib_src} -gwlib_obj := $(filter-out src/main.o, ${GW_OBJ}) +src_obj := $(src:.c=.o) +lib_obj := $(filter-out src/main.o, ${src_obj}) CFLAGS += -Iinclude @@ -66,11 +47,6 @@ ifeq ($(shell uname), Linux) LDFLAGS += -lrt -rdynamic endif -INSTALLED_INCLUDE = -I${PREFIX}/include/gwion -I${PREFIX}/include/gwion/util -I${PREFIX}/include/gwion/ast -CCFG="${INSTALLED_INCLUDE} ${CFLAGS}" -LDCFG="${LDFLAGS}" - -# hide this from gwion -v CFLAGS += -DGWION_BUILTIN GWLIBS = libgwion.a ast/libgwion_ast.a util/libgwion_util.a @@ -83,29 +59,29 @@ all: options-show util/libgwion_util.a ast/libgwion_ast.a libgwion.a src/main.o options-show: @$(call _options) -libgwion.a: ${gwlib_obj} +libgwion.a: ${lib_obj} ${AR} ${AR_OPT} util/libgwion_util.a: @make -C util +util: util/libgwion_util.a + @(info build util) + ast/libgwion_ast.a: @make -C ast +ast: ast/libgwion_ast.a + @(info build ast) + clean: $(info cleaning ...) @rm -f */*.o */*/*.o */*.gw.* */*/*.gw.* */*/*.gcda */*/*.gcno gwion libgwion.a src/*.gcno src/*.gcda -src/arg.o: - $(info compile $(<:.c=) (with arguments defines)) - @${CC} $(DEPFLAGS) ${CFLAGS} ${CICFLAGS} -c src/arg.c -o src/arg.o -DLDFLAGS='${LDCFG}' -DCFLAGS='${CCFG}' - @mv -f $(DEPDIR)/$(@F:.o=.Td) $(DEPDIR)/$(@F:.o=.d) && touch $@ - @echo $@: config.mk >> $(DEPDIR)/$(@F:.o=.d) - install: ${PRG} $(info installing ${GWION_PACKAGE} in ${PREFIX}) @install ${PRG} ${DESTDIR}/${PREFIX}/bin - @sed "s#PREFIX#${PREFIX}#g" scripts/gwion-config > gwion-config + @sed "s/PREFIX/${PREFIX}/g" scripts/gwion-config > gwion-config @install gwion-config ${DESTDIR}/${PREFIX}/bin/gwion-config @install scripts/gwion-pkg ${DESTDIR}/${PREFIX}/bin/gwion-pkg @rm gwion-config diff --git a/scripts/gwion-config b/scripts/gwion-config index b1f5eb8e..e11a5018 100644 --- a/scripts/gwion-config +++ b/scripts/gwion-config @@ -22,9 +22,8 @@ compile() { if [ $# = 0 ] then usage -elif [ "$1" = "--version" ] -then version -elif [ "$1" = "--help" ] +elif [ "$1" = "--version" ] || + [ "$1" = "--help" ] then version elif [ "$1" = "link" ] then link diff --git a/src/arg.c b/src/arg.c index 3975dafd..2c6e48ed 100644 --- a/src/arg.c +++ b/src/arg.c @@ -52,7 +52,6 @@ ANN void arg_release(Arg* arg) { static const char usage[] = "usage: Gwion \n" " -h : this help\n" -" -k : show compilation flags\n" " -c : load config\n" " -p : add a plugin directory\n" " -s : set samplerate\n" @@ -91,9 +90,6 @@ ANN m_bool _arg_parse(const Gwion gwion, Arg* arg) { case 'h': gw_err(usage); break; - case 'k': - gw_err("CFLAGS: %s\nLDFLAGS: %s\n", CFLAGS, LDFLAGS); - break; case 'c': CHECK_OB((tmp = _get_arg(arg, &i))) config_parse(gwion, arg, tmp); diff --git a/tests/sh/opt.sh b/tests/sh/opt.sh index 241e14c0..b86f33a4 100644 --- a/tests/sh/opt.sh +++ b/tests/sh/opt.sh @@ -65,10 +65,6 @@ run "$n" "memoize" "-z2 tests/new/pure*.gw" "file" n=$((n+1)) run "$n" "module argument" "-mfake:test" "file" -# get Kompile time Konfig -n=$((n+1)) -run "$n" "Kompile time Konfig" "-k" "file" - # set compilation passes n=$((n+1)) run "$n" "just check" "-g check" "file"