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.

27 lines
459 B

6 years ago
TRANS:=src/sipc.c
INCLUDE:=include/
CFLAGS:= -c -Wall -fPIC -I$(INCLUDE)
STD:=--std=gnu11
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 $(STD) $(CFLAGS) $(TRANS)
6 years ago
gcc -shared -o $@.so *.o
6 years ago
libsipc-ffi:
gcc $(STD) $(CFLAGS) $(TRANS) src/ffi.c
6 years ago
gcc -shared -o $@.so *.o
sipcli: libsipc
gcc $(STD) -Wall -pedantic -I$(INCLUDE) -Wl,-rpath=./ src/test.c -o $@ -L./ -lsipc
6 years ago
./$@