back to scratko.xyz
aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2025-09-08 01:44:13 +0300
committerscratko <m@scratko.xyz>2025-09-08 01:44:13 +0300
commit6b7b0ea022ad18b30622acd5e1354ff64cf14d86 (patch)
tree3d8a8cdfc9985b7c242e66e3734c5cefcda21215 /Makefile
downloadls-imitation-master.tar.gz
ls-imitation-master.tar.bz2
ls-imitation-master.zip
Initial commitHEADmaster
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..cf3989a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+SRCMODULES = ls_imitation.c data_struct.c columns.c
+OBJMODULES = $(SRCMODULES:.c=.o)
+CC = gcc
+CFLAGS = -Wall -g
+
+all: ls_imitation
+
+%.o: %.c %.h
+ $(CC) $(CFLAGS) $< -o $@
+
+ls_imitation: $(OBJMODULES)
+ $(CC) $^ -o $@
+
+ifneq (clean, $(MAKECMDGOALS))
+-include deps.mk
+endif
+
+deps.mk: $(SRCMODULES)
+ $(CC) -MM $^ > $@
+clean:
+ rm -f *.o ls_imitation