1 |
INCLUDE=-I/usr/include/mysql |
2 |
CFLAGS=-O2 -Wall |
3 |
DEBUG_CFLAGS=-O0 -Wall -DDEBUG -g |
4 |
LIBS=-lmysqlclient -lcrypt -lz -lm |
5 |
LDFLAGS=-fPIC -shared -Wl,-soname,auth-mysql.so |
6 |
|
7 |
auth-mysql.so: auth-mysql.o |
8 |
gcc $(LDFLAGS) -o auth-mysql.so auth-mysql.o $(LIBS) |
9 |
|
10 |
auth-mysql.o: auth-mysql.c |
11 |
gcc $(CFLAGS) $(INCLUDE) -fPIC -c auth-mysql.c |
12 |
|
13 |
# debian stores openvpn plugins in /usr/lib/openvpn |
14 |
install: auth-mysql.so |
15 |
cp auth-mysql.so /usr/lib/openvpn |
16 |
|
17 |
clean: |
18 |
rm -f *~ |
19 |
rm -f *.o |
20 |
rm -f *.so |