aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--.fossil-settings/ignore-glob1
-rw-r--r--Makefile33
-rw-r--r--src/c_unixize.c57
-rw-r--r--src/c_unixize.h0
4 files changed, 79 insertions, 12 deletions
diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob
index 8543b43..ce0679b 100644
--- a/.fossil-settings/ignore-glob
+++ b/.fossil-settings/ignore-glob
@@ -1,3 +1,4 @@
obj
unixize
git.sh
+compile_flags.txt
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
diff --git a/src/c_unixize.c b/src/c_unixize.c
new file mode 100644
index 0000000..08eb6da
--- /dev/null
+++ b/src/c_unixize.c
@@ -0,0 +1,57 @@
+/*
+ * ========================
+ * ===== ===============
+ * ====== ================
+ * ====== ================
+ * ====== ==== ==== ==
+ * ====== === == = =
+ * ====== === = == =
+ * = === === = == ====
+ * = === === = == = =
+ * == ===== ==== ==
+ * ========================
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ * Copyright (c) 2020 Joe
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the organization nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+
+ * THIS SOFTWARE IS PROVIDED BY yourname ''AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL yourname BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $unixize: src/c_unixize.c 2020-11-02 22:14 joe $
+ */
+
+int
+main(int argc, const char *argv[])
+{
+ (void)argc;
+ (void)argv;
+ return (0);
+}
+
+/*
+ * Files prefixes index
+ * --------------------
+ * c_ -> core program related
+ *
+ */
diff --git a/src/c_unixize.h b/src/c_unixize.h
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/c_unixize.h