OS:=$(shell uname -s)
ifeq ($(OS),Darwin)
	MACOS_LD_FLAGS=-lintl
	MACOS_LD_NET_FLAGS=-framework SystemConfiguration -framework CoreFoundation
	MACOS_CFLAGS=-arch $(shell uname -m)
endif

CGI_DIR=@CGI_DIR@

YAML_CFLAGS=@YAML_CPPFLAGS@
YAML_LDFLAGS=@YAML_LDFLAGS@
YAML_FILE=@YAML_FILE@
YAML_FILE1=@YAML_FILE1@

GDAL_CFLAGS=@GDAL_CFLAGS@
GDAL_LIBS=@GDAL_LIBS@

XML2CFLAGS=@XML2_CPPFLAGS@
XML2LDFLAGS=@XML2_LDFLAGS@

XSLT_CFLAGS=@XSLT_CPPFLAGS@
XSLT_LDFLAGS=@XSLT_LDFLAGS@

GEOS_CFLAGS=@GEOS_CPPFLAGS@
GEOS_LDFLAGS=@GEOS_LDFLAGS@

CGAL_CFLAGS=@CGAL_CPPFLAGS@
CGAL_LDFLAGS=@CGAL_LDFLAGS@

PYTHONCFLAGS=@PYTHON_CPPFLAGS@
PYTHONLDFLAGS=@PYTHON_LDFLAGS@
PYTHON_ENABLED=@PYTHON_ENABLED@
PYTHON_FILE=@PYTHON_FILE@

RUBYCFLAGS=@RUBY_CPPFLAGS@
RUBYLDFLAGS=@RUBY_LDFLAGS@
RUBY_ENABLED=@RUBY_ENABLED@
RUBY_FILE=@RUBY_FILE@

JS_ENABLED=@JS_ENABLED@
JSCFLAGS=@JS_CPPFLAGS@
JSLDFLAGS=@JS_LDFLAGS@
JS_FILE=@JS_FILE@
ifeq ($(JS_ENABLED),-DUSE_JS)
     JS_LDFLAGS=${ZRPATH}/zoo-kernel/ulinet.o ${ZRPATH}/zoo-kernel/service_internal_js.o -lcurl 
endif

MS_CFLAGS=@MS_CFLAGS@
MS_LDFLAGS=@MS_LIBS@
MS_FILE=@MS_FILE@

ZOO_CFLAGS=-I${ZRPATH}/../thirds/cgic206/ -I${ZRPATH}/zoo-kernel/
ZOO_LDFLAGS=-lcrypto

JAVACFLAGS=@JAVA_CPPFLAGS@
JAVALDFLAGS=@JAVA_LDFLAGS@
JAVA_ENABLED=@JAVA_ENABLED@
JAVA_FILE=@JAVA_FILE@

CFLAGS=@DEB_DEF@ -fpic ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
LDFLAGS=-lcurl -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lfcgi -lcrypto ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${YAML_LDFLAGS} 

PHPCFLAGS=@PHP_CPPFLAGS@
PHPLDFLAGS=@PHP_LDFLAGS@
PHP_ENABLED=@PHP_ENABLED@
PHP_FILE=@PHP_FILE@


PERLCFLAGS=@PERL_CPPFLAGS@
PERLLDFLAGS=@PERL_LDFLAGS@
PERL_ENABLED=@PERL_ENABLED@
PERL_FILE=@PERL_FILE@
