diff options
author | Dirk Engling <erdgeist@erdgeist.org> | 2014-02-24 03:14:53 +0100 |
---|---|---|
committer | Dirk Engling <erdgeist@erdgeist.org> | 2014-02-24 03:14:53 +0100 |
commit | 2a185f889470f9bfa049b1610900536309aded5a (patch) | |
tree | d127a4d9b38adf9f8aa0c65abb8f10320f18a220 | |
parent | 2f724b60ce0a8323dd4173b4651661d04b0c94f9 (diff) |
Use make the way it was intended
-rw-r--r-- | Makefile | 16 | ||||
-rwxr-xr-x | makecolumns.sh (renamed from src/makecolumns.sh) | 0 | ||||
-rw-r--r-- | src/Makefile | 24 |
3 files changed, 16 insertions, 24 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..65d7bc7 --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,16 @@ | |||
1 | OBJECTS=extract_version_1 extract_version_2 extract_version_3 split_version_2 map_coords convert_coords | ||
2 | BINARIES=$(addprefix bin/,$(OBJECTS)) | ||
3 | CFLAGS+=-Wextra -O3 | ||
4 | LDFLAGS+=-lz -lm | ||
5 | VPATH=src/export | ||
6 | |||
7 | .SUFFIXES: .c | ||
8 | |||
9 | all: $(BINARIES) | ||
10 | |||
11 | bin/% : %.c mystdlib.c | ||
12 | $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) | ||
13 | |||
14 | .PHONY: clean | ||
15 | clean: | ||
16 | @rm -f $(BINARIES) | ||
diff --git a/src/makecolumns.sh b/makecolumns.sh index 0f9c5ba..0f9c5ba 100755 --- a/src/makecolumns.sh +++ b/makecolumns.sh | |||
diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 6d40c6b..0000000 --- a/src/Makefile +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | BINARIES=../bin/extract_version_1 ../bin/extract_version_2 ../bin/extract_version_3 ../bin/split_version_2 ../bin/map_coords ../bin/convert_coords | ||
2 | binaries: $(BINARIES) | ||
3 | CFLAGS+=-Wextra | ||
4 | |||
5 | ../bin/extract_version_3: export/extract_version_3.c export/mystdlib.c | ||
6 | @$(CC) $(CFLAGS) -O2 -o ../bin/extract_version_3 export/extract_version_3.c export/mystdlib.c -lz -I export | ||
7 | |||
8 | ../bin/extract_version_2: export/extract_version_2.c export/mystdlib.c | ||
9 | @$(CC) $(CFLAGS) -O3 -o ../bin/extract_version_2 export/extract_version_2.c export/mystdlib.c -I export | ||
10 | |||
11 | ../bin/extract_version_1: export/extract_version_1.c export/mystdlib.c | ||
12 | @$(CC) $(CFLAGS) -O3 -o ../bin/extract_version_1 export/extract_version_1.c export/mystdlib.c -I export | ||
13 | |||
14 | ../bin/split_version_2: export/split_version_2.c | ||
15 | @$(CC) $(CFLAGS) -O3 -o ../bin/split_version_2 export/split_version_2.c | ||
16 | |||
17 | ../bin/map_coords: export/map_coords.c export/mystdlib.c | ||
18 | @$(CC) $(CFLAGS) -O3 -o ../bin/map_coords export/map_coords.c export/mystdlib.c -I export | ||
19 | |||
20 | ../bin/convert_coords: export/convert_coords.c | ||
21 | @$(CC) $(CFLAGS) -O3 -o ../bin/convert_coords export/convert_coords.c -lm | ||
22 | |||
23 | clean: | ||
24 | @rm -f $(BINARIES) | ||