diff options
Diffstat (limited to 'src/Makefile')
-rwxr-xr-x | src/Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile new file mode 100755 index 0000000..d4719ac --- /dev/null +++ b/src/Makefile @@ -0,0 +1,20 @@ +LIBNAME = add + +all: lib$(LIBNAME).so test$(LIBNAME) + +$(LIBNAME).o: $(LIBNAME).h $(LIBNAME).c + gcc -fPIC -c $(LIBNAME).c + +lib$(LIBNAME).so: $(LIBNAME).o + gcc -shared -o lib$(LIBNAME).so $(LIBNAME).o + +test$(LIBNAME): lib$(LIBNAME).so main.c add.h + gcc -Wall -L$(PWD) -Wl,-rpath=$(PWD) -o $@ main.c -l$(LIBNAME) -g + +install: + cp add.h ../thirdparty/linux/include/ + cp libadd.so ../thirdparty/linux/lib/x64/ + +.PHONY: clean +clean: + $(RM) -f *.so *.o test |