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