]> Nishi Git Mirror - clover.git/commitdiff
here
authornishi <nishi@cc13bd98-b292-b64a-ad22-c0789b689ca7>
Sat, 4 May 2024 15:47:32 +0000 (15:47 +0000)
committernishi <nishi@cc13bd98-b292-b64a-ad22-c0789b689ca7>
Sat, 4 May 2024 15:47:32 +0000 (15:47 +0000)
git-svn-id: file:///raid/svn-main/nishi-clover/trunk@2 cc13bd98-b292-b64a-ad22-c0789b689ca7

Makefile [new file with mode: 0644]
clover.c [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..117d9a3
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+# $Id$
+
+CC = cc
+CFLAGS = -g -std=c99
+LDFLAGS =
+LIBS =
+
+CLOVER_OBJS = clover.o
+
+.PHONY: all
+
+all: ./clover
+
+.SUFFIXES: .c .o
+
+./clover: $(CLOVER_OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(CLOVER_OBJS) $(LIBS)
+
+.c.o:
+       $(CC) $(CFLAGS) -c -o $@ $<
diff --git a/clover.c b/clover.c
new file mode 100644 (file)
index 0000000..4366fc3
--- /dev/null
+++ b/clover.c
@@ -0,0 +1,18 @@
+/* $Id$ */
+#include <stdio.h>
+#include <stdlib.h>
+
+#define CLOVER_VERSION "0.00"
+
+int parse_config(const char* path){
+       FILE* f = fopen(path, "r");
+       if(f == NULL) return 1;
+}
+
+int main(int argc, char** argv){
+       if(argv[1] == NULL){
+               return parse_config("clover.conf");
+       }else{
+               return parse_config(argv[1]);
+       }
+}