

#Include the toolchain configure.
include config.mk

ROOTDIR = ../../..
INCDIR = $(ROOTDIR)/Include
LIBDIR = $(ROOTDIR)/Lib/$(TCNAME)

SOURCES = ConnectListen.cpp

OBJS = ConnectListen.o

INC = $(INCDIR)/pgLibConnect.h

LIBS += -Wl,-Bstatic -lconnect $(LIBSTA) \
	-Wl,-Bdynamic $(LIBDYN)

TARGET = ConnectListen

#GCC flags
CFLAGS += -I$(INCDIR)

#Linker flags
LDFLAGS += -L./ -L$(LIBDIR)

demo: $(TARGET)

$(TARGET): $(OBJS)
	$(CXX) $(LDFLAGS) $(OBJS) $(LIBS) -o $(TARGET)
	$(STRIP) $(TARGET)
	rm -rf *.o

ConnectListen.o: ConnectListen.cpp $(INC)
	$(CXX) $(CFLAGS) -c ConnectListen.cpp -o ConnectListen.o


clean:
	rm -rf *.o *.so ConnectListen

