2015-09-27 10:24:39 +00:00
|
|
|
CC = g++
|
2015-10-15 18:36:45 +00:00
|
|
|
CFLAGS = -g -c -std=c++14
|
2015-09-27 10:24:39 +00:00
|
|
|
TARGET = smrtlink
|
2015-10-15 18:36:45 +00:00
|
|
|
SOURCEDIR = src
|
|
|
|
BUILDDIR = bin
|
|
|
|
|
|
|
|
SOURCES = $(wildcard $(SOURCEDIR)/*.cpp)
|
|
|
|
OBJECTS = $(patsubst $(SOURCEDIR)/%.cpp,$(BUILDDIR)/%.o,$(SOURCES))
|
2015-09-27 10:24:39 +00:00
|
|
|
|
2015-10-15 18:42:41 +00:00
|
|
|
all: $(BUILDDIR) $(TARGET)
|
|
|
|
|
|
|
|
|
|
|
|
$(BUILDDIR):
|
|
|
|
mkdir -p $(BUILDDIR)
|
2015-09-27 10:24:39 +00:00
|
|
|
|
2015-10-06 19:14:01 +00:00
|
|
|
|
2015-10-15 18:36:45 +00:00
|
|
|
$(TARGET): $(OBJECTS)
|
2016-01-17 00:01:49 +00:00
|
|
|
$(CC) $^ -o $(BUILDDIR)/$@ -lboost_filesystem -lboost_system
|
2015-10-06 19:14:01 +00:00
|
|
|
|
|
|
|
|
2015-10-15 18:36:45 +00:00
|
|
|
$(OBJECTS): $(BUILDDIR)/%.o : $(SOURCEDIR)/%.cpp
|
|
|
|
$(CC) $(CFLAGS) $< -o $@
|
2015-09-27 10:24:39 +00:00
|
|
|
|
2016-01-17 00:01:49 +00:00
|
|
|
install: bin/$(TARGET)
|
|
|
|
install -m 0755 bin/$(TARGET) $(prefix)/bin
|
2015-10-15 18:36:45 +00:00
|
|
|
|
|
|
|
clean:
|
2016-01-17 00:01:49 +00:00
|
|
|
rm -f $(BUILDDIR)/*
|