Skip to content

Commit 18b40e7

Browse files
committed
Fix Makefile flags for autosplitter compilation
1 parent 8219b35 commit 18b40e7

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Makefile

+5-6
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
44
CFLAGS := -Wall -Werror $(shell pkg-config --cflags vtk) -D_POSIX_C_SOURCE=200809L
55
LDFLAGS := $(shell pkg-config --libs vtk) -lpthread
66

7+
SPLITTER_FLAGS := -D_POSIX_C_SOURCE=200809L
8+
79
HDRS := $(wildcard *.h)
810

911
all: adrift splitters
1012

1113
clean:
12-
rm -f adrift *.o splitters/*.o splitters/sar_split
14+
rm -f adrift *.o splitters/sar_split
1315

1416
splitters: splitters/sar_split
1517

1618
adrift: main.o draw.o common.o io.o calc.o timer.o config.o
1719
$(CC) -o $@ $^ $(LDFLAGS)
1820

19-
splitters/sar_split: splitters/sar_split.o
20-
$(CC) -o $@ $^ $(LDFLAGS)
21-
22-
%.o: %.c $(HDRS)
23-
$(CC) -c -o $@ $< $(CFLAGS)
21+
splitters/%: splitters/%.c
22+
$(CC) -o $@ $^ $(SPLITTER_FLAGS)

0 commit comments

Comments
 (0)