aboutsummaryrefslogtreecommitdiff
path: root/tsalis/Makefile
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 01:50:44 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 01:50:44 +0100
commit2dc9d118efb64de6ea54a5a9eb4474f8e5ef3145 (patch)
tree74039957b10390da4875d676303a781bd0792e45 /tsalis/Makefile
Initial commit
Diffstat (limited to 'tsalis/Makefile')
-rw-r--r--tsalis/Makefile30
1 files changed, 30 insertions, 0 deletions
diff --git a/tsalis/Makefile b/tsalis/Makefile
new file mode 100644
index 0000000..c393350
--- /dev/null
+++ b/tsalis/Makefile
@@ -0,0 +1,30 @@
+CC := gcc
+BIN := bin/tsalis
+
+SOURCES := $(wildcard src/*.c)
+OBJECTS := $(patsubst src/%.c,build/%.o,$(SOURCES))
+DEPS := $(patsubst %.o,%.d,$(OBJECTS))
+
+LFLAGS := -L ../lib -lsalis -lncurses
+
+# uncomment for debug
+# OFLAGS := -ggdb
+
+# uncomment for release
+OFLAGS := -O3 -DNDEBUG
+
+CFLAGS := -Iinclude -I../include -c $(OFLAGS) -MMD -Wall -Wextra -std=c89 \
+ -pedantic-errors -Wmissing-prototypes -Wstrict-prototypes \
+ -Wold-style-definition
+
+all: $(OBJECTS)
+ $(CC) $(OBJECTS) $(LFLAGS) -o $(BIN)
+
+-include $(DEPS)
+
+$(OBJECTS): $(patsubst build/%.o,src/%.c,$@)
+ $(CC) $(CFLAGS) $(patsubst build/%.o,src/%.c,$@) -o $@
+
+clean:
+ -rm build/*
+ -rm $(BIN)