From: nishi Date: Thu, 16 May 2024 12:41:07 +0000 (+0000) Subject: add files X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=f8e9fc261645d81e8311242d5b59cd0bd62111b3;p=dataworks.git add files git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@3 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/Client/Makefile b/Client/Makefile new file mode 100644 index 0000000..669ad72 --- /dev/null +++ b/Client/Makefile @@ -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 index 0000000..44df3f9 --- /dev/null +++ b/Client/main.c @@ -0,0 +1,11 @@ +/* $Id$ */ +/* --- START LICENSE --- */ +/* --- END LICENSE --- */ + +#include + +#include + +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 index 0000000..645b8c7 --- /dev/null +++ b/Document/Doxyfile @@ -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 index 0000000..798af07 --- /dev/null +++ b/Document/Makefile @@ -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 index 0000000..e060229 --- /dev/null +++ b/Document/index.md @@ -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. diff --git a/Library/Makefile b/Library/Makefile index 98c6b99..64338c4 100644 --- a/Library/Makefile +++ b/Library/Makefile @@ -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 index 0000000..ad11ac2 --- /dev/null +++ b/Library/dataworks.c @@ -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 index 0000000..eecb64f --- /dev/null +++ b/Library/dataworks.h @@ -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 diff --git a/Makefile b/Makefile index 27ee9e1..6d253a6 100644 --- 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) diff --git a/Platforms/win32.mk b/Platforms/win32.mk index 7731baf..db18743 100644 --- a/Platforms/win32.mk +++ b/Platforms/win32.mk @@ -1,3 +1,4 @@ CC = i686-w64-mingw32-gcc LIB_PREFIX = LIB_SUFFIX = .dll +EXEC_SUFFIX = .exe diff --git a/Platforms/win64.mk b/Platforms/win64.mk index aa1d938..dd6531e 100644 --- a/Platforms/win64.mk +++ b/Platforms/win64.mk @@ -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 index 0000000..07cff8f Binary files /dev/null and b/dataworks.png differ