
libdir=/sas/lib
includedir=../../include
installdir=/sas/bin

INCLUDES =-I$(includedir) -I$(includedir)/apr-linux -I$(includedir)/mmslite  -I$(includedir)/ora_inst_inc

D_X86_OR_PPC=

D_MMS_DEFS= -DMMS_LITE -DMOSI -DLEAN_T -DTP0_ENABLED
AM_CFLAGS =-DCLIENT -pthread -O2 -ggdb -D_DEBUG -Wall -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE $(D_X86_OR_PPC) $(D_MMS_DEFS)

bin_PROGRAMS = pt61850netd

pt61850netd_SOURCES = \
		main.c \
		clntobj.c \
		event2.c \
		logcfgx.c \
		mms_process.c  \
		mmscli_rpt.c \
		mmsclient.c \
		mmslvar.c \
		mmsop_en.c \
		mvl_acse.c \
		mvlop_en.c \
		parse_xml.c \
		rdb_client.c \
		rdb_ext_utils.c \
		reject.c \
		utf8_to_gb.c \
		gb_to_utf8.c  \
		mmscli_log.c   \
		save2db.cpp	   \
		myftp.cpp		\
		ftp.cpp			\
		csv_parser.cpp 
		

DFLAG =_n
LIBDIR =$(libdir)/mmslite

LIBS = \
	$(LIBDIR)/ositcps$(DFLAG).a \
	$(LIBDIR)/mvl$(DFLAG).a \
	$(LIBDIR)/mmsle$(DFLAG).a \
	$(LIBDIR)/mmsl$(DFLAG).a \
	$(LIBDIR)/asn1l$(DFLAG).a \
	$(LIBDIR)/mem$(DFLAG).a \
	$(LIBDIR)/slog$(DFLAG).a \
	$(LIBDIR)/util$(DFLAG).a \
	$(LIBDIR)/ssec0$(DFLAG).a 
	
pt61850netd_LDADD= $(libdir)/libjinf.a
	
pt61850netd_LDFLAGS =-L$(libdir) -lapr-1 -lrt -lcrypt -lpthread -ldl -laprutil-1   -lexpat -ljclite -ljcc -ljcsct -ljcutil -ljcfdb -ljcidb -locci -lclntsh -lnnz12 -lociei $(LIBS)
