TEMPLATE = app
TARGET = pt61850netd_pqfe
DEPENDPATH += .

INCLUDEPATH += .    ./source/include  ./source/include/mmslite ./source/include/pg_inst ./source/include/curl ./source/include/oss_sdk ./source/include/roketmq 


QMAKE_ORIG_TARGET = $(TARGET)

QT          	+= core xml network
CONFIG  += thread 

DEFINES += _CRT_SECURE_NO_WARNINGS
DEFINES +=   MMS_LITE  LINUX=2 MOSI  LEAN_T  TP0_ENABLED 
DEFINES +=  CLIENT  _DEBUG   _REENTRANT  _GNU_SOURCE  _LARGEFILE64_SOURCE 

win32 {
    DEFINES -= UNICODE
    DEFINES += _AFXDLL
    CONFIG += console
}

win32 {  
 #   RC_FILE=pt61850netd_pqfe.rc
	SOURCES += source/mms/event.c 
	INCLUDEPATH += ./source/include/apr
	QMAKE_LFLAGS      += /NODEFAULTLIB:libcmt.lib 
	 LIBS		+= -L./lib -L./lib/mmslite  -lws2_32 
    CONFIG(debug, debug|release) {
      DEFINES += DEBUG_SISCO 
      MMS_LIB_SUFFIX = _ld.lib
		  QMAKE_POST_LINK = $$QMAKE_COPY debug\\*.exe ..\\..\\usr_bin\\jspqfe_home\\bin  
    }
    else{
      MMS_LIB_SUFFIX = _n.lib
			QMAKE_POST_LINK = $$QMAKE_COPY release\\*.exe  ..\\..\\usr_bin\\jspqfe_home\\bin 
    }    
 	LIBS		+= ositcps$$MMS_LIB_SUFFIX \
				 mvl$$MMS_LIB_SUFFIX \
				 mmsle$$MMS_LIB_SUFFIX \
				 mmsl$$MMS_LIB_SUFFIX \
				 asn1$$MMS_LIB_SUFFIX \
				 mem$$MMS_LIB_SUFFIX \
				 meml$$MMS_LIB_SUFFIX \
				 slog$$MMS_LIB_SUFFIX \
				 utility$$MMS_LIB_SUFFIX \
				 ssec0$$MMS_LIB_SUFFIX	
	LIBS	+=  -llibapr-1 -llibaprutil-1 -llibjclite    
}

unix {
	include(fe_common.pri)
	SOURCES += source/mms/event2.c   
	INCLUDEPATH += ./source/include/apr-linux
	LIBS		+= -L/FeProject/lib
	LIBS		+= -L/FeProject/lib/pgodbc
	DEFINES += DEBUG_SISCO
	VERSION = 1.0.0
 	
    CONFIG(debug, debug|release) {
		 
    } else {
		 
    }
    LIBS    +=  -lrt -lpthread   
    MMS_LIB_SUFFIX = _ld.a
 	LIBS		+= /FeProject/lib/mmslite/ositcps$$MMS_LIB_SUFFIX \
				 /FeProject/lib/mmslite/mvl$$MMS_LIB_SUFFIX \
				 /FeProject/lib/mmslite/mmsle$$MMS_LIB_SUFFIX \
				 /FeProject/lib/mmslite/mmsl$$MMS_LIB_SUFFIX \
				 /FeProject/lib/mmslite/asn1l$$MMS_LIB_SUFFIX \
				 /FeProject/lib/mmslite/mem$$MMS_LIB_SUFFIX \
				 /FeProject/lib/mmslite/slog$$MMS_LIB_SUFFIX \
				 /FeProject/lib/mmslite/util$$MMS_LIB_SUFFIX   \
				 /FeProject/lib/mmslite/ssec0$$MMS_LIB_SUFFIX \
				 /FeProject/lib/pgodbc/psqlodbc.so	\
				 /FeProject/lib/libcurl.so	\
				 /FeProject/lib/liboss_c_sdk.so.3.0.0	\
				 /FeProject/lib/libmxml.so	\
				 /FeProject/lib/librocketmq.so \
				 /FeProject/lib/libhttprun.so
   LIBS	+=  -lapr-1 -laprutil-1 -ljclite  
   LIBS +=  -lrdkafka++
   LIBS +=  -lhttprun	
}

#install
{
      target.path = ../../bin
      INSTALLS += target
}

# Input
 	  
HEADERS += source/mms/db_interface.h \
						source/include/otlv4.h \
						source/mms/mmsclient.h \
						source/mms/mmsop_en.h \
						source/mms/rdb_client.h \
						source/mms/ver_conf.h \
#						source/misc/csv_parser.h \
#				    source/misc/ftp.h		\
#				    source/misc/gb_to_utf8.h \
#				    source/misc/utf8_to_gb.h \
				    source/misc/SM4.h	\ 
				    source/json/save2json.h  \
					source/json/mms_json_inter.h \
					source/json/rdkafka.h   \
					source/json/rdkafkacpp.h \ 
					source/json/kafka_producer.h	\ 
					source/json/cjson.h	\
					source/include/rocketmq/SimpleProducer.h \
					source/cfg_parse/custom_printf.h
SOURCES += source/mms/main.c \
						source/mms/clntobj.c \ 
						source/mms/logcfgx.c \
						source/mms/mms_process.c  \
						source/mms/mmscli_rpt.c \
						source/mms/mmsclient.c \
						source/mms/mmslvar.c \
						source/mms/mmsop_en.c \
						source/mms/mvl_acse.c \
						source/mms/mvlop_en.c \
						source/mms/parse_xml.c \
						source/mms/rdb_client.c \
						source/mms/rdb_ext_utils.c \
						source/mms/reject.c \ 
						source/mms/mmscli_log.c   \		
#						source/mms/myftp.cpp \ 
#						source/misc/csv_parser.cpp \
#						source/misc/ftp.cpp		\
#						source/misc/gb_to_utf8.c \
#				    source/misc/utf8_to_gb.c  \ 
				    source/misc/SM4.cpp  \  
				    source/misc/my_encrypt.cpp  \ 
				    source/json/save2json.cpp \
					source/cfg_parse/cfg_parser.cpp  \
					source/json/kafka_producer.cpp 	\
					source/json/create_json.cpp		\
					source/json/cjson.c	\
					source/cfg_parse/oss_aliyun.cpp \
					source/cfg_parse/obs_huaweiyun.cpp \
					source/cfg_parse/datahub.cpp  \
					source/cfg_parse/nacos.cpp  \
					source/cfg_parse/base64.cpp  \
					source/cfg_parse/uds_huaweiyun.cpp \
					source/cfg_parse/SimpleProducer.cpp
