2022-02-21 02:41:36 +01:00
|
|
|
CC ?= gcc
|
|
|
|
CXX ?= g++
|
|
|
|
CFLAGS=$(MINGWPATHS) -O3
|
|
|
|
CXXFLAGS=-std=c++17 $(MINGWPATHS) -O3
|
2022-02-20 23:55:53 +01:00
|
|
|
DEPS = src/compress.h src/stringutils.h
|
|
|
|
LIBS=-llzma
|
|
|
|
OBJECTS = build/compress.o build/stringutils.o
|
|
|
|
MAKE_BUILD_FOLDER = @mkdir -p build
|
|
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
|
|
|
|
all: $(OBJECTS) build/compress_measurements
|
|
|
|
|
|
|
|
build/%.o: src/%.c $(DEPS)
|
|
|
|
$(MAKE_BUILD_FOLDER)
|
|
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
|
|
|
|
build/%.o: src/%.cpp $(DEPS)
|
|
|
|
$(MAKE_BUILD_FOLDER)
|
2022-02-21 02:41:36 +01:00
|
|
|
$(CXX) -c -o $@ $< $(CXXFLAGS)
|
2022-02-20 23:55:53 +01:00
|
|
|
|
|
|
|
build/compress_measurements: $(OBJECTS) src/compress_measurements.cpp
|
|
|
|
$(MAKE_BUILD_FOLDER)
|
2022-02-21 02:41:36 +01:00
|
|
|
$(CXX) -static -o $@ $^ $(LIBS) $(CXXFLAGS)
|
2022-02-20 23:55:53 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
-rm -rf build
|