Commit 46ea2e4d authored by garcialasheras's avatar garcialasheras

Build speclib.so shared library as an extra

parent a8d2f0ed
libspec.a libspec.a
libspec.so
spec-cl spec-cl
specmem specmem
spec-fwloader spec-fwloader
......
CFLAGS = -ggdb -Wall -I../kernel CFLAGS = -ggdb -Wall -fPIC -I../kernel
LDFLAGS = -L. -lspec LDFLAGS = -L. -lspec
LIB = libspec.a LIB = libspec.a
LIBOBJ = speclib.o loader-ll.o LIBOBJ = speclib.o loader-ll.o
LIBSHARED = libspec.so
PROGS = spec-cl spec-fwloader spec-vuart specmem PROGS = spec-cl spec-fwloader spec-vuart specmem
PROGS += wr-dio-cmd wr-dio-pps wr-dio-agent wr-dio-ruler PROGS += wr-dio-cmd wr-dio-pps wr-dio-agent wr-dio-ruler
PROGS += stamp-frame PROGS += stamp-frame
all: $(LIB) $(PROGS) $(LIBSHARED)
all: $(LIB) $(PROGS)
$(PROGS): $(LIB) $(PROGS): $(LIB)
...@@ -18,10 +19,13 @@ $(LIB): $(LIBOBJ) ...@@ -18,10 +19,13 @@ $(LIB): $(LIBOBJ)
ar r $@ $^ ar r $@ $^
loader-ll.o: ../kernel/loader-ll.c loader-ll.o: ../kernel/loader-ll.c
${CC} -c $^ -I . ${CC} -fPIC -c $^ -I .
$(LIBSHARED): $(LIB)
${CC} -shared -o $@ -Wl,--whole-archive $^ -Wl,--no-whole-archive
clean: clean:
rm -f *.o $(LIB) $(PROGS) *~ rm -f *.o $(LIB) $(PROGS) $(LIBSHARED) *~
# add the other unused targets, so the rule in ../Makefile works # add the other unused targets, so the rule in ../Makefile works
modules install modules_install: modules install modules_install:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment