Cleanup and add visibility to missing functions
This commit is contained in:
parent
345450b35b
commit
bd4273050c
|
@ -7,7 +7,6 @@ demo/*
|
|||
bin/*
|
||||
obj/*
|
||||
webstuff-*
|
||||
Makefile
|
||||
tmp
|
||||
tmp/*
|
||||
*.tar.gz
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
#
|
||||
# Makefile
|
||||
# Ilja Kartašov, 2019-03-02 17:32
|
||||
#
|
||||
.POSIX:
|
||||
|
||||
# Project directories
|
||||
SRC_DIR ?= src
|
||||
SDK_DIR ?= sdk
|
||||
OUT_DIR ?= ./build
|
||||
|
||||
# Project definition
|
||||
include project.mk
|
||||
|
||||
# Examples submodule
|
||||
include examples.mk
|
||||
|
||||
# CFLAGS
|
||||
|
||||
CFLAGS := \
|
||||
$(PROJECT_INCLUDES) \
|
||||
-std=c99 \
|
||||
-pedantic \
|
||||
-Wall \
|
||||
-Wmissing-prototypes \
|
||||
-Wstrict-prototypes \
|
||||
-Wold-style-definition \
|
||||
-O2 \
|
||||
-s \
|
||||
-fvisibility=hidden \
|
||||
-DVERSION_MAJOR=$(PROJECT_VERSION_MAJOR) \
|
||||
-DVERSION_MINOR=$(PROJECT_VERSION_MINOR) \
|
||||
-DVERSION_TWEAK=$(PROJECT_VERSION_TWEAK) \
|
||||
-DVERSION_LABEL=$(PROJECT_VERSION_LABEL) \
|
||||
$(CPPFLAGS) \
|
||||
$(CFLAGS) \
|
||||
$(PROJECT_CFLAGS) \
|
||||
|
||||
|
||||
LDFLAGS := \
|
||||
$(PROJECT_LIBRARIES) \
|
||||
$(LDFLAGS) \
|
||||
$(PROJECT_LDFLAGS) \
|
||||
|
||||
|
||||
SOURCE_LIST := $(wildcard $(PROJECT_SOURCES))
|
||||
OBJECT_FILES := $(addprefix $(OUT_DIR)/o_, ${SOURCE_LIST:.c=.o})
|
||||
|
||||
|
||||
library: dirs $(OBJECT_FILES)
|
||||
$(info linking target: $@)
|
||||
@$(CC) -shared -o $(OUT_DIR)/lib$(PROJECT_NAME).so $(OBJECT_FILES) $(LDFLAGS)
|
||||
$(info done: $@)
|
||||
|
||||
|
||||
build/o_%.o: %.c
|
||||
$(info compiling file: $<)
|
||||
@$(CC) $(CFLAGS) -fpic -c $< -o $@
|
||||
|
||||
dirs:
|
||||
$(info preparing: build folders)
|
||||
@mkdir -p $(OUT_DIR)/o_$(SRC_DIR)
|
||||
@mkdir -p $(OUT_DIR)/o_$(SDK_DIR)
|
||||
|
||||
|
||||
clean:
|
||||
$(info cleaning: build files)
|
||||
@rm -Rf $(OUT_DIR)
|
||||
@rm -Rf ./vgcore.*
|
||||
|
||||
doc:
|
||||
doxygen doc/api-reference.conf
|
||||
|
||||
all: library examples doc
|
||||
|
||||
default: library
|
||||
.PHONY: all dirs clean doc install
|
||||
|
||||
install: library
|
||||
cp $(OUT_DIR)/lib$(PROJECT_NAME).so $(PREFIX)/lib64/
|
||||
cp -R include/aisl $(PREFIX)/include/
|
||||
|
||||
# vim:ft=make
|
||||
#
|
|
@ -3,7 +3,7 @@
|
|||
# Löwenware Makefile Config, 2019-03-02 17:35
|
||||
#
|
||||
|
||||
PREFIX = /usr/
|
||||
PREFIX = /usr/local
|
||||
PKG_CONFIG = pkg-config
|
||||
|
||||
PROJECT_NAME = aisl
|
||||
|
@ -52,7 +52,7 @@ PROJECT_LIBRARIES = \
|
|||
# flags
|
||||
PROJECT_CFLAGS = -D_POSIX_C_SOURCE=200809L
|
||||
PROJECT_CFLAGS += -DDEBUG
|
||||
PROJECT_CFLAGS += -DAISL_WITHOUT_SSL
|
||||
#PROJECT_CFLAGS += -DAISL_WITHOUT_SSL
|
||||
#PROJECT_CFLAGS += -DAISL_WITHOUT_STRINGIFIERS
|
||||
|
||||
|
||||
|
|
|
@ -151,8 +151,6 @@ aisl_client_input(aisl_client_t client)
|
|||
char * data = &client->in.data[ client->in.used ];
|
||||
int32_t size = client->in.size - client->in.used;
|
||||
|
||||
DPRINTF("Buffer: %p, %d", data, size);
|
||||
|
||||
#ifndef AISL_WITHOUT_SSL
|
||||
if (client->ssl)
|
||||
{
|
||||
|
|
|
@ -137,8 +137,6 @@ aisl_server_get_socket( aisl_server_t server )
|
|||
}
|
||||
|
||||
|
||||
/* API Level ---------------------------------------------------------------- */
|
||||
|
||||
aisl_server_t
|
||||
aisl_server_new(aisl_cfg_srv_t const cfg_srv, aisl_t instance)
|
||||
{
|
||||
|
@ -174,6 +172,10 @@ aisl_server_free(aisl_server_t server)
|
|||
}
|
||||
|
||||
|
||||
/* API Level ---------------------------------------------------------------- */
|
||||
|
||||
|
||||
__attribute__ ((visibility ("default") ))
|
||||
void
|
||||
aisl_server_get_address( aisl_server_t server, struct sockaddr_in * address)
|
||||
{
|
||||
|
@ -183,6 +185,7 @@ aisl_server_get_address( aisl_server_t server, struct sockaddr_in * address)
|
|||
|
||||
#ifndef AISL_WITHOUT_SSL
|
||||
|
||||
__attribute__ ((visibility ("default") ))
|
||||
bool
|
||||
aisl_server_get_ssl( aisl_server_t server )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue