summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fa58aa4
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+# gridcal - compute great-circle distance between two grid locators
+.POSIX:
+
+SRC = gridcal.c
+OBJ = ${SRC:.c=.o}
+
+all: options gridcal
+
+options:
+ @echo "-+- build options -+-"
+ @echo "PREFIX = ${PREFIX}"
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "CC = ${CC}"
+ @echo "-+-+-+-+-+-+-+-+-+-+-"
+
+gridcal: ${OBJ}
+ $(CC) $(LDFLAGS) -o $@ $(OBJ) -lm
+
+debug: clean
+ ${MAKE} CFLAGS="${DEBUG}" all
+
+clean:
+ rm -f gridcal ${OBJ}
+