summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0848fb5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+VERSION = 0.1
+
+# Paths
+prefix = $(HOME)
+BINDIR = $(prefix)/bin
+DESTDIR =
+
+CC := gcc
+INSTALL := install
+
+INCLUDES := -I /usr/include/SDL -I /usr/include/X11
+LIBS := -lSDL
+
+CFLAGS := -g -Wall $(INCLUDES) -D_USE_SOURCE
+LDFLAGS := $(LIBS)
+
+DEBUG = false
+
+ifeq ($(strip $(DEBUG)),true)
+ CFLAGS += -DDEBUG
+endif
+
+PROGRAM := hdaps-tux
+
+all: $(PROGRAM)
+
+$(PROGRAM): $(PROGRAM).o $(PROGRAM).h
+
+%.o: %.c
+ $(CC) $(CFLAGS) -c $< -o $@
+
+install: $(PROGRAM)
+ $(INSTALL) -m 775 $(PROGRAM) $(DESTDIR)$(BINDIR)
+
+clean:
+ rm -f *.o
+ rm -f $(PROGRAM)