Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 24 additions & 13 deletions libs/kano-networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,23 @@
PLATFORM := $(shell uname)

ifeq ($(PLATFORM), Linux)
SONAME_FLAG=-soname
SONAME=libkano_networking.so
LD_TYPE=-shared
SONAME_FLAG = -soname
SONAME = libkano_networking.so
LD_TYPE = -shared
else ifeq ($(PLATFORM), Darwin)
SONAME_FLAG=-install_name
SONAME=libkano_networking.dylib
LD_TYPE=-dynamiclib
SONAME_FLAG = -install_name
SONAME = libkano_networking.dylib
LD_TYPE = -dynamiclib
endif

CFLAGS+=-Wall -Wextra -g -fPIC -c
LDFLAGS+=$(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME)
INCLUDES+=-I./includes
OBJS=ifaces.so
CFLAGS += -Wall -Wextra -g -fPIC -c
LDFLAGS += $(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME)
INCLUDES += -I./includes
OBJS = ifaces.so

OUTDIR = release
DEBUG_OUTDIR = debug

OUTDIR=release
DEBUG_OUTDIR=debug

all: ensure-dir $(SONAME)

Expand All @@ -41,6 +42,9 @@ $(SONAME): $(OBJS)
%.so: src/%.c
$(CC) $(CFLAGS) $(INCLUDES) $< -o $(OUTDIR)/$@


clean: clean-release clean-debug

clean-release:
@rm -f $(OUTDIR)/$(OBJS)
@rm -f $(OUTDIR)/$(SONAME)
Expand All @@ -49,4 +53,11 @@ clean-debug:
@rm -f $(DEBUG_OUTDIR)/$(OBJS)
@rm -f $(DEBUG_OUTDIR)/$(SONAME)

