Welcome to little lamb

Code » qmdoc » commit 398c18d

Forgot to add Makefile earlier

author Olivier Brunel
2022-12-24 17:26:24 UTC
committer Olivier Brunel
2022-12-24 17:26:24 UTC
parent 2d20a701230ce451e616d9f93cce0ec2c0ada6ea

Forgot to add Makefile earlier

Makefile +21 -0

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0411b1a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+SRCS = main.c md4c.c
+OBJS = $(SRCS:.c=.o)
+DEPS = $(SRCS:.c=.d)
+
+CFLAGS = -g -O3 -Wall
+LDFLAGS =
+
+all: qmdoc
+
+qmdoc: $(OBJS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
+
+-include $(DEPS)
+
+%.o: %.c Makefile
+	$(CC) $(CFLAGS) -MMD -MP -o $@ -c $<
+
+clean:
+	rm -f qmdoc $(OBJS) $(DEPS)
+
+$(OBJS):