Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bpm-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
bpm
bpm-sw
Commits
a75286b0
Commit
a75286b0
authored
Jun 18, 2015
by
Lucas Russo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/libs/libhutils/Makefile: distribute dynamic library as well
This is needed as libclient uses libhutils explicitly now
parent
10f1ecad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
2 deletions
+24
-2
Makefile
src/libs/libhutils/Makefile
+24
-2
No files found.
src/libs/libhutils/Makefile
View file @
a75286b0
...
...
@@ -15,8 +15,14 @@ PWD = $(shell pwd)
LIBHUTILS
=
libhutils
# Config variables suitable for creating shared libraries
LIB_VER_MAJOR
=
1
LIB_VER_MINOR
=
0
LIB_VER_REVISION
=
0
LIB_VER
=
$(LIB_VER_MAJOR)
.
$(LIB_VER_MINOR)
.
$(LIB_VER_REVISION)
# General C flags
CFLAGS
=
-std
=
gnu99
-O2
CFLAGS
=
-std
=
gnu99
-O2
-fPIC
# To enable this option, use: make ERRHAND_DBG=y
ifneq
($(ERRHAND_DBG),)
...
...
@@ -79,9 +85,13 @@ OBJS_all = $(common_OBJS) $($(LIBHUTILS)_OBJS)
# Libraries suffixes
LIB_STATIC_SUFFIX
=
.a
LIB_SHARED_SUFFIX
=
.so
# Generate suitable names for static libraries
# Generate suitable names for static libraries
TARGET_STATIC
=
$
(
addsuffix
$(LIB_STATIC_SUFFIX)
,
$(OUT)
)
TARGET_SHARED
=
$
(
addsuffix
$(LIB_SHARED_SUFFIX)
,
$(OUT)
)
TARGET_SHARED_VER
=
$
(
addsuffix
$(LIB_SHARED_SUFFIX)
.
$(LIB_VER)
,
$(OUT)
)
.PHONY
:
all clean mrproper install uninstall
...
...
@@ -89,12 +99,16 @@ TARGET_STATIC = $(addsuffix $(LIB_STATIC_SUFFIX), $(OUT))
.SECONDARY
:
$(OBJS_all)
# Makefile rules
all
:
$(TARGET_STATIC)
all
:
$(TARGET_STATIC)
$(TARGET_SHARED_VER)
# Compile static library
%.a
:
$$($$*_OBJS)
$(AR)
rcs
$@
$^
# Compile dynamic library
%.so.$(LIB_VER)
:
$$($$*_OBJS) $(OBJ_REVISION)
$(CC)
-shared
-fPIC
-Wl
,-soname,
$@
-o
$@
$^
$(LDFLAGS)
# Pull in dependency info for *existing* .o files and don't complain if the
# corresponding .d file is not found
-include $(OBJS_all
:
.o=.d)
...
...
@@ -127,8 +141,16 @@ all: $(TARGET_STATIC)
@
rm
-f
$*
.d.tmp
install
:
$
(
foreach lib,
$(TARGET_SHARED_VER)
,install
-m
755
$(lib)
$(PREFIX)
/lib
$(CMDSEP)
)
$
(
foreach lib,
$(TARGET_SHARED)
,ln
-sf
$(lib)
.
$(LIB_VER)
$(PREFIX)
/lib/
$(lib)
$(CMDSEP)
)
$
(
foreach lib,
$(TARGET_SHARED)
,ln
-sf
$(lib)
.
$(LIB_VER)
$(PREFIX)
/lib/
$(lib)
.
$(LIB_VER_MAJOR)
$(CMDSEP)
)
$
(
foreach lib,
$(TARGET_STATIC)
,install
-m
755
$(lib)
$(PREFIX)
/lib
$(CMDSEP)
)
uninstall
:
$
(
foreach lib,
$(TARGET_SHARED)
,rm
-f
$(PREFIX)
/lib/
$(lib)
.
$(LIB_VER)
$(CMDSEP)
)
$
(
foreach lib,
$(TARGET_SHARED)
,rm
-f
$(PREFIX)
/lib/
$(lib)
$(CMDSEP)
)
$
(
foreach lib,
$(TARGET_SHARED)
,rm
-f
$(PREFIX)
/lib/
$(lib)
.
$(LIB_VER_MAJOR)
$(CMDSEP)
)
$
(
foreach lib,
$(TARGET_STATIC)
,rm
-f
$(PREFIX)
/lib/
$(lib)
$(CMDSEP)
)
clean
:
rm
-f
$(OBJS_all)
$
(
OBJS_all:.o
=
.d
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment