You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
457 B

6 years ago
TRANS:=src/sipc.c
INCLUDE:=include/
STD:=gnu11
CFLAGS:= --std=$(STD) -Wall -pedantic -I$(INCLUDE)
LCFLAGS:= -c $(CFLAGS) -fPIC
6 years ago
all: clean libsipc sipcli
6 years ago
all-ffi: all libsipc-ffi
6 years ago
clean:
rm -f *.o
rm -f *.so
rm -f sipcli
6 years ago
rm -f *.socket
libsipc:
gcc $(LCFLAGS) $(TRANS)
6 years ago
gcc -shared -o $@.so *.o
6 years ago
libsipc-ffi:
gcc $(LCFLAGS) $(TRANS) src/ffi.c
6 years ago
gcc -shared -o $@.so *.o
sipcli: libsipc
gcc $(CFLAGS) -Wl,-rpath=./ src/cli.c -o $@ -L./ -lsipc
6 years ago
./$@