aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCody Logan <cody@lokken.dev>2023-11-27 16:56:46 -0800
committerCody Logan <cody@lokken.dev>2023-11-27 16:56:46 -0800
commit3dce0f81b4aa7a30269f7bdc484f8f872cb26391 (patch)
treef3109c69fcaaf82a27f448c4a3d6aeace9052305 /Makefile
parent5cdeb8df2e78f715fec66b12e4a29c728be35598 (diff)
downloadconvert-markdown-3dce0f81b4aa7a30269f7bdc484f8f872cb26391.tar.gz
convert-markdown-3dce0f81b4aa7a30269f7bdc484f8f872cb26391.zip
Add oconfigure
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 12 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 00d5635..bf0c839 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,15 @@
-CC = cc
-CFLAGS = -O2 -g -I/usr/local/include
-LDFLAGS = -L/usr/local/lib
-LIBS = -llowdown -lm -static -pie
-# uncomment on Linux
-#LIBS += -lbsd -lmd
+include Makefile.configure
-convert-markdown: convert-markdown.c
- $(CC) $^ -o $@ $(CFLAGS) $(LDFLAGS) $(LIBS)
+CFLAGS += -O2
+LDADD += -llowdown -lm $(LDADD_MD5) $(LDADD_STATIC)
+
+convert-markdown: convert-markdown.o compats.o
+ $(CC) $^ -o $@ $(LDFLAGS) $(LDADD)
+
+convert-markdown.o compats.o: config.h
clean:
- rm -f convert-markdown
+ rm -f convert-markdown *.o
+
+distclean: clean
+ rm -f Makefile.configure config.h config.log config.h.old config.log.old