TagName=test
TARGET = $(TagName)
Plat_CROSS=

CPP     = $(Plat_CROSS)g++
CC      = $(Plat_CROSS)gcc

CFLAGS = -Wall -O2

CFLAGS += -I. -I./Include -I./Include/Json_Header
	  
SRCS = $(wildcard *.cpp Config/*.cpp)
OBJS =  $(patsubst %.cpp, %.o, $(SRCS))	

LDFLAGS = -Wl,-Bsymbolic -Wl,-rpath=. -L.

LIBS =  XNetSDK pthread rt

$(TARGET): $(OBJS)
	$(CPP) $(LDFLAGS) $(CFLAGS) $(OBJS) $(addprefix -l, $(LIBS)) -o $(TARGET)

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

.cpp.o:
	$(CPP) -c $(CFLAGS) $< -o $@

clean:
	rm -f $(OBJS)

