#program name
RCCHKNAME = rc_updown_test

# Which Compiler
CC	=	gcc
CXX	=	g++

# Which OS
OS	=	FreeBSD

#library directory
LIBDIR	=	-L/usr/local/lib -L/usr/lib -L../lib -L/user/db/mysql/lib/mysql\
				-L/user/db/pgsql/lib -L/usr/local/raslib/lib
				
INCLUDEDIR	=	-I/usr/local/include -I/usr/include\
					-I../include -I/user/db/mysql/include/mysql\
					-I/user/db/pgsql/include
RCCHK_INCLUDEDIR = -I/usr/local/include -I/usr/include\
				   		-I../include\
						-I/usr/local/raslib/include
#libraries
#LIBS	= /usr/local/lib/libxml2.so
LIBS	=	-lpthread -lreadconfig -lmysqlclient -lpq -lshsdk
RCCHK_LIBS = -lraslib -lexpat -lintl -lcrypt

#compile option
CFLAGS	=	-Wall -O -g3 -Wall -Wimplicit -Wreturn-type -Wunused -Wuninitialized
#           -Wparentheses -Wshadow -Wpointer-arith -Woverloaded-virtual

#link  option
LFLAGS	= 
#LFLAGS	=

#Definition flag
#DFLAGS	=	-D__DEBUG__
DFLAGS	=	-D__SETLOG__
#DFLAGS =	-D__RELEASE__
#DFLAGS	=	-D_REENTRANT

RCCHK_SRC = rc_updown_test.cpp
RCCHECK_OBJ = rc_updown_test.o

rc_updown_test : ${RCCHECK_OBJ}
	${CXX} ${CFLAGS} ${RCCHECK_OBJ} -o ${RCCHKNAME} ${LIBDIR} ${RCCHK_LIBS} ${LIBS}
.cpp.o	:	${RCCHK_SRC}
	${CXX} $(CFLAGS) -c -o $@ $< ${RCCHK_INCLUDEDIR} ${DFLAGS}
clean	:
	rm -f $(RCCHECK_OBJ) ${RCCHKNAME} *.log *.pid *.core
