wut/tools/readrpl/Makefile

29 lines
618 B
Makefile
Raw Normal View History

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