compress_measurements/Makefile

28 lines
550 B
Makefile
Raw Normal View History

2022-02-20 23:55:53 +01:00
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