blob: 430a48df7a18123619e147de1d97a67e497a71cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
LIBNAME = mul
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 mul.h
gcc -Wall -L$(PWD) -Wl,-rpath=$(PWD) -o $@ main.c -l$(LIBNAME) -g
install:
cp mul.h ../thirdparty/linux/include/
cp libmul.so ../thirdparty/linux/lib/x64/
.PHONY: clean
clean:
$(RM) -f *.so *.o test
|