summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rwxr-xr-xmakecolumns.sh (renamed from src/makecolumns.sh)0
-rw-r--r--src/Makefile24
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 @@
1OBJECTS=extract_version_1 extract_version_2 extract_version_3 split_version_2 map_coords convert_coords
2BINARIES=$(addprefix bin/,$(OBJECTS))
3CFLAGS+=-Wextra -O3
4LDFLAGS+=-lz -lm
5VPATH=src/export
6
7.SUFFIXES: .c
8
9all: $(BINARIES)
10
11bin/% : %.c mystdlib.c
12 $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
13
14.PHONY: clean
15clean:
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 @@
1BINARIES=../bin/extract_version_1 ../bin/extract_version_2 ../bin/extract_version_3 ../bin/split_version_2 ../bin/map_coords ../bin/convert_coords
2binaries: $(BINARIES)
3CFLAGS+=-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
23clean:
24 @rm -f $(BINARIES)