From 18b40e7c4e61f1ada932646212a1cd2b8a358a39 Mon Sep 17 00:00:00 2001 From: mlugg Date: Tue, 13 Apr 2021 22:57:27 +0100 Subject: [PATCH] Fix Makefile flags for autosplitter compilation --- Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5164f62..6601ced 100644 --- a/Makefile +++ b/Makefile @@ -4,20 +4,19 @@ CFLAGS := -Wall -Werror $(shell pkg-config --cflags vtk) -D_POSIX_C_SOURCE=200809L LDFLAGS := $(shell pkg-config --libs vtk) -lpthread +SPLITTER_FLAGS := -D_POSIX_C_SOURCE=200809L + HDRS := $(wildcard *.h) all: adrift splitters clean: - rm -f adrift *.o splitters/*.o splitters/sar_split + rm -f adrift *.o splitters/sar_split splitters: splitters/sar_split adrift: main.o draw.o common.o io.o calc.o timer.o config.o $(CC) -o $@ $^ $(LDFLAGS) -splitters/sar_split: splitters/sar_split.o - $(CC) -o $@ $^ $(LDFLAGS) - -%.o: %.c $(HDRS) - $(CC) -c -o $@ $< $(CFLAGS) +splitters/%: splitters/%.c + $(CC) -o $@ $^ $(SPLITTER_FLAGS)