diff options
author | Oskar <[email protected]> | 2024-07-21 18:26:14 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-07-21 18:26:14 +0200 |
commit | 2e08693557019529cf8a4daa7931d3414cbeca51 (patch) | |
tree | 9d5744ecf075a0e8537c971ec3dc441509b3fdb3 /Makefile | |
parent | 730e03e60740905f3c97bed11db637e3dff2801a (diff) |
New testing scripts to generate files and delete. Also fixed a segfault issue happening if the program fails during fill_lfc, it will call free_lfc, but because we haven set the 'next' node to NULL, we segfault.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -3,17 +3,26 @@ CFLAGS_TESTBIN=-O0 -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address -W CFLAGS=-O3 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -static -std=gnu99 TARGET=tsr TESTTARGET=tsr-TESTING +SP_TESTTARGET=tsr-SP INSTALL_DIRECTORY=/usr/local/bin MAKEFLAGS += SRCS=trashsys.c +SRCS_SP=trashsys_small_paths.c +P_MAX_SIZE="30" all: release clean: rm -f $(TARGET) rm -f test/$(TESTTARGET) + rm -f test/$(SP_TESTTARGET) + rm -f $(SRCS_SP) tests: + cp $(SRCS) $(SRCS_SP) $(CC) $(CFLAGS_TESTBIN) $(SRCS) -o test/$(TESTTARGET) + sed -i "s#PATH_MAX#$(P_MAX_SIZE)#g" $(SRCS_SP) + $(CC) $(CFLAGS_TESTBIN) $(SRCS_SP) -o test/$(SP_TESTTARGET) + rm -f $(SRCS_SP) install: cp $(TARGET) $(INSTALL_DIRECTORY) |