summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-06-24 18:01:11 +0200
committerOskar <[email protected]>2024-06-24 18:01:11 +0200
commita7d5c8c41464ff8e6cf4f9a3e3a1e8086339d038 (patch)
treef23dd14043914632b12d043359dfd596b3bf4b2a /Makefile
first 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..91fdebd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,22 @@
+CC=gcc
+CFLAGS_TESTBIN=-O3 -Wfatal-errors -Wall -Werror -Wextra -g -fsanitize=address -Wpedantic -std=gnu99
+CFLAGS=-O3 -flto -march=native -DNDEBUG -fomit-frame-pointer -s -static -std=gnu99
+TARGET=tsr
+TESTTARGET=tsr-TESTING
+INSTALL_DIRECTORY=/usr/local/bin
+MAKEFLAGS +=
+SRCS=trashsys.c
+
+all: release
+clean:
+ rm -f $(TARGET)
+ rm -f test/$(TESTTARGET)
+
+tests:
+ $(CC) $(CFLAGS_TESTBIN) $(SRCS) -o test/$(TESTTARGET)
+
+install:
+ cp $(TARGET) $(INSTALL_DIRECTORY)
+
+release:
+ $(CC) $(CFLAGS) $(SRCS) -o $(TARGET)