Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sven Gestegård Robertz
LabComm
Commits
704714a6
Commit
704714a6
authored
May 27, 2013
by
Anders Blomdell
Browse files
Preparing for use of dynamic library (currently disabled
by referring to liblabcomm.a in liblabcomm.so).
parent
000ca2a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/c/Makefile
View file @
704714a6
## Macros
# Use LLVM clang if it's found.
CC
=
$(
shell
hash
clang 2>/dev/null
&&
echo
clang
||
echo
gcc
)
CFLAGS
=
-g
-Wall
-Werror
-O3
-I
.
-Itest
-DLABCOMM_ENCODER_LINEAR_SEARCH
LDFLAGS
=
-L
.
LDLIBS_TEST
=
-Tlabcomm
.linkscript
-lcunit
-llabcomm
CC
=
gcc
CFLAGS
=
-g
-Wall
-Werror
-O3
-I
.
-Itest
-DLABCOMM_ENCODER_LINEAR_SEARCH
LDFLAGS
=
-L
.
#LDLIBS_TEST=-Tlabcomm.linkscript -lcunit -llabcomm
LDLIBS_TEST
=
-lcunit
-llabcomm
OBJS
=
labcomm.o
\
labcomm_dynamic_buffer_writer.o labcomm_fd_reader.o labcomm_fd_writer.o
\
labcomm_pthread_mutex_lock.o
OBJS
=
labcomm.o labcomm_dynamic_buffer_writer.o labcomm_fd_reader.o labcomm_fd_writer.o
#FIXME: labcomm_mem_reader.o labcomm_mem_writer.o
LABCOMM_JAR
=
../../compiler/labComm.jar
LABCOMM
=
java
-jar
$(LABCOMM_JAR)
...
...
@@ -35,11 +38,13 @@ endif
.PHONY
:
all run-test clean distclean
all
:
liblabcomm.a
all
:
liblabcomm.a
liblabcomm.so.1
liblabcomm.a
:
$(OBJS)
ar
-r
liblabcomm.a
$^
liblabcomm.so.1
:
$(OBJS:%.o=%.pic.o)
gcc
-shared
-Wl
,-soname,
$@
-o
$@
$^
-lc
labcomm.o
:
labcomm.c labcomm.h labcomm_private.h
...
...
@@ -85,6 +90,9 @@ $(LABCOMM_JAR):
cd
$(
shell
dirname
$(LABCOMM_JAR)
)
;
ant jar
@
echo
"======End building LabComm compiler======"
%.pic.o
:
%.c
$(CC)
-fPIC
$(CFLAGS)
-c
-o
$@
$<
%.o
:
%.c %.h
clean
:
...
...
@@ -98,6 +106,7 @@ clean:
$(RM)
$(TEST_DIR)
/test_labcomm
distclean
:
clean
$(RM)
liblabcomm.so.1
$(RM)
liblabcomm.a
# Extra dependencies
...
...
lib/c/labcomm_private.h
View file @
704714a6
...
...
@@ -44,6 +44,12 @@
#define LABCOMM_DECLARE_SIGNATURE(name) \
struct labcomm_signature name __attribute__((section("labcomm")))
/*
* Semi private lock declarations
*/
struct
labcomm_lock
{
};
/*
* Semi private decoder declarations
*/
...
...
lib/c/liblabcomm.so
0 → 100644
View file @
704714a6
/*INPUT(liblabcomm.so.1 -ltinfo)*/
INPUT(liblabcomm.a)
Write
Preview
Supports
Markdown
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