Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
9f0bed69
Commit
9f0bed69
authored
Jun 03, 2014
by
Alejandro Mery
Browse files
lib: extend to create .so versions of the libraries
Signed-off-by:
Alejandro Mery
<
amery@geeks.cl
>
parent
834dd388
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/Makefile
View file @
9f0bed69
...
...
@@ -8,23 +8,33 @@ O ?= $(srctree)/out
OBJDIR
:=
$(O)
/lib
DEPS
:=
$(OBJDIR)
/deps.mk
SRCS
:=
INCLUDES
=
-I
$(srctree)
/include
CFLAGS
=
-O2
CFLAGS
+=
-Wall
-Wextra
-std
=
c99
-D_POSIX_C_SOURCE
=
200112L
CFLAGS
+=
-fPIC
CFLAGS
+=
$(INCLUDES)
SRCS
:=
all
:
libs
include
libfex/Makefile
# *.a
%.a
:
# libraries
libs
:
$(LIBS) $(SOLIBS)
$(LIBS)
:
@
mkdir
-vp
$
(
@D
)
$(AR)
rcs
$@
$^
$(SOLIBS)
:
@
mkdir
-vp
$
(
@D
)
$(CC)
-shared
-Wl
,-soname,
$
(
@F
)
-o
$@
$^
x
=
$@
;
while
[
"
$$
x"
=
"
$
${x%.so}
"
]
;
do
\
x
=
$
${
x
%.*
}
;
\
ln
-snvf
$
(
@F
)
$$
x
;
\
done
# *.o
%.o
:
SRC=$(patsubst $(OBJDIR)/%.o
,
%.c
,
$@)
%.o
:
...
...
lib/libfex/Makefile
View file @
9f0bed69
libfex_SOURCES
:=
$(
wildcard
libfex/
*
.c
)
libfex_OBJS
:=
$(
patsubst
%.c,
$(OBJDIR)
/%.o,
$(libfex_SOURCES)
)
libfex_LIB
:=
$(O)
/libfex.a
libfex_SO
:=
$(O)
/libfex.so.1.0
SRCS
+=
$(libfex_SOURCES)
OBJS
+=
$(libfex_OBJS)
libs
:
$(libfex_LIB)
LIBS
+=
$(libfex_LIB)
$(libfex_LIB)
:
$(libfex_OBJS)
SOLIBS
+=
$(libfex_SO)
$(libfex_SO)
:
$(libfex_OBJS)
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