CC = gcc
LIBEVENT_DIR=/var/tiggerisp/apps/common
LIBEVENT_LIB_DIR=$(LIBEVENT_DIR)/lib
LIBEVENT_INC_DIR=$(LIBEVENT_DIR)/include
CFLAGS = -g -O2 -DSOCKS -I$(LIBEVENT_INC_DIR)

OBJ = openvpn_proxy.o

all: openvpn_proxy

clean:
	rm -f *.o openvpn_proxy

openvpn_proxy: $(OBJ)
	$(CC) -o openvpn_proxy $(OBJ) -L$(LIBEVENT_LIB_DIR) -Wl,--rpath -Wl,$(LIBEVENT_LIB_DIR) -levent

.c.o:
	$(CC) -c $(CFLAGS) $<