2016-01-04 18:10:32 +01:00
|
|
|
WUT_ROOT := $(CURDIR)/../..
|
|
|
|
|
|
|
|
TARGET := readrpl
|
|
|
|
SOURCE := .
|
2016-07-24 12:43:54 +02:00
|
|
|
INCLUDE := ../common ../ext/cppformat ../ext/excmd/src
|
2016-01-04 18:10:32 +01:00
|
|
|
|
|
|
|
CXX := g++
|
|
|
|
|
2016-01-04 18:17:48 +01:00
|
|
|
CPPFORMATSRC := ../ext/cppformat/format.cc
|
2016-01-04 18:10:32 +01:00
|
|
|
|
2016-01-04 18:17:48 +01:00
|
|
|
CFILES := $(foreach dir,$(SOURCE),$(wildcard $(dir)/*.cpp))
|
2016-01-04 18:10:32 +01:00
|
|
|
INCLUDES := $(foreach dir,$(INCLUDE),-I$(dir))
|
|
|
|
|
|
|
|
CFLAGS := -O2 -Wall --std=c++14
|
2016-01-04 18:17:48 +01:00
|
|
|
LDFLAGS := -lz
|
2016-01-04 18:10:32 +01:00
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo "[RM] $(notdir $(TARGET))"
|
|
|
|
@rm -rf $(TARGET)
|
|
|
|
|
|
|
|
install: all
|
|
|
|
@echo Installing $(TARGET)
|
|
|
|
@cp $(TARGET) $(WUT_ROOT)/bin/$(TARGET)
|
|
|
|
|
|
|
|
$(TARGET): $(CFILES)
|
|
|
|
@echo "[CXX] $(notdir $<)"
|
2016-01-04 18:17:48 +01:00
|
|
|
$(CXX) $(CFLAGS) $(INCLUDES) $< -o $@ $(LDFLAGS) $(CPPFORMATSRC)
|