aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-01-31 17:23:58 +0100
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-01-31 17:23:58 +0100
commitdcb0210f2a1edaaf23cc8b11e86619eca2658d28 (patch)
treec4b42e96646f3b97a84dfd0dc225da200b40dac2
downloadlog-dcb0210f2a1edaaf23cc8b11e86619eca2658d28.tar.gz
log-dcb0210f2a1edaaf23cc8b11e86619eca2658d28.zip
Initial commit
-rw-r--r--LICENSE26
-rw-r--r--Makefile24
-rw-r--r--main.c7
3 files changed, 57 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..4883772
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,26 @@
+Copyright 2023 Alessandro Iezzi
+
+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 copyright holder 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 THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDER OR CONTRIBUTORS 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.
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..54c3676
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+# See LICENSE file for copyright and license details.
+
+CC = cc
+SRC != find * -name '*.c'
+OBJ = ${SRC:.c=.o}
+
+LIBNAME = liblog
+
+CFLAGS = -O2 -pipe -Wall -Werror --std=c89 -ansi
+LDFLAGS =
+
+${LIBNAME:=.so}: ${OBJ}
+ ${CC} ${LDFLAGS} -shared ${OBJ} -o $@
+
+${LIBNAME:=.a}: ${OBJ}
+ ar rcs $@ ${OBJ}
+
+.c.o:
+ ${CC} ${CFLAGS} -c $<
+
+all: ${LIBNAME:=.so} ${LIBNAME:=.a}
+
+clean:
+ rm -f *.o ${LIBNAME}.*
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..5119573
--- /dev/null
+++ b/main.c
@@ -0,0 +1,7 @@
+/* See LICENSE file for copyright and license details. */
+
+int
+main(int argc, char **argv)
+{
+ return 0;
+} \ No newline at end of file