exile.h/Makefile

28 baris
491 B
Makefile

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
.DEFAULT_GOAL := tests
2021-06-05 14:07:11 +02:00
clean:
rm -f test exile.o testcpp
2021-06-05 14:07:11 +02: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
tests: test testcpp
check: tests
2021-06-05 14:07:11 +02:00
./test.sh
.PHONY: check