]> Nishi Git Mirror - dataworks.git/commitdiff
add files
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Thu, 16 May 2024 12:41:07 +0000 (12:41 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Thu, 16 May 2024 12:41:07 +0000 (12:41 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@3 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

12 files changed:
Client/Makefile [new file with mode: 0644]
Client/main.c [new file with mode: 0644]
Document/Doxyfile [new file with mode: 0644]
Document/Makefile [new file with mode: 0644]
Document/index.md [new file with mode: 0644]
Library/Makefile
Library/dataworks.c [new file with mode: 0644]
Library/dataworks.h [new file with mode: 0644]
Makefile
Platforms/win32.mk
Platforms/win64.mk
dataworks.png [new file with mode: 0644]

diff --git a/Client/Makefile b/Client/Makefile
new file mode 100644 (file)
index 0000000..669ad72
--- /dev/null
@@ -0,0 +1,17 @@
+# $Id$
+
+.PHONY: all clean
+.SUFFIXES: .c .o
+
+OBJS = main.o
+
+all: dataworks$(EXEC_SUFFIX)
+
+dataworks$(EXEC_SUFFIX): $(OBJS)
+       $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) -ldataworks
+
+.c.o:
+       $(CC) -I../Library $(CFLAGS) -c -o $@ $<
+
+clean:
+       rm -f *.o dataworks *.exe
diff --git a/Client/main.c b/Client/main.c
new file mode 100644 (file)
index 0000000..44df3f9
--- /dev/null
@@ -0,0 +1,11 @@
+/* $Id$ */
+/* --- START LICENSE --- */
+/* --- END LICENSE --- */
+
+#include <dataworks.h>
+
+#include <stdio.h>
+
+int main(int argc, char** argv){
+       printf("DataWorks %s\n", dataworks_get_version());
+}
diff --git a/Document/Doxyfile b/Document/Doxyfile
new file mode 100644 (file)
index 0000000..645b8c7
--- /dev/null
@@ -0,0 +1,29 @@
+# $Id$
+
+PROJECT_NAME = DataWorks
+OUTPUT_DIRECTORY = doc
+TAB_SIZE = 8
+OPTIMIZE_OUTPUT_FOR_C = YES
+MARKDOWN_SUPPORT = YES
+EXTRACT_ALL = NO
+FILE_PATTERNS = *.h *.c
+INPUT = ../Library
+SOURCE_BROWSER = YES
+HTML_DYNAMIC_MENUS = YES
+GENERATE_TREEVIEW = YES
+EXCLUDE_SYMBOLS = __*
+FULL_SIDEBAR = NO
+DISABLE_INDEX = NO
+PROJECT_LOGO = ../dataworks.png
+PROJECT_BRIEF = Database Library/Client
+GENERATE_MAN = YES
+MAN_OUTPUT = man
+HTML_OUTPUT = html
+INPUT += index.md
+USE_MDFILE_AS_MAINPAGE = index.md
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = ../Library/
+IMAGE_PATH = ..
+ENABLED_SECTIONS = YES
+OUTPUT_LANGUAGE = English
+GENERATE_LATEX = NO
diff --git a/Document/Makefile b/Document/Makefile
new file mode 100644 (file)
index 0000000..798af07
--- /dev/null
@@ -0,0 +1,10 @@
+# $Id$
+
+.PHONY: all clean document
+all: document
+
+document:
+       doxygen
+
+clean:
+       rm -rf doc
diff --git a/Document/index.md b/Document/index.md
new file mode 100644 (file)
index 0000000..e060229
--- /dev/null
@@ -0,0 +1,7 @@
+# Abstract {#mainpage}
+
+**DataWorks** is a general-purpose and platform independent database library/client.
+
+## License
+
+**DataWorks** is free software, and sources are published under 3-clause BSD License.
index 98c6b99cb4ad97b95b7fcc2015eb37a2013b02a9..64338c4a4dcf8d270819d9efa4cee19384e0ae37 100644 (file)
@@ -3,7 +3,7 @@
 .PHONY: all clean
 .SUFFIXES: .c .o
 
-OBJS = parser.o
+OBJS = parser.o dataworks.o
 
 all: $(LIB_PREFIX)dataworks$(LIB_SUFFIX)
 
@@ -14,4 +14,4 @@ $(LIB_PREFIX)dataworks$(LIB_SUFFIX): $(OBJS)
        $(CC) $(CFLAGS) -fPIC -c -o $@ $<
 
 clean:
-       rm -f *.o $(LIB_PREFIX)dataworks$(LIB_SUFFIX)
+       rm -f *.o *.so *.dll
diff --git a/Library/dataworks.c b/Library/dataworks.c
new file mode 100644 (file)
index 0000000..ad11ac2
--- /dev/null
@@ -0,0 +1,11 @@
+/* $Id$ */
+/* --- START LICENSE --- */
+/* --- END LICENSE --- */
+
+#include "dataworks.h"
+
+const char* dataworks_version = DATAWORKS_VERSION;
+
+const char* dataworks_get_version(void){
+       return dataworks_version;
+}
diff --git a/Library/dataworks.h b/Library/dataworks.h
new file mode 100644 (file)
index 0000000..eecb64f
--- /dev/null
@@ -0,0 +1,39 @@
+/* $Id$ */
+/* --- START LICENSE --- */
+/* --- END LICENSE --- */
+
+#ifndef __DATAWORKS_DATAWORKS_H__
+#define __DATAWORKS_DATAWORKS_H__
+
+/**
+ * @file dataworks.h
+ * @~english
+ * @brief DataWorks info
+ *
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @~english
+ * @brief Version of DataWorks
+ * @note Use dataworks_get_version.
+ *
+ */
+#define DATAWORKS_VERSION "0.0.0"
+
+/**
+ * @~english
+ * @brief Get the version of DataWorks
+ * @return Version of DataWorks
+ *
+ */
+const char* dataworks_get_version(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
index 27ee9e10364b72f3a84b40b932efef6dc6f13ef8..6d253a6b9cf9913dffa028844e34c7edab33a397 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,33 @@
 # $Id$
 CC = cc
 CFLAGS = -std=c99
-LDFLAGS =
+LDFLAGS = -L`pwd`/Library
 LIBS =
 LIB_PREFIX = lib
 LIB_SUFFIX = .so
+EXEC_SUFFIX =
 
 .if "$(PLATFORM)" != ""
 .include "Platforms/$(PLATFORM).mk"
 .endif
 
-COMPILE_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" LIB_PREFIX="$(LIB_PREFIX)" LIB_SUFFIX="$(LIB_SUFFIX)"
+COMPILE_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" LIB_PREFIX="$(LIB_PREFIX)" LIB_SUFFIX="$(LIB_SUFFIX)" EXEC_SUFFIX="$(EXEC_SUFFIX)"
 
-.PHONY: all replace format clean ./Library
+.PHONY: all no-doc replace format clean ./Library ./Client ./Document
 
-all: ./Library
+all: ./Library ./Client ./Document
+
+no-doc: ./Library ./Client
 
 ./Library::
        $(MAKE) -C $@ $(COMPILE_FLAGS)
 
+./Client:: ./Library
+       $(MAKE) -C $@ $(COMPILE_FLAGS)
+
+./Document::
+       $(MAKE) -C ./Document $(COMPILE_FLAGS)
+
 FILES = `find . -name "*.c" -or -name "*.h"`
 
 replace:
@@ -34,3 +43,5 @@ format:
 
 clean:
        $(MAKE) -C ./Library clean $(COMPILE_FLAGS)
+       $(MAKE) -C ./Client clean $(COMPILE_FLAGS)
+       $(MAKE) -C ./Document clean $(COMPILE_FLAGS)
index 7731baf9b1f477f536d279e6154dc18b93212735..db187433ecbae9690280d28e2b12657242553d20 100644 (file)
@@ -1,3 +1,4 @@
 CC = i686-w64-mingw32-gcc
 LIB_PREFIX =
 LIB_SUFFIX = .dll
+EXEC_SUFFIX = .exe
index aa1d9381e2e3732b52a6f2d58a583f1bab8ab322..dd6531e11adc815086a0aaa691e924ab5410a8da 100644 (file)
@@ -1,3 +1,4 @@
 CC = x86_64-w64-mingw32-gcc
 LIB_PREFIX =
 LIB_SUFFIX = .dll
+EXEC_SUFFIX = .exe
diff --git a/dataworks.png b/dataworks.png
new file mode 100644 (file)
index 0000000..07cff8f
Binary files /dev/null and b/dataworks.png differ