forked from pikiwidb/rediscache
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 879d2ad
Showing
55 changed files
with
20,608 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# vim temp files | ||
*.swp | ||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
*pb.cc | ||
*pb.h | ||
build | ||
cmake-build-debug | ||
cmake-build-release | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
|
||
# Compiled Static libraries | ||
*.lai *.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
|
||
# Log path | ||
make_config.mk | ||
log/ | ||
lib/ | ||
output/ | ||
|
||
# DB | ||
db/ | ||
dump/ | ||
src/dbsync/ | ||
|
||
# third party | ||
gdb.txt | ||
tags | ||
|
||
# IDE | ||
.vscode | ||
|
||
# generate | ||
make_config.mk | ||
src/*.d | ||
src/build_version.cc | ||
|
||
#cache | ||
.cache | ||
|
||
.idea/ | ||
|
||
|
||
#build | ||
build/ | ||
buildtrees | ||
deps | ||
|
||
#develop container | ||
.devcontainer | ||
|
||
# include codis fe javascript lib files | ||
!codis/cmd/fe/assets/** | ||
|
||
tests/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0) | ||
|
||
OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF) | ||
OPTION(DISABLE_TESTS "If tests should be compiled or not" OFF) | ||
|
||
PROJECT(rediscache LANGUAGES "C" VERSION 4.0.14) | ||
|
||
AUX_SOURCE_DIRECTORY(. LIB_SOURCES) | ||
|
||
SET(CMAKE_C_FLAGS "-std=c99 -O2 -pedantic -DREDIS_STATIC='' -Wall -W -Wno-missing-field-initializers -Wno-uninitialized -fPIC -Wcpp") | ||
|
||
FILE(GLOB_RECURSE H_FILES "*.h") | ||
ADD_LIBRARY(rediscache STATIC ${LIB_SOURCES}) | ||
|
||
#SET_TARGET_PROPERTIES(rediscache PROPERTIES PUBLIC_HEADER "${H_FILES}") | ||
# SET({CMAKE_INSTALL_INCLUDEDIR} "include") | ||
# INSTALL(TARGETS rediscache | ||
# PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rediscache" | ||
# LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
# ) | ||
# INSTALL(TARGETS rediscache | ||
# PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX} | ||
# LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX} | ||
# ) | ||
|
||
# message(STATUS "CMAKE_INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}") | ||
# message(STATUS "CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}") | ||
# message(STATUS "H_FILES ${H_FILES}") | ||
|
||
INSTALL(FILES ${H_FILES} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/rediscache") | ||
INSTALL(TARGETS rediscache DESTINATION "${CMAKE_INSTALL_LIBDIR}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# gcc setting | ||
CC=gcc | ||
STD=-std=c99 -pedantic -DREDIS_STATIC='' | ||
WARN=-Wall -W -Wno-missing-field-initializers -Wno-uninitialized | ||
OPT=-O2 | ||
DEBUG=-g | ||
CFLAGS=-fPIC -Wcpp | ||
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) | ||
|
||
# ar setting | ||
AR=ar | ||
ARFLAGS=rs | ||
|
||
# build proj setting | ||
LIB_SOURCES := $(wildcard *.c) | ||
LIB_OBJECTS = $(LIB_SOURCES:.c=.o) | ||
LIB_NAME=libredisdb | ||
LIBRARY=${LIB_NAME}.a | ||
|
||
# target | ||
.PHONY: all clean | ||
|
||
all: $(LIBRARY) | ||
|
||
$(LIB_OBJECTS): $(LIB_SOURCES) | ||
$(CC) $(FINAL_CFLAGS) -c $(LIB_SOURCES) | ||
|
||
$(LIBRARY): $(LIB_OBJECTS) | ||
rm -f $@ | ||
$(AR) $(ARFLAGS) $@ $(LIB_OBJECTS) | ||
|
||
clean: | ||
rm -f $(LIBRARY) | ||
rm -f *.o |
Oops, something went wrong.