smrtlink/Makefile

28 lines
558 B
Makefile
Raw Permalink Normal View History

2015-09-27 10:24:39 +00:00
CC = g++
2016-01-21 03:58:21 +00:00
CFLAGS = -o0 -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-02-23 20:47:45 +00:00
$(CC) $^ -o $(BUILDDIR)/$@ -lboost_filesystem -lboost_system -lreadline -lboost_program_options
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)/*