From: ken Date: Tue, 27 Sep 2016 06:06:01 +0000 (-0700) Subject: fixes, moved ir test driver to testir.c X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fwebcc.git;a=commitdiff_plain;h=1f3b22e0c25b3b753143a7efa1b0d494b2a75200 fixes, moved ir test driver to testir.c --- 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; -} +