Commit cfb9e36f authored by garcialasheras's avatar garcialasheras Committed by Federico Vaga

tools: Build speclib.so shared library as an extra

parent 6c9eec38
libspec.a libspec.a
libspec.so
spec-cl spec-cl
specmem specmem
spec-fwloader spec-fwloader
......
CFLAGS = -ggdb -Wall -I../kernel $(EXTRACFLAGS) CFLAGS = -ggdb -Wall -fPIC -I../kernel $(EXTRACFLAGS)
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)
...@@ -20,8 +21,12 @@ $(LIB): $(LIBOBJ) ...@@ -20,8 +21,12 @@ $(LIB): $(LIBOBJ)
loader-ll.o: ../kernel/loader-ll.c loader-ll.o: ../kernel/loader-ll.c
${CC} $(CFLAGS) -c $^ -I . ${CC} $(CFLAGS) -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