# Compiler info
CC     = /usr/bin/g++

CFLAGS = -Wall -O3 -g -Wimplicit -Wreturn-type -Wunused -Wuninitialized\
		 -Wparentheses -Wshadow -Wpointer-arith -Woverloaded-virtual\
		 -fno-rtti -D_REENTRANT -Wno-unused  -Wno-non-virtual-dtor

DIR_INCLUDE = 

# 32Bit Linux system Large File support option
DFLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64

OBJ = 

ALL = test_agent

# FreeBSD
ifeq ($(FreeBSD), yes)
LIBS =  -L/usr/local/lib -lc -lz -lexpat  -lpthread -lintl ../../libshcsdk.a ../../libshssdk.a
else
# Linux
LIBS =  -L/usr/local/lib -lc -lz -lexpat -lpthread ../../libshcsdk.a ../../libshssdk.a
endif

all: $(ALL)

%.o: %.cpp
	$(CC) $(CFLAGS)  -o $@ -c $^ $(DFLAGS) $(DIR_INCLUDE) 

%.o: %.c
	$(CC) $(CFLAGS)  -o $@ -c $^ $(DFLAGS) $(DIR_INCLUDE) 

test_agent: stdafx.o test_agent.o 
	$(CC) $(LFLAGS) -o $@ $^ $(DFLAGS) $(DIR_LIB) $(LIBS)	

clean:
	rm -f *.o $(ALL)
