summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoroskar <[email protected]>2024-05-10 23:41:25 +0200
committeroskar <[email protected]>2024-05-10 23:41:25 +0200
commitec3079e3f4a0124c744ec7e5b7a3fe78d2bbca77 (patch)
tree3cee44f4f691751528d0e254370596f73ab87ca7 /Makefile
parent3b2246ab2a255710a3ef02fb0f9f19dc92e528a7 (diff)
Implemented doubly linked list, fixed issued with singly linked list. Added some nicer visualization for both of them.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ec5930a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+CC=egcc
+CFLAGS_TESTBIN=-O3 -Wfatal-errors -Wall -Werror -Wextra -g -Wpedantic -std=c99
+CFLAGS=-O3 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -std=gnu99
+TARGET1=s_linkedlist
+TARGET2=d_linkedlist
+TESTTARGET1=s_linkedlist-t
+TESTTARGET2=d_linkedlist-t
+INSTALL_DIRECTORY=/usr/local/bin
+MAKEFLAGS += -s
+SRCSL=s_linkedlist.c
+SRCDL=d_linkedlist.c
+
+all: release
+clean:
+ rm -f $(TARGET1) $(TARGET2)
+ rm -f test/$(TESTTARGET1) test/$(TESTTARGET2)
+
+tests:
+
+ $(CC) $(CFLAGS_TESTBIN) $(SRCSL) -o test/$(TESTTARGET1)
+ $(CC) $(CFLAGS_TESTBIN) $(SRCDL) -o test/$(TESTTARGET2)
+ echo "$(TESTTARGET) is done."
+
+release:
+
+ $(CC) $(CFLAGS) $(SRCSL) -o $(TARGET1)
+ $(CC) $(CFLAGS) $(SRCDL) -o $(TARGET2)
+
+
+
+