- 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
|
@ -1,26 +1,29 @@
|
|||
include ../Makefile.common
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
LIB1 = libfoo.dylib
|
||||
LIB2 = libsingletondll.dylib
|
||||
SHARED_LIB_FLAG = -dynamiclib
|
||||
LIB1 := libfoo.dylib
|
||||
LIB2 := libsingletondll.dylib
|
||||
SHARED_LIB_FLAG := -dynamiclib
|
||||
else
|
||||
ifeq ($(OS),Linux)
|
||||
LIB1 = libfoo.so
|
||||
LIB2 = libsingletondll.so
|
||||
SHARED_LIB_FLAG = --shared
|
||||
LIB1 := libfoo.so
|
||||
LIB2 := libsingletondll.so
|
||||
SHARED_LIB_FLAG := --shared
|
||||
else
|
||||
LIB1 = foo.dll
|
||||
LIB2 = singletondll.dll
|
||||
SHARED_LIB_FLAG = --shared
|
||||
LIB1 := foo.dll
|
||||
LIB2 := singletondll.dll
|
||||
SHARED_LIB_FLAG := --shared
|
||||
endif
|
||||
endif
|
||||
|
||||
BIN1 = client$(BIN_SUFFIX)
|
||||
SRC1 = client.cpp
|
||||
OBJ1 = $(SRC1:.cpp=.o)
|
||||
SRC2 = foo.cpp
|
||||
OBJ2 = $(SRC2:.cpp=.o)
|
||||
SRC3 = singletondll.cpp
|
||||
OBJ3 = $(SRC3:.cpp=.o)
|
||||
BIN1 := client$(BIN_SUFFIX)
|
||||
SRC1 := client.cpp
|
||||
OBJ1 := $(SRC1:.cpp=.o)
|
||||
SRC2 := foo.cpp
|
||||
OBJ2 := $(SRC2:.cpp=.o)
|
||||
SRC3 := singletondll.cpp
|
||||
OBJ3 := $(SRC3:.cpp=.o)
|
||||
override LDFLAGS := -L../../lib
|
||||
|
||||
.PHONY: all clean
|
||||
all: $(BIN1)
|
||||
|
@ -34,10 +37,12 @@ $(LIB1): $(OBJ2)
|
|||
$(LIB2): $(OBJ3)
|
||||
$(CXX) $(SHARED_LIB_FLAG) $(LDFLAGS) -L. -o $@ $^ -lfoo $(LDLIBS)
|
||||
|
||||
clean:
|
||||
clean: cleandeps
|
||||
$(RM) $(BIN1)
|
||||
$(RM) $(OBJ1)
|
||||
$(RM) $(LIB1)
|
||||
$(RM) $(OBJ2)
|
||||
$(RM) $(LIB2)
|
||||
$(RM) $(OBJ3)
|
||||
|
||||
include ../../Makefile.deps
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue