aboutsummaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-02-05 14:25:40 +0100
committerlonkaars <loek@pipeframe.xyz>2022-02-05 14:25:40 +0100
commit63c6a5da7d63b701f301b1a3b2f575e48ec350da (patch)
tree0e4ab06bcfd47491a253c3d876d0967d3b522561 /makefile
initial commit
Diffstat (limited to 'makefile')
-rw-r--r--makefile22
1 files changed, 22 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..05077fe
--- /dev/null
+++ b/makefile
@@ -0,0 +1,22 @@
+CC = gcc
+LD = gcc
+RM = rm -f
+CFLAGS =
+EXECNAME = main
+
+SOURCES := $(wildcard *.c)
+OBJECTS := $(patsubst %.c,%.o, $(SOURCES))
+
+all: main
+
+.o:
+ $(CC) -c $(CFLAGS) $<
+
+$(EXECNAME): $(OBJECTS)
+ $(CC) $(OBJECTS) -o $(EXECNAME)
+
+clean:
+ $(RM) $(EXECNAME)
+
+distclean: clean
+ $(RM) *.o