clean: clean-release clean-debug
link: all # for Mac OS
mkdir -p /usr/local/include/kano
ln -fs `pwd`/includes/kano/* /usr/local/include/kano
ln -fs `pwd`/release/$(SONAME) /usr/local/lib

unlink: all # for Mac OS
rm -rf /usr/local/include/kano/networking
rm -f /usr/local/lib/$(SONAME)
39 changes: 25 additions & 14 deletions libs/kano-python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,28 @@
PLATFORM := $(shell uname)

ifeq ($(PLATFORM), Linux)
SONAME_FLAG=-soname
SONAME=libkano_python.so
LD_TYPE=-shared
SONAME_FLAG = -soname
SONAME = libkano_python.so
LD_TYPE = -shared
else ifeq ($(PLATFORM), Darwin)
SONAME_FLAG=-install_name
SONAME=libkano_python.dylib
LD_TYPE=-dynamiclib
SONAME_FLAG = -install_name
SONAME = libkano_python.dylib
LD_TYPE = -dynamiclib
endif

CXXFLAGS+=-Wall -Wextra -O3 -fPIC -c -std=c++11 `python-config --cflags`
LDFLAGS+=$(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME) `python-config --ldflags`
INCLUDES+=-I./includes
OBJS=python_helpers.so
CXXFLAGS += -Wall -Wextra -O3 -fPIC -c -std=c++11 `python-config --cflags`
LDFLAGS += $(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME) `python-config --ldflags`
INCLUDES += -I./includes
OBJS = python_helpers.so

OUTDIR = release
DEBUG_OUTDIR = debug

OUTDIR=release
DEBUG_OUTDIR=debug

all: ensure-dir $(SONAME)

debug: CXXFLAGS += -DDEBUG -g
debug: OUTDIR=$(DEBUG_OUTDIR)
debug: OUTDIR = $(DEBUG_OUTDIR)
debug: $(SONAME)

ensure-dir:
Expand All @@ -41,6 +42,9 @@ $(SONAME): $(OBJS)
%.so: src/%.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $< -o $(OUTDIR)/$@


clean: clean-release clean-debug

clean-release:
@rm -f $(OUTDIR)/$(OBJS)
@rm -f $(OUTDIR)/$(SONAME)
Expand All @@ -49,4 +53,11 @@ clean-debug:
@rm -f $(DEBUG_OUTDIR)/$(OBJS)
@rm -f $(DEBUG_OUTDIR)/$(SONAME)

clean: clean-release clean-debug
link: all # for Mac OS
mkdir -p /usr/local/include/kano
ln -fs `pwd`/includes/kano/* /usr/local/include/kano
ln -fs `pwd`/release/$(SONAME) /usr/local/lib

unlink: all # for Mac OS
rm -rf /usr/local/include/kano/python
rm -f /usr/local/lib/$(SONAME)
52 changes: 34 additions & 18 deletions libs/kano/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,54 @@
PLATFORM := $(shell uname)

ifeq ($(PLATFORM), Linux)
SONAME_FLAG=-soname
SONAME=libkano.so
LD_TYPE=-shared
SONAME_FLAG = -soname
SONAME = libkano.so
LD_TYPE = -shared
else ifeq ($(PLATFORM), Darwin)
SONAME_FLAG=-install_name
SONAME=libkano.dylib
LD_TYPE=-dynamiclib
SONAME_FLAG = -install_name
SONAME = libkano.dylib
LD_TYPE = -dynamiclib
endif

ifdef LOCAL_BUILD
CXXFLAGS+=-I../kano-python/includes
LDFLAGS+=-L../kano-python/release
endif
CXXFLAGS += -Wall -Wextra -O3 -fPIC -c -std=c++11 `python-config --cflags`
LDFLAGS += $(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME) `python-config --ldflags` -lkano_python
INCLUDES += -I./includes
OBJS = \
kano_network.so \
kano_utils_audio.so
DEPS = \
kano-toolset/libs/kano-python

CXXFLAGS+=-Wall -Wextra -O3 -fPIC -c -std=c++11 `python-config --cflags`
LDFLAGS+=$(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME) `python-config --ldflags` -lkano_python
INCLUDES+=-I./includes
OBJS=kano_network.so kano_utils_audio.so
OUTDIR = release
DEBUG_OUTDIR = debug

OUTDIR=release
DEBUG_OUTDIR=debug

ifeq ($(PLATFORM), Darwin)
all: ensure-dir $(DEPS) $(SONAME)
else
all: ensure-dir $(SONAME)
endif

debug: CXXFLAGS += -DDEBUG -g
debug: OUTDIR=$(DEBUG_OUTDIR)
debug: OUTDIR = $(DEBUG_OUTDIR)
debug: $(SONAME)

ensure-dir:
mkdir -p $(OUTDIR)
mkdir -p $(DEBUG_OUTDIR)

$(DEPS):
make -C ../../../$@ link

$(SONAME): $(OBJS)
$(CXX) $(LDFLAGS) $(addprefix $(OUTDIR)/, $?) -o $(OUTDIR)/$@

%.so: src/%.cpp
$(CXX) $(CXXFLAGS) $(INCLUDES) $< -o $(OUTDIR)/$@


clean: clean-release clean-debug

clean-release:
@rm -f $(OUTDIR)/$(OBJS)
@rm -f $(OUTDIR)/$(SONAME)
Expand All @@ -54,5 +64,11 @@ clean-debug:
@rm -f $(DEBUG_OUTDIR)/$(OBJS)
@rm -f $(DEBUG_OUTDIR)/$(SONAME)

clean: clean-release clean-debug
link: all # for Mac OS
mkdir -p /usr/local/include/kano
ln -fs `pwd`/includes/kano/* /usr/local/include/kano
ln -fs `pwd`/release/$(SONAME) /usr/local/lib

unlink: all # for Mac OS
rm -rf /usr/local/include/kano/kano
rm -f /usr/local/lib/$(SONAME)
39 changes: 25 additions & 14 deletions libs/parson/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,28 @@
PLATFORM := $(shell uname)

ifeq ($(PLATFORM), Linux)
SONAME_FLAG=-soname
SONAME=libparson.so
LD_TYPE=-shared
SONAME_FLAG = -soname
SONAME = libparson.so
LD_TYPE = -shared
else ifeq ($(PLATFORM), Darwin)
SONAME_FLAG=-install_name
SONAME=libparson.dylib
LD_TYPE=-dynamiclib
SONAME_FLAG = -install_name
SONAME = libparson.dylib
LD_TYPE = -dynamiclib
endif

CFLAGS+=-Wall -Wextra -g -fPIC -c
LDFLAGS+=$(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME)
INCLUDES+=-I./lib
OBJS=parson.so
CFLAGS += -Wall -Wextra -g -fPIC -c
LDFLAGS += $(LD_TYPE) -Wl,$(SONAME_FLAG),$(SONAME)
INCLUDES += -I./lib
OBJS = parson.so

OUTDIR = release
DEBUG_OUTDIR = debug

OUTDIR=release
DEBUG_OUTDIR=debug

all: ensure-dir $(SONAME)

debug: CFLAGS += -DDEBUG -g
debug: OUTDIR=$(DEBUG_OUTDIR)
debug: OUTDIR = $(DEBUG_OUTDIR)
debug: $(SONAME)

ensure-dir:
Expand All @@ -45,6 +46,9 @@ $(SONAME): $(OBJS)
%.so: lib/%.c
$(CC) $(CFLAGS) $(INCLUDES) $< -o $(OUTDIR)/$@


clean: clean-release clean-debug

clean-release:
@rm -f $(OUTDIR)/$(OBJS)
@rm -f $(OUTDIR)/$(SONAME)
Expand All @@ -53,4 +57,11 @@ clean-debug:
@rm -f $(DEBUG_OUTDIR)/$(OBJS)
@rm -f $(DEBUG_OUTDIR)/$(SONAME)

clean: clean-release clean-debug
link: all # for Mac OS
mkdir -p /usr/local/include/parson
ln -fs `pwd`/lib/*.h /usr/local/include/parson
ln -fs `pwd`/release/$(SONAME) /usr/local/lib

unlink: all # for Mac OS
rm -rf /usr/local/include/parson
rm -f /usr/local/lib/$(SONAME)