- Create initial 0.1.6 changelog
- Makefiles can now be called from sub directories - Makefiles know includes and recompile if they are changed (linux, macosx) - Build all tests except SingletonDll with the static library (linux, macosx) git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@695 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
81c7b0d3db
commit
3de4a064cb
25 changed files with 244 additions and 135 deletions
40
src/Makefile
40
src/Makefile
|
@ -1,29 +1,31 @@
|
|||
SRC = $(wildcard *.cpp)
|
||||
STATIC_OBJ = $(SRC:.cpp=.o)
|
||||
SHARED_OBJ = $(SRC:.cpp=.lo)
|
||||
include ../Makefile.common
|
||||
|
||||
SRC := $(wildcard *.cpp)
|
||||
STATIC_OBJ := $(SRC:.cpp=.o)
|
||||
SHARED_OBJ := $(SRC:.cpp=.lo)
|
||||
|
||||
override CPPFLAGS += -I../include -DNDEBUG
|
||||
|
||||
STATIC_LIB = libloki.a
|
||||
STATIC_LIB := libloki.a
|
||||
|
||||
ifeq ($(OS), Darwin)
|
||||
SHARED_LIB_BASE = libloki.dylib
|
||||
SHARED_LIB_VERSIONED = libloki.$(VERSION).dylib
|
||||
SHARED_LIB_BASE := libloki.dylib
|
||||
SHARED_LIB_VERSIONED := libloki.$(VERSION).dylib
|
||||
override LDFLAGS += -dynamiclib -single_module -install_name $(SHARED_LIB_VERSIONED) -fPIC
|
||||
LDLIBS = -lpthread
|
||||
RESULT_DIR = ../lib/
|
||||
LDLIBS := -lpthread
|
||||
RESULT_DIR := ../lib/
|
||||
else
|
||||
ifeq ($(OS), Linux)
|
||||
SHARED_LIB_BASE = libloki.so
|
||||
SHARED_LIB_VERSIONED = libloki.so.$(VERSION)
|
||||
SHARED_LIB_BASE := libloki.so
|
||||
SHARED_LIB_VERSIONED := libloki.so.$(VERSION)
|
||||
override LDFLAGS += --shared -Wl,-soname=$(SHARED_LIB_VERSIONED) -fPIC
|
||||
LDLIBS = -lpthread
|
||||
RESULT_DIR = ../lib/
|
||||
LDLIBS := -lpthread
|
||||
RESULT_DIR := ../lib/
|
||||
else
|
||||
SHARED_LIB_BASE = libloki.dll
|
||||
SHARED_LIB_BASE := libloki.dll
|
||||
override LDFLAGS += --shared
|
||||
LDLIBS =
|
||||
RESULT_DIR = ../lib/
|
||||
LDLIBS :=
|
||||
RESULT_DIR := ../lib/
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -38,14 +40,14 @@ ifneq ($(OS), Windows)
|
|||
$(RM) $(SHARED_OBJ)
|
||||
endif
|
||||
|
||||
distclean: clean
|
||||
distclean: clean cleandeps
|
||||
$(RM) $(RESULT_DIR)$(STATIC_LIB)
|
||||
$(RM) $(RESULT_DIR)$(SHARED_LIB_BASE)
|
||||
ifneq ($(OS),Windows)
|
||||
$(RM) $(RESULT_DIR)$(SHARED_LIB_VERSIONED)
|
||||
|
||||
INSTALL = install
|
||||
INSTALL_DATA = $(INSTALL) -m 644
|
||||
INSTALL := install
|
||||
INSTALL_DATA := $(INSTALL) -m 644
|
||||
|
||||
.PHONY: install install-static install-shared
|
||||
install: install-static install-shared
|
||||
|
@ -73,3 +75,5 @@ endif
|
|||
|
||||
$(RESULT_DIR)$(STATIC_LIB): $(STATIC_OBJ)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
include ../Makefile.deps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue