add testsuit
This commit is contained in:
28
Makefile
28
Makefile
@@ -1,19 +1,39 @@
|
||||
OBJ:= main.o fs.o
|
||||
OBJ:= main.o fs.o strhash.o hashtable.o
|
||||
CC ?= clang
|
||||
|
||||
# OS dependend targets
|
||||
OBJ += fs_linux.o
|
||||
OUTPUT:= texdepends
|
||||
|
||||
.PHONY: test debug clean
|
||||
|
||||
all: debug
|
||||
test: debug
|
||||
test: ctests debug
|
||||
./$(OUTPUT) test.tex
|
||||
|
||||
debug: CXXFLAGS:= -g -std=c++11
|
||||
ctests: test_path test_hashtable
|
||||
$(foreach exe,$^,./$(exe);)
|
||||
|
||||
.INTERMEDIATE: test_path tests.o test_path.o
|
||||
|
||||
test_path: test_path.o fs.o fs_linux.o tests.o
|
||||
$(CC) $^ -o test_path
|
||||
test_path.c: fs.o tests.o
|
||||
|
||||
test_hashtable: test_hashtable.o strhash.o tests.o hashtable.o
|
||||
$(CC) $^ -o test_hashtable
|
||||
|
||||
test_hashtable.c: hashtable.h
|
||||
|
||||
debug: CXXFLAGS += -g -std=c++11
|
||||
debug: CFLAGS += -g
|
||||
debug: $(OUTPUT)
|
||||
|
||||
clean:
|
||||
$(RM) $(OBJ) $(OUTPUT)
|
||||
|
||||
main.o: fs.o
|
||||
fs.c: fs_linux.o
|
||||
main.c: fs.o strhash.o hashtable.o
|
||||
|
||||
$(OUTPUT): main.o
|
||||
$(CXX) $(OBJ) -o $(OUTPUT)
|
||||
|
||||
Reference in New Issue
Block a user