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