aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorjozan <jozan@noemail.net>2020-11-02 21:15:21 +0000
committerjozan <jozan@noemail.net>2020-11-02 21:15:21 +0000
commitff40b08d43d16a8830d36fd8caaac08139220db6 (patch)
tree7acc8f1fe64a4066d8a6369416a9eefbec509a44 /Makefile
parentFirst commit (diff)
downloadunixize-ff40b08d43d16a8830d36fd8caaac08139220db6.tar.gz
unixize-ff40b08d43d16a8830d36fd8caaac08139220db6.tar.bz2
unixize-ff40b08d43d16a8830d36fd8caaac08139220db6.tar.xz
unixize-ff40b08d43d16a8830d36fd8caaac08139220db6.tar.zst
unixize-ff40b08d43d16a8830d36fd8caaac08139220db6.zip
In progress
FossilOrigin-Name: b55d7e4a92f90bf865e720f2b97363fe9ec5929a0b63f1614807300f89891d2a
Diffstat (limited to '')
-rw-r--r--Makefile33
1 files changed, 21 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 9bd96d5..2c7ed62 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,3 @@
-################################################################################
-#* ===== ===============*#
-#* File : Makefile ====== ================*#
-#* Author : Joe ====== ================*#
-#* Date : 2020-11-02 ====== ==== ==== ==*#
-#* Info : GNU Makefile ====== === == = =*#
-#* ====== === = == =*#
-#* = === === = == ====*#
-#* = === === = == = =*#
-#* == ===== ==== ==*#
-################################################################################
-
default: msan
SHELL := /bin/sh
@@ -36,6 +24,27 @@ OBJS = $(patsubst ${SRCS_DIR}%.c, ${OBJS_DIR}%.c.o, ${SRCS})
TARGET = unixize
+${OBJS_DIR}%.o: ${SRCS_DIR}%.c ${INCS} Makefile
+ @${MKDIR} ${OBJS_DIR}
+ ${CC} -c ${CFLAGS} $@ $<
+
+all: ${OBJS}
+ ${CC} ${CFLAGS} -o ${TARGET} ${OBJS}
+
+debug: CFLAGS += -glldb
+debug: all
+
+asan: CFLAGS += -glldb
+asan: CFLAGS += -fsanitize=address
+asan: all
+
+msan: CFLAGS += -glldb
+msan: CFLAGS += -fsanitize=memory
+msan: CFLAGS += -fsanitize-memory-track-origins
+msan: all
+
clean:
${RM} ${OBJS_DIR}
${RM} ${TARGET}
+
+.PHONY: all clean debug asan msan