made test program a proper cli

master
Avril 6 years ago
parent 538be740f0
commit ba8b669dae
Signed by: flanchan
GPG Key ID: 284488987C31F630

2
.gitignore vendored

@ -1,4 +1,4 @@
libsipc/test libsipc/sipcli
*.o *.o
*.so *.so
*.socket *.socket

@ -2,18 +2,18 @@ TRANS:=src/sipc.c
INCLUDE:=include/ INCLUDE:=include/
CFLAGS:= -c -Wall -pedantic -fPIC -I$(INCLUDE) CFLAGS:= -c -Wall -pedantic -fPIC -I$(INCLUDE)
all: clean libsipc test all: clean libsipc sipcli
clean: clean:
rm -f *.o rm -f *.o
rm -f *.so rm -f *.so
rm -f test rm -f sipcli
rm -f *.socket rm -f *.socket
libsipc: libsipc:
gcc $(CFLAGS) $(TRANS) gcc $(CFLAGS) $(TRANS)
gcc -shared -o $@.so *.o gcc -shared -o $@.so *.o
test: libsipc sipcli: libsipc
gcc -Wall -pedantic -I$(INCLUDE) -Wl,-rpath=./ src/test.c -o $@ -L./ -lsipc gcc -Wall -pedantic -I$(INCLUDE) -Wl,-rpath=./ src/test.c -o $@ -L./ -lsipc
./$@ ./$@

Loading…
Cancel
Save