diff --git a/ytest_t/Makefile b/ytest_t/Makefile index c90ba48..eb7e44a 100644 --- a/ytest_t/Makefile +++ b/ytest_t/Makefile @@ -3,7 +3,13 @@ PROJECT_LIB=libytest.so CC=gcc INCLUDE_DIRS=$(PWD) #$(wildcard $(PWD)/**/include) -INCLUDE=-I$(PWD)/yftest/include -I$(PWD)/yfmock/include -I$(PWD)/ytools_t/include -I$(PWD)/ybar_progress/include +TOOLDIR=$(PWD)/../ytools_t +BARPDIR=$(PWD)/../ybar_progress +TOOL_O=$(TOOLDIR)/src/tools_t/tools_t.o +BARP_O=$(BARPDIR)/src/bar_progress/bar_progress.o + + +INCLUDE=-I$(PWD)/yftest/include -I$(PWD)/yfmock/include -I$(TOOLDIR)/include -I$(BARPDIR)/include CFLAGS=-lpthread -Wall -Werror -fpic $(INCLUDE) #LDFLAGS= @@ -11,9 +17,9 @@ TOPTARGETS := all clean #update_headers #SRC=$(wildcard y*/src/**/**/*.c) SRC=$(wildcard y*/*/*/*.c) -OBJ=$(SRC:.c=.o) +OBJ=$(SRC:.c=.o) $(TOOL_O) $(BARP_O) -SUBDIRS :=$(wildcard y*) +SUBDIRS :=$(wildcard y*) $(TOOLDIR) $(BARPDIR) export @@ -38,7 +44,7 @@ update_headers: $(PROJECT_LIB) .PHONY: $(TOPTARGETS) $(SUBDIRS) -clean: +mrproper: clean rm -f $(PROJECT_LIB) remove_headers: diff --git a/ytest_t/README.md b/ytest_t/README.md index 2b56576..bdebb88 100644 --- a/ytest_t/README.md +++ b/ytest_t/README.md @@ -57,7 +57,7 @@ to unset variables env in local terminal: ``` . unset_env.sh ``` -to unset variable permanantly: need to have the same arg as `set_env.sh` +to unset variable permanently: need to have the same arg as `set_env.sh` ``` ./unset_env.sh ~/.bashrc ``` @@ -69,7 +69,7 @@ or #### uninstall script remove: -this remove from locale machine env all files and directory copied in `make install` or `./install.sh` +this remove from locale machine env all files and directory copied by `make install` or `./install.sh` ``` sudo make uninstall ``` diff --git a/ytest_t/kreate_library_ytest.sh b/ytest_t/kreate_library_ytest.sh index b9f994d..ebd114a 100644 --- a/ytest_t/kreate_library_ytest.sh +++ b/ytest_t/kreate_library_ytest.sh @@ -13,7 +13,7 @@ fi gcc -c -Wall -Werror -fpic yftest/src/ftest/ftest.c yfmock/src/fmock/fmock.c \ - ytools_t/src/tools_t/tools_t.c ybar_progress/src/bar_progress/bar_progress.c \ + ../ytools_t/src/tools_t/tools_t.c ../ybar_progress/src/bar_progress/bar_progress.c \ -I./include_ytest/include $1 -lpthread gcc -shared -o libytest.so *.o diff --git a/ytest_t/libytest.so b/ytest_t/libytest.so index 7acc81b..16d12e9 100644 Binary files a/ytest_t/libytest.so and b/ytest_t/libytest.so differ diff --git a/ytest_t/test/Makefile b/ytest_t/test/Makefile index 0306a62..3d8c270 100644 --- a/ytest_t/test/Makefile +++ b/ytest_t/test/Makefile @@ -12,7 +12,9 @@ LDFLAGS=-L$(PWD)/.. -lytest #SRC_DIR=$(ROOT_DIR)/src #SRC=$(wildcard */*/*.c) SRC=$(wildcard **/**/*.c) -OBJ=$(SRC:.c=.o) + +#OBJ=$(SRC:.c=.o) + #HEADS=$(OBJS:.o=.h) TEST_DIR=$(PWD) EXECSRC=$(NAME_TEST).c diff --git a/ytest_t/test/compile.sh b/ytest_t/test/compile.sh index 945f4c7..418152a 100644 --- a/ytest_t/test/compile.sh +++ b/ytest_t/test/compile.sh @@ -13,9 +13,11 @@ if [ "$#" -le 1 ] ; then echo "for example: $0 $1 \"-D DEBUG=1 -g\"" fi +YTESTDIR=$PWD/.. -gcc -o launch_is_good_c $1 -L$PWD/../ $2 -lytest -I../include_ytest/include +gcc -o launch_is_good_c $1 -L$YTESTDIR $2 -lytest -I$YTESTDIR/include_ytest/include +echo "gcc -o launch_is_good_c $1 -L$YTESTDIR $2 -lytest -I$YTESTDIR/include_ytest/include" -export LD_LIBRARY_PATH=$PWD/../:LD_LIBRARY_PATH +export LD_LIBRARY_PATH=$YTESTDIR:LD_LIBRARY_PATH diff --git a/ytest_t/yftest/Makefile b/ytest_t/yftest/Makefile index b6b9a94..681451d 100644 --- a/ytest_t/yftest/Makefile +++ b/ytest_t/yftest/Makefile @@ -3,10 +3,13 @@ FTEST_SRC=src/ftest/ftest.c FTEST_O=$(FTEST_SRC:.c=.o) -TOOLS_SRC=../ytools_t/src/tools_t/tools_t.c +#TOOLDIR=../../ytools_t +#BARPDIR=../../ybar_progress + +TOOLS_SRC=$(TOOLDIR)/src/tools_t/tools_t.c TOOLS_O=$(TOOLS_SRC:.c=.o) -BARPROGES_SRC=../ybar_progress/src/bar_progress/bar_progress.c +BARPROGES_SRC=$(BARPDIR)/src/bar_progress/bar_progress.c BARPROGES_O=$(BARPROGES_SRC:.c=.o)