From 1b83cfe9c5a689532154dc098d13188fc1e8c61e Mon Sep 17 00:00:00 2001
From: User Erdgeist <erdgeist@avon.ccc.de>
Date: Tue, 25 Feb 2014 01:08:47 +0100
Subject: GNUmake and BSDmake are just too different to get the Makefile work
 with more advanced features. Revert to manual input

---
 Makefile | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index f319b52..5ad8100 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,25 @@
-OBJECTS=extract_version_1 extract_version_2 extract_version_3 split_version_2 map_coords convert_coords
-BINARIES=$(addprefix bin/,$(OBJECTS))
-CFLAGS+=-W -Wall -Wextra -O3 # -Weverything -Wno-cast-align -Wno-padded
-LDFLAGS+=-lz -lm
-VPATH=src/export
-
-.SUFFIXES: .c
+BINARIES=bin/extract_version_1 bin/extract_version_2 bin/extract_version_3 bin/split_version_2 bin/map_coords bin/convert_coords
+CFLAGS += -W -Wall -Wextra -O3 # -Weverything -Wno-cast-align -Wno-padded
 
 all: $(BINARIES)
 
-bin/% : %.c mystdlib.c
-	$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
+bin/extract_version_3: src/export/extract_version_3.c src/export/mystdlib.c
+	$(CC) $(CFLAGS) -o $@ src/export/extract_version_3.c src/export/mystdlib.c -lz
+
+bin/extract_version_2: src/export/extract_version_2.c src/export/mystdlib.c
+	$(CC) $(CFLAGS) -o $@ src/export/extract_version_2.c src/export/mystdlib.c
+
+bin/extract_version_1: src/export/extract_version_1.c src/export/mystdlib.c
+	$(CC) $(CFLAGS) -o $@ src/export/extract_version_1.c src/export/mystdlib.c
+
+bin/split_version_2: src/export/split_version_2.c
+	$(CC) $(CFLAGS) -o $@ src/export/split_version_2.c
+
+bin/map_coords: src/export/map_coords.c src/export/mystdlib.c
+	$(CC) $(CFLAGS) -o $@ src/export/map_coords.c src/export/mystdlib.c
+
+bin/convert_coords: src/export/convert_coords.c
+	$(CC) $(CFLAGS) -o $@ -lm src/export/convert_coords.c
 
 .PHONY: clean
 clean:
-- 
cgit v1.2.3