-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.tmpl
60 lines (47 loc) · 1.38 KB
/
Makefile.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
# Makefile.tmpl for the mod_fastcgi module
#
# Apache v1.3's Configure uses this to create a Makefile
#
# $Id: Makefile.tmpl,v 1.6 2000/08/16 01:51:47 robs Exp $
LIB=libfastcgi.$(LIBEXT)
OBJS=mod_fastcgi.o fcgi_buf.o fcgi_pm.o fcgi_protocol.o fcgi_config.o fcgi_util.o
# Build commands
all: lib
lib: $(LIB)
libfastcgi.a: $(OBJS)
rm -f $@
ar cr $@ $(OBJS)
$(RANLIB) $@
libfastcgi.so: $(OBJS)
rm -f $@
$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS)
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $<
clean:
rm -f $(LIB) $(OBJS)
distclean: clean
rm -f Makefile
# NOT FOR END USERS!
depend:
cp Makefile.tmpl Makefile.tmpl.bak \
&& sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
&& gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
&& sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
> Makefile.tmpl \
&& rm Makefile.new
# Dependencies
$(OBJS): fcgi.h \
mod_fastcgi.h \
fcgi_protocol.h \
$(INCDIR)/httpd.h \
$(INCDIR)/http_config.h \
$(INCDIR)/http_request.h \
$(INCDIR)/http_core.h \
$(INCDIR)/http_protocol.h \
$(INCDIR)/http_main.h \
$(INCDIR)/http_log.h \
$(INCDIR)/util_script.h \
$(INCDIR)/http_conf_globals.h \
$(INCDIR)/util_md5.h