mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Add Makefile
This commit is contained in:
parent
63d449df13
commit
1a8d960d04
1 changed files with 23 additions and 0 deletions
23
dynamic_parameters/library/example/Makefile
Normal file
23
dynamic_parameters/library/example/Makefile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
LIB_EXAMPLE := lib/libexample.so
|
||||
|
||||
OBJS := example.o
|
||||
|
||||
PROG_CFLAGS = $(CFLAGS) -fstrict-aliasing
|
||||
PROG_LDFLAGS = $(LDFLAGS) -lbbfdm
|
||||
FPIC := -fPIC
|
||||
|
||||
.PHONY: all
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(PROG_CFLAGS) $(FPIC) -c -o $@ $<
|
||||
|
||||
all: $(LIB_EXAMPLE)
|
||||
|
||||
$(LIB_EXAMPLE): $(OBJS)
|
||||
$(shell mkdir -p lib)
|
||||
$(CC) -shared -Wl,-soname,libexample.so $^ -o $@
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f $(LIB_EXAMPLE)
|
||||
|
||||
Loading…
Add table
Reference in a new issue