aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-18 01:19:31 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-18 01:19:31 +0200
commite25f56cbe86041d4ab19e474e38032fa7e681ac7 (patch)
tree2700353affa227caae1ab2b178b5f42eab337f2f /Makefile
parent7d65ce8c8e304dc8367f4492948514f2acc07a3b (diff)
downloadcforum-e25f56cbe86041d4ab19e474e38032fa7e681ac7.tar.gz
Improve Makefile
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 37472bd..ad5701d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,12 @@
-.SUFFIXES: .c .t .tc
-LDFLAGS += -lsqlite3
+LDLIBS += -lsqlite3
+C = $(shell ls *.c)
+H = $(shell ls *.h)
+TPL = $(shell ls t/*.t | sed 's/$$/c/')
-C = cforum.c ctl.c db.c err.c query.c
-TPL = t/err.tc t/foot.tc t/front.tc t/head.tc t/post.tc t/user.tc
+.SUFFIXES: .t .tc
-cforum: $(C) $(TPL)
- $(CC) $(CFLAGS) $(LDFLAGS) -o cforum $(C)
+cforum: $(C) $(H) $(TPL)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o cforum $(C)
.t.tc: mktpl/mktpl
<$< mktpl/mktpl >$@