*) Add multithread support to the fcgiapp lib and an example multithreaded
[catagits/fcgi2.git] / examples / Makefile.in
1 #
2 #  Makefile for FastCGI examples directory
3 #
4 #  Open Market, Inc.
5 #
6 #  $Id: Makefile.in,v 1.2 1999/07/26 04:28:08 roberts Exp $
7 #
8
9 SHELL = @SHELL@
10 O =     @O@
11 L =     @L@
12 CC      = @CC@
13
14 INCLUDEDIR  = ../include
15 CFLAGS  = @CCDEFS@ @PROFILE@ -I$(INCLUDEDIR)
16 LIBS    = @LIBS@
17 RANLIB  = @RANLIB@
18
19 PERL_INSTALL = /usr/local/bin/perl5-fcgi
20 TCL_INSTALL  = /usr/local/bin/tcl7.4-fcgi
21
22 INCLUDES    = $(INCLUDEDIR)/fastcgi.h $(INCLUDEDIR)/fcgiapp.h \
23               $(INCLUDEDIR)/fcgimisc.h $(INCLUDEDIR)/fcgiappmisc.h \
24               $(INCLUDEDIR)/fcgi_stdio.h
25 LIBDIR      = ../libfcgi
26 LIBFCGI     = $(LIBDIR)/libfcgi.${L}
27 TARGETS     = tiny-cgi.cgi tiny-fcgi tiny-fcgi2 tiny-authorizer \
28               echo echo2 sample-store sockets echo.fcg perl tclsh \
29               SampleStore.state.0 SampleStore.state.1 log-dump threaded.fcg
30
31 all: $(TARGETS)
32
33 threaded.fcg: threaded.c $(INCLUDES)
34         $(CC) $(CFLAGS) -D_REENTRANT threaded.c -o threaded.fcg $(LIBFCGI) -lpthread
35
36 tiny-cgi.cgi: tiny-cgi.${O}
37         $(CC) $(CFLAGS) tiny-cgi.${O} -o tiny-cgi.cgi
38
39 tiny-fcgi: tiny-fcgi.${O} $(LIBFCGI)
40         $(CC) $(CFLAGS) tiny-fcgi.${O} -o tiny-fcgi $(LIBFCGI) $(LIBS)
41
42 tiny-fcgi2: tiny-fcgi2.${O} $(LIBFCGI)
43         $(CC) $(CFLAGS) tiny-fcgi2.${O} -o tiny-fcgi2 $(LIBFCGI) $(LIBS)
44
45 tiny-authorizer: tiny-authorizer.${O} $(LIBFCGI)
46         $(CC) $(CFLAGS) tiny-authorizer.${O} -o tiny-authorizer $(LIBFCGI) $(LIBS)
47
48 echo: echo.${O} $(LIBFCGI)
49         $(CC) $(CFLAGS) echo.${O} -o echo $(LIBFCGI) $(LIBS)
50
51 echo2: echo2.${O} $(LIBFCGI)
52         $(CC) $(CFLAGS) echo2.${O} -o echo2 $(LIBFCGI) $(LIBS)
53
54 sample-store: sample-store.${O} tclHash.${O} $(LIBFCGI)
55         $(CC) $(CFLAGS) sample-store.${O} tclHash.${O} -o sample-store $(LIBFCGI) $(LIBS)
56
57 log-dump: log-dump.${O} $(LIBFCGI)
58         $(CC) $(CFLAGS) log-dump.${O} -o log-dump $(LIBFCGI) $(LIBS)
59
60 sockets:
61         mkdir sockets
62
63 echo.fcg:
64         rm -f echo.fcg
65         ln -s echo echo.fcg
66
67 perl:
68         rm -f perl
69         ln -s $(PERL_INSTALL)/bin/perl perl
70
71 tclsh:
72         rm -f tclsh
73         ln -s $(TCL_INSTALL)/bin/tclsh7.4 tclsh
74
75 SampleStore.state.0:
76         mkdir SampleStore.state.0
77
78 SampleStore.state.1:
79         mkdir SampleStore.state.1
80
81 clean:
82         rm -rf sockets SampleStore.state.0 SampleStore.state.1
83         rm -f *.${L} *.${O} core.* errs *~ \#* TAGS *.E a.out $(TARGETS)
84
85 # ----------------------------------------------------------------------------
86
87 tiny-cgi.${O}: tiny-cgi.c $(INCLUDES)
88
89 tiny-fcgi.${O}: tiny-fcgi.c $(INCLUDES)
90
91 tiny-fcgi2.${O}: tiny-fcgi2.c $(INCLUDES)
92
93 tiny-authorizer.${O}: tiny-authorizer.c $(INCLUDES)
94
95 echo.${O}: echo.c $(INCLUDES)
96
97 echo2.${O}: echo2.c $(INCLUDES)
98
99 sample-store.${O}: sample-store.c $(INCLUDES)
100
101 tclHash.${O}: tclHash.c
102
103 log-dump.${O}: log-dump.c $(INCLUDES)