1 # Makefile.in for thttpd
3 # Copyright © 1995,1998 by Jef Poskanzer <jef@mail.acme.com>.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # 2. Redistributions in binary form must reproduce the above copyright
12 # notice, this list of conditions and the following disclaimer in the
13 # documentation and/or other materials provided with the distribution.
15 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 # Various configurable paths (remember to edit Makefile.in, not Makefile)
29 # Top level hierarchy.
31 exec_prefix = @
exec_prefix@
32 # Pathname of directory to install the binary.
34 # Pathname of directory to install the man page.
36 # Pathname of directory to install the CGI programs.
37 WEBDIR
= $(prefix)/www
39 # CONFIGURE: The group that the web directory belongs to. This is so that
40 # the makeweb program can be installed set-group-id to that group, and make
41 # subdirectories. If you're not going to use makeweb, ignore this.
44 # CONFIGURE: Directory for CGI executables.
45 CGIBINDIR
= $(WEBDIR
)/cgi-bin
47 # You shouldn't need to edit anything below here.
53 CFLAGS
= $(CCOPT
) $(DEFS
) $(INCLS
)
63 $(CC
) $(CFLAGS
) -c
$*.c
65 SRC
= thttpd.c libhttpd.c fdwatch.c mmc.c timers.c match.c tdate_parse.c
67 OBJ
= $(SRC
:.c
=.o
) @LIBOBJS@
71 GENHDR
= mime_encodings.h mime_types.h
73 CLEANFILES
= $(ALL
) $(OBJ
) $(GENSRC
) $(GENHDR
)
75 SUBDIRS
= cgi-src extras
82 $(CC
) $(CFLAGS
) $(LDFLAGS
) -o
$@
$(OBJ
) $(LIBS
) $(NETLIBS
)
84 mime_encodings.h
: mime_encodings.txt
85 rm -f mime_encodings.h
86 sed
< mime_encodings.txt
> mime_encodings.h \
87 -e
's/#.*//' -e
's/[ ]*$$//' -e
'/^$$/d' \
88 -e
's/[ ][ ]*/", 0, "/' -e
's/^/{ "/' -e
's/$$/", 0 },/'
90 mime_types.h
: mime_types.txt
92 sed
< mime_types.txt
> mime_types.h \
93 -e
's/#.*//' -e
's/[ ]*$$//' -e
'/^$$/d' \
94 -e
's/[ ][ ]*/", 0, "/' -e
's/^/{ "/' -e
's/$$/", 0 },/'
98 for i in
$(SUBDIRS
) ; do
( \
103 CGIBINDIR
=$(CGIBINDIR
) \
105 WEBGROUP
=$(WEBGROUP
) \
109 install: installthis install-man installsubdirs
112 -mkdir
-p
$(DESTDIR
)$(BINDIR
)
113 $(INSTALL
) -m
555 -o bin
-g bin thttpd
$(DESTDIR
)$(BINDIR
)
116 -mkdir
-p
$(DESTDIR
)$(MANDIR
)/man8
117 $(INSTALL
) -m
444 -o bin
-g bin thttpd
.8 $(DESTDIR
)$(MANDIR
)/man8
120 for i in
$(SUBDIRS
) ; do
( \
125 CGIBINDIR
=$(CGIBINDIR
) \
127 WEBGROUP
=$(WEBGROUP
) \
135 distclean: distcleansubdirs
136 rm -f
$(CLEANFILES
) Makefile config.cache config.log config.status
tags
139 for i in
$(SUBDIRS
) ; do
( \
142 $(MAKE
) $(MFLAGS
) clean \
146 for i in
$(SUBDIRS
) ; do
( \
149 $(MAKE
) $(MFLAGS
) distclean \
156 @name
=`sed -n -e '/SERVER_SOFTWARE/!d' -e 's,.*thttpd/,thttpd-,' -e 's, .*,,p' version.h` ; \
159 tar cf
- `cat FILES` |
( cd
$$name ; tar xfBp
- ) ; \
160 chmod
644 $$name/Makefile.in
$$name/config.h
$$name/mime_encodings.txt
$$name/mime_types.txt
; \
161 chmod
755 $$name/cgi-bin
$$name/cgi-src
$$name/contrib
$$name/contrib
/redhat-rpm
$$name/extras
$$name/scripts
; \
162 tar cf
$$name.
tar $$name ; \
166 thttpd.o
: config.h version.h libhttpd.h fdwatch.h mmc.h timers.h match.h
167 libhttpd.o
: config.h version.h libhttpd.h mime_encodings.h mime_types.h \
168 mmc.h timers.h match.h tdate_parse.h
170 mmc.o
: mmc.h libhttpd.h
173 tdate_parse.o
: tdate_parse.h