change some files in ytest_t repo after reorganizing it

This commit is contained in:
2023-11-24 09:51:33 +01:00
parent a378261e9b
commit 0c6a277f7c
7 changed files with 25 additions and 12 deletions
+10 -4
View File
@@ -3,7 +3,13 @@ PROJECT_LIB=libytest.so
CC=gcc CC=gcc
INCLUDE_DIRS=$(PWD) INCLUDE_DIRS=$(PWD)
#$(wildcard $(PWD)/**/include) #$(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) CFLAGS=-lpthread -Wall -Werror -fpic $(INCLUDE)
#LDFLAGS= #LDFLAGS=
@@ -11,9 +17,9 @@ TOPTARGETS := all clean #update_headers
#SRC=$(wildcard y*/src/**/**/*.c) #SRC=$(wildcard y*/src/**/**/*.c)
SRC=$(wildcard y*/*/*/*.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 export
@@ -38,7 +44,7 @@ update_headers: $(PROJECT_LIB)
.PHONY: $(TOPTARGETS) $(SUBDIRS) .PHONY: $(TOPTARGETS) $(SUBDIRS)
clean: mrproper: clean
rm -f $(PROJECT_LIB) rm -f $(PROJECT_LIB)
remove_headers: remove_headers:
+2 -2
View File
@@ -57,7 +57,7 @@ to unset variables env in local terminal:
``` ```
. unset_env.sh . 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 ./unset_env.sh ~/.bashrc
``` ```
@@ -69,7 +69,7 @@ or
#### uninstall script remove: #### 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 sudo make uninstall
``` ```
+1 -1
View File
@@ -13,7 +13,7 @@ fi
gcc -c -Wall -Werror -fpic yftest/src/ftest/ftest.c yfmock/src/fmock/fmock.c \ 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 -I./include_ytest/include $1 -lpthread
gcc -shared -o libytest.so *.o gcc -shared -o libytest.so *.o
Binary file not shown.
+3 -1
View File
@@ -12,7 +12,9 @@ LDFLAGS=-L$(PWD)/.. -lytest
#SRC_DIR=$(ROOT_DIR)/src #SRC_DIR=$(ROOT_DIR)/src
#SRC=$(wildcard */*/*.c) #SRC=$(wildcard */*/*.c)
SRC=$(wildcard **/**/*.c) SRC=$(wildcard **/**/*.c)
OBJ=$(SRC:.c=.o)
#OBJ=$(SRC:.c=.o)
#HEADS=$(OBJS:.o=.h) #HEADS=$(OBJS:.o=.h)
TEST_DIR=$(PWD) TEST_DIR=$(PWD)
EXECSRC=$(NAME_TEST).c EXECSRC=$(NAME_TEST).c
+4 -2
View File
@@ -13,9 +13,11 @@ if [ "$#" -le 1 ] ; then
echo "for example: $0 $1 \"-D DEBUG=1 -g\"" echo "for example: $0 $1 \"-D DEBUG=1 -g\""
fi 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
+5 -2
View File
@@ -3,10 +3,13 @@
FTEST_SRC=src/ftest/ftest.c FTEST_SRC=src/ftest/ftest.c
FTEST_O=$(FTEST_SRC:.c=.o) 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) 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) BARPROGES_O=$(BARPROGES_SRC:.c=.o)