30 lines
441 B
Makefile
30 lines
441 B
Makefile
TARGET = tests
|
|
LIBS = -lm
|
|
CC = c++
|
|
CFLAGS = -g -Wall -std=c++1y
|
|
INCLUDE = "../"
|
|
|
|
.PHONY: default all clean
|
|
|
|
default: $(TARGET)
|
|
all: default
|
|
|
|
OBJECTS = $(patsubst %.cpp, %.o, $(wildcard *.cpp))
|
|
HEADERS = $(wildcard *.hpp)
|
|
|
|
%.o: %.cpp $(HEADERS)
|
|
$(CC) $(CFLAGS) -I $(INCLUDE) -c $< -o $@
|
|
|
|
.PRECIOUS: $(TARGET) $(OBJECTS)
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
$(CC) $(OBJECTS) -Wall $(LIBS) -o $@
|
|
|
|
clean:
|
|
-rm -f *.o
|
|
-rm -f $(TARGET)
|
|
|
|
test:
|
|
make
|
|
./tests
|