csvpp/Makefile

21 lines
447 B
Makefile
Raw Permalink Normal View History

2021-10-22 20:30:52 +00:00
CC=g++
CFLAGS=-c -Wall -I./include
LDFLAGS=-I./include
SOURCES=main.cpp ./src/csvpp.cpp ./src/stringhelper.cpp
TEST=tests.cpp ./src/csvpp.cpp ./src/stringhelper.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=csvpp
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
.cpp.o:
$(CC) $(CFLAGS) $< -o $@
clean:
rm -f src/*o csvpp
tests:
$(CC) $(LDFLAGS) ./src/csvpp.o ./src/stringhelper.o tests.cpp -o test