21 lines
447 B
Makefile
21 lines
447 B
Makefile
|
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
|