summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-09-29 10:53:10 +0200
committerlonkaars <loek@pipeframe.xyz>2022-09-29 10:53:10 +0200
commit11d327879082b557cc2a887d054bed9b1341e47b (patch)
treed2a6d39c30597474ff4774ae526d51b292387330 /makefile
My first commit
Diffstat (limited to 'makefile')
-rw-r--r--makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..4d538da
--- /dev/null
+++ b/makefile
@@ -0,0 +1,24 @@
+CC = gcc
+LD = gcc
+RM = rm -f
+CFLAGS =
+LFLAGS =
+TARGET = main
+
+SRCS := $(wildcard *.c)
+OBJS := $(patsubst %.c,%.o, $(SRCS))
+
+all: main
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) $< -o $@
+
+$(TARGET): $(OBJS)
+ $(LD) $^ $(LFLAGS) -o $@
+
+clean:
+ $(RM) $(TARGET) $(OBJS)
+
+compile_commands: clean
+ compiledb make
+