compress_measurements/Makefile
2022-02-21 00:06:01 +01:00

28 lines
550 B
Makefile

CC=gcc
CXX=g++
CFLAGS=-O3
CXXFLAGS=-O3
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)
$(CXX) -c -o $@ $< $(CFLAGS)
build/compress_measurements: $(OBJECTS) src/compress_measurements.cpp
$(MAKE_BUILD_FOLDER)
$(CXX) -o $@ $^ $(LIBS) $(CFLAGS)
clean:
-rm -rf build