2017-10-25 18:35:45 +02:00
|
|
|
OBJ:= main.o fs.o strhash.o hashtable.o
|
|
|
|
CC ?= clang
|
|
|
|
|
|
|
|
# OS dependend targets
|
|
|
|
OBJ += fs_linux.o
|
2017-10-08 18:44:27 +02:00
|
|
|
OUTPUT:= texdepends
|
2017-10-07 23:21:00 +02:00
|
|
|
|
|
|
|
.PHONY: test debug clean
|
|
|
|
|
2017-10-08 18:44:27 +02:00
|
|
|
all: debug
|
2017-10-25 18:35:45 +02:00
|
|
|
test: ctests debug
|
2017-10-07 23:21:00 +02:00
|
|
|
./$(OUTPUT) test.tex
|
|
|
|
|
2017-10-25 18:35:45 +02:00
|
|
|
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
|
2017-10-07 23:21:00 +02:00
|
|
|
debug: $(OUTPUT)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJ) $(OUTPUT)
|
|
|
|
|
2017-10-25 18:35:45 +02:00
|
|
|
fs.c: fs_linux.o
|
|
|
|
main.c: fs.o strhash.o hashtable.o
|
2017-10-07 23:21:00 +02:00
|
|
|
|
2017-10-08 18:44:27 +02:00
|
|
|
$(OUTPUT): main.o
|
|
|
|
$(CXX) $(OBJ) -o $(OUTPUT)
|