[459] | 1 | include ZOOMakefile.opts |
---|
| 2 | |
---|
[77] | 3 | OS:=$(shell uname -s) |
---|
| 4 | ifeq ($(OS),Darwin) |
---|
| 5 | MACOS_LD_FLAGS=-lintl -framework SystemConfiguration -framework CoreFoundation |
---|
[284] | 6 | MACOS_CFLAGS=-arch $(shell uname -m) |
---|
[77] | 7 | endif |
---|
| 8 | |
---|
[1] | 9 | JAVACFLAGS=@JAVA_CPPFLAGS@ |
---|
| 10 | JAVALDFLAGS=@JAVA_LDFLAGS@ |
---|
[31] | 11 | JAVA_ENABLED=@JAVA_ENABLED@ |
---|
| 12 | JAVA_FILE=@JAVA_FILE@ |
---|
| 13 | |
---|
[549] | 14 | CFLAGS=@DEB_DEF@ -fpic ${GLIB_CPPFLAGS} ${YAML_CFLAGS} ${MACOS_CFLAGS} ${MS_CFLAGS} -I../../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF |
---|
[617] | 15 | LDFLAGS= -lcurl -L../../thirds/cgic206 -lcgic ${GDAL_LIBS} ${XML2LDFLAGS} ${GLIB_LDFLAGS} ${RABBITMQ_LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS} ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lfcgi -lcrypto ${MS_LDFLAGS} ${MACOS_LD_FLAGS} ${YAML_LDFLAGS} ${JSON_LDFLAGS} ${MYSQL_LDFLAGS} |
---|
[297] | 16 | |
---|
[1] | 17 | PHPCFLAGS=@PHP_CPPFLAGS@ |
---|
| 18 | PHPLDFLAGS=@PHP_LDFLAGS@ |
---|
[31] | 19 | PHP_ENABLED=@PHP_ENABLED@ |
---|
| 20 | PHP_FILE=@PHP_FILE@ |
---|
| 21 | |
---|
| 22 | |
---|
[16] | 23 | PERLCFLAGS=@PERL_CPPFLAGS@ |
---|
| 24 | PERLLDFLAGS=@PERL_LDFLAGS@ |
---|
| 25 | PERL_ENABLED=@PERL_ENABLED@ |
---|
| 26 | PERL_FILE=@PERL_FILE@ |
---|
[1] | 27 | |
---|
[617] | 28 | JSON_LDFLAGS=@JSON_LDFLAGS@ |
---|
| 29 | JSON_CPPFLAGS=@JSON_CPPFLAGS@ |
---|
[16] | 30 | |
---|
[617] | 31 | RABBITMQ_LDFLAGS=@RABBITMQ_LDFLAGS@ |
---|
| 32 | RABBITMQ_CPPFLAGS=@RABBITMQ_CPPFLAGS@ |
---|
| 33 | |
---|
| 34 | MYSQL_LDFLAGS=@MYSQL_LDFLAGS@ |
---|
| 35 | MYSQL_CPPFLAGS=@MYSQL_CPPFLAGS@ |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | |
---|
[465] | 39 | all: version.h zoo_loader.cgi ${YAML_FILE1} |
---|
[1] | 40 | |
---|
[465] | 41 | version.h: |
---|
[466] | 42 | echo "#define ZOO_VERSION \"`svnversion`\"" > version.h |
---|
[465] | 43 | |
---|
[1] | 44 | main_conf_read.tab.c: main_conf_read.y service.h |
---|
| 45 | bison -p cr -d main_conf_read.y |
---|
| 46 | |
---|
| 47 | main_conf_read.tab.o: main_conf_read.tab.c service.h |
---|
| 48 | g++ ${CFLAGS} -c main_conf_read.tab.c |
---|
| 49 | |
---|
| 50 | lex.cr.c: main_conf_read.y main_conf_read.l main_conf_read.tab.c service.h |
---|
| 51 | flex -P cr --header-file main_conf_read.l |
---|
| 52 | |
---|
| 53 | lex.cr.o: lex.cr.c service.h |
---|
| 54 | g++ ${CFLAGS} -c lex.cr.c |
---|
| 55 | |
---|
| 56 | service_conf.tab.c: service_conf.y service.h |
---|
| 57 | bison -p sr -d service_conf.y |
---|
| 58 | |
---|
| 59 | service_conf.tab.o: service_conf.tab.c service.h |
---|
| 60 | g++ ${CFLAGS} -c service_conf.tab.c |
---|
| 61 | |
---|
| 62 | lex.sr.c: service_conf.y service_conf.l service_conf.tab.c service.h |
---|
| 63 | flex -P sr --header-file service_conf.l |
---|
| 64 | |
---|
| 65 | lex.sr.o: lex.sr.c service.h |
---|
| 66 | g++ ${CFLAGS} -c lex.sr.c |
---|
| 67 | |
---|
| 68 | ulinet.o: ulinet.c |
---|
[408] | 69 | gcc -fPIC ${XML2CFLAGS} ${CFLAGS} ${JSCFLAGS} ${JS_ENABLED} -c ulinet.c |
---|
[1] | 70 | |
---|
[549] | 71 | service_zcfg.o: service_zcfg.c service.h |
---|
| 72 | g++ ${GLIB_CPPFLAGS} ${XML2CFLAGS} -c service_zcfg.c |
---|
[512] | 73 | |
---|
[617] | 74 | zoo_json.o: zoo_json.c service.h |
---|
| 75 | g++ ${JSON_CPPFLAGS} ${XML2CFLAGS} -c zoo_json.c |
---|
| 76 | |
---|
| 77 | zoo_amqp.o: zoo_amqp.c |
---|
| 78 | g++ ${CFLAGS} -c zoo_amqp.c |
---|
| 79 | |
---|
| 80 | zoo_sql.o: zoo_sql.c |
---|
| 81 | g++ ${MYSQL_CPPFLAGS} -c zoo_sql.c |
---|
| 82 | |
---|
| 83 | |
---|
[1] | 84 | service_internal.o: service_internal.c service.h |
---|
[482] | 85 | g++ ${GDAL_CFLAGS} ${JS_ENABLED} ${JSCFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_internal.c |
---|
[1] | 86 | |
---|
[465] | 87 | service_yaml.o: service_yaml.c service.h |
---|
| 88 | gcc ${YAML_CFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_yaml.c |
---|
| 89 | |
---|
[297] | 90 | service_internal_ms.o: service_internal_ms.c |
---|
| 91 | gcc ${JS_ENABLED} ${JSCFLAGS} ${XML2CFLAGS} ${CFLAGS} -fPIC -c service_internal_ms.c |
---|
| 92 | |
---|
[1] | 93 | service_internal_python.o: service_internal_python.c service.h |
---|
| 94 | g++ ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c service_internal_python.c |
---|
| 95 | |
---|
| 96 | service_internal_php.o: service_internal_php.c service.h |
---|
| 97 | g++ -c ${XML2CFLAGS} ${PHPCFLAGS} ${CFLAGS} ${PHP_ENABLED} service_internal_php.c |
---|
| 98 | |
---|
[16] | 99 | service_internal_perl.o: service_internal_perl.c service.h |
---|
| 100 | gcc -c ${XML2CFLAGS} ${PERLCFLAGS} ${CFLAGS} ${PERL_ENABLED} service_internal_perl.c |
---|
| 101 | |
---|
[1] | 102 | service_internal_java.o: service_internal_java.c service.h |
---|
| 103 | gcc -c ${XML2CFLAGS} ${JAVACFLAGS} ${CFLAGS} ${JAVA_ENABLED} service_internal_java.c |
---|
| 104 | |
---|
| 105 | service_internal_js.o: service_internal_js.c service_internal_js.h |
---|
[487] | 106 | gcc -fPIC ${XML2CFLAGS} ${JSCFLAGS} ${CFLAGS} ${JS_ENABLED} -c service_internal_js.c |
---|
[1] | 107 | |
---|
[459] | 108 | service_internal_ruby.o: service_internal_ruby.c service_internal_ruby.h |
---|
| 109 | g++ ${XML2CFLAGS} ${RUBYCFLAGS} ${CFLAGS} ${JSCFLAGS} ${JS_ENABLED} -c service_internal_ruby.c |
---|
[1] | 110 | |
---|
| 111 | service_loader.o: service_loader.c service.h |
---|
| 112 | g++ -c ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} service_loader.c |
---|
| 113 | |
---|
| 114 | zoo_service_loader.o: zoo_service_loader.c service.h |
---|
[617] | 115 | g++ -g -O2 ${XML2CFLAGS} ${CFLAGS} ${PYTHONCFLAGS} ${JAVACFLAGS} ${JSCFLAGS} ${PERLCFLAGS} ${PHPCFLAGS} ${PYTHON_ENABLED} ${JS_ENABLED} ${PHP_ENABLED} ${PERL_ENABLED} ${JAVA_ENABLED} ${JSON_CPPFLAGS} -c zoo_service_loader.c -fno-common -DPIC -o zoo_service_loader.o |
---|
[1] | 116 | |
---|
[617] | 117 | zoo_loader.cgi: version.h zoo_loader.c zoo_sql.o zoo_amqp.o zoo_json.o service_zcfg.o zoo_service_loader.o ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o service_internal.o ${MS_FILE} ${PYTHON_FILE} ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE} ${RUBY_FILE} ${YAML_FILE} |
---|
| 118 | g++ -g -O2 ${JSCFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${RUBYCFLAGS} ${JAVACFLAGS} ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} ${JSON_CPPFLAGS} -c zoo_loader.c -fno-common -DPIC -o zoo_loader.o |
---|
| 119 | g++ ${JSCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_sql.o zoo_amqp.o zoo_json.o zoo_loader.o service_zcfg.o zoo_service_loader.o service_internal.o ${MS_FILE} ${PYTHON_FILE} ${PERL_FILE} ${PHP_FILE} ${JS_FILE} ${JAVA_FILE} ${YAML_FILE} ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi ${LDFLAGS} |
---|
[1] | 120 | |
---|
[465] | 121 | zcfg2yaml: zcfg2yaml.c ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o service_internal.o ${MS_FILE} ${JS_FILE} ${RUBY_FILE} ${YAML_FILE} |
---|
| 122 | g++ -g -O2 ${JSCFLAGS} ${RUBYCFLAGS} ${XML2CFLAGS} ${CFLAGS} -c zcfg2yaml.c -fno-common -DPIC -o zcfg2yaml.o |
---|
| 123 | g++ ${JSCFLAGS} ${XML2CFLAGS} ${CFLAGS} zcfg2yaml.o service_internal.o ${MS_FILE} ${JS_FILE} ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o ${YAML_FILE} -o zcfg2yaml ${LDFLAGS} |
---|
| 124 | |
---|
[1] | 125 | install: |
---|
| 126 | @echo "##############################################################################" |
---|
| 127 | @echo "# This won't install anything !!! #" |
---|
| 128 | @echo "# #" |
---|
| 129 | @echo "# Please copy the zoo_loader.cgi and its companion main.cfg into your cgbin #" |
---|
| 130 | @echo "# directory. #" |
---|
| 131 | @echo "##############################################################################" |
---|
| 132 | |
---|
| 133 | clean: |
---|
[489] | 134 | rm -f version.h *.o *.zo *.eo *.tab.c *.tab.h *.sr.c* service_loader lex.* *.lreg *.sibling service_loader.dSYM |
---|