2021-06-05 14:07:11 +02:00
|
|
|
prefix = /usr/local
|
|
|
|
bindir = $(prefix)/bin
|
|
|
|
CFLAGS = -std=c99 -Wall -Wextra -pedantic
|
2022-01-29 23:28:55 +01:00
|
|
|
CXXFLAGS = -std=c++20 -Wall -Wextra -pedantic
|
2021-06-05 14:07:11 +02:00
|
|
|
|
2022-01-29 23:39:36 +01:00
|
|
|
.DEFAULT_GOAL := tests
|
2021-06-05 14:07:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
2022-03-14 22:30:53 +01:00
|
|
|
rm -f test exile.o testcpp
|
2021-06-05 14:07:11 +02:00
|
|
|
|
|
|
|
|
2022-03-14 22:30:53 +01:00
|
|
|
exile.o: exile.c exile.h
|
|
|
|
$(CC) -c exile.c -g $(CFLAGS) -o exile.o
|
|
|
|
|
|
|
|
test: test.c exile.h exile.o
|
|
|
|
$(CC) test.c exile.o -g $(CFLAGS) -o test
|
|
|
|
|
|
|
|
testcpp: test.cpp exile.h exile.hpp exile.o
|
|
|
|
$(CXX) test.cpp exile.o -g $(CXXFLAGS) -o testcpp
|
2022-01-29 23:28:55 +01:00
|
|
|
|
2022-01-29 23:39:36 +01:00
|
|
|
tests: test testcpp
|
|
|
|
|
|
|
|
check: tests
|
2021-06-05 14:07:11 +02:00
|
|
|
./test.sh
|
|
|
|
|
|
|
|
.PHONY: check
|