From 1f3b22e0c25b3b753143a7efa1b0d494b2a75200 Mon Sep 17 00:00:00 2001 From: ken Date: Mon, 26 Sep 2016 23:06:01 -0700 Subject: [PATCH] fixes, moved ir test driver to testir.c --- src/Makefile | 2 +- src/bin/tools/{ir.c => testir.c} | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) rename src/bin/tools/{ir.c => testir.c} (79%) diff --git a/src/Makefile b/src/Makefile index e811fb0..b5e6754 100644 --- a/src/Makefile +++ b/src/Makefile @@ -168,7 +168,7 @@ endef define SRC_LANG_RULE = $(if $($1),,$(eval $1 := t)\ $(eval MOD := $(filter $(MODULES),$(firstword $(subst /, ,$(dir $1)))))\ -$(eval FLG := $($2_FLAGS) $(MOD:%=-I% ))\ +$(eval FLG := $(MOD:%=-I% ))\ $(if $(wildcard $1), $(eval DEPS := $(filter-out \ %:,$(shell $($2_C) $(FLG) -M -MG $1)))\ $(eval MDEPS := $(filter $(MODULES:%=%/%),$(DEPS)))\ diff --git a/src/bin/tools/ir.c b/src/bin/tools/testir.c similarity index 79% rename from src/bin/tools/ir.c rename to src/bin/tools/testir.c index 243fa3a..69c9c28 100644 --- a/src/bin/tools/ir.c +++ b/src/bin/tools/testir.c @@ -18,15 +18,20 @@ #define CYAN "\x1b[36m" #define CLRX "\x1b[0m" //clear current color +extern //ir.c +void ir_quit(void); +extern +int ir_init(void); +extern + + int main(void); int test_init(void); -int test_malloc(void); int main () { test_init(); - test_malloc(); return 0; } @@ -35,14 +40,15 @@ test_init () { /* Test Init */ printf("YELLOW Initializing\n"); - ir_init(); + if (ir_init()) + { printf("RED FAILED CLRX"); + perror("ir init"); + return 1; + } printf("Quitting CLRX\n"); ir_quit(); + printf("GREEN PASS"); return 0; } -int -test_malloc -() -{ return 0; -} + -- 2.18.0