smrtlink/Makefile
2016-01-17 01:01:49 +01:00

28 lines
520 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 $(BUILDDIR)/$@ -lboost_filesystem -lboost_system
$(OBJECTS): $(BUILDDIR)/%.o : $(SOURCEDIR)/%.cpp
$(CC) $(CFLAGS) $< -o $@
install: bin/$(TARGET)
install -m 0755 bin/$(TARGET) $(prefix)/bin
clean:
rm -f $(BUILDDIR)/*