smrtlink/Makefile
2015-10-15 20:42:41 +02:00

26 lines
417 B
Makefile

CC = g++
CFLAGS = -g -c -std=c++14
TARGET = smrtlink
SOURCEDIR = src
BUILDDIR = bin
SOURCES = $(wildcard $(SOURCEDIR)/*.cpp)
OBJECTS = $(patsubst $(SOURCEDIR)/%.cpp,$(BUILDDIR)/%.o,$(SOURCES))
all: $(BUILDDIR) $(TARGET)
$(BUILDDIR):
mkdir -p $(BUILDDIR)
$(TARGET): $(OBJECTS)
$(CC) $^ -o $@
$(OBJECTS): $(BUILDDIR)/%.o : $(SOURCEDIR)/%.cpp
$(CC) $(CFLAGS) $< -o $@
clean:
rm -f $(BUILDDIR)/*o $(TARGET)