Makefile

changeset 2
cee3e65e789c
child 5
dbc01588686e
equal deleted inserted replaced
1:3c066d52342d 2:cee3e65e789c
1 #
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 #
4 # Copyright 2011 Olaf Wintermann. All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met:
8 #
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 #
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 # POSSIBILITY OF SUCH DAMAGE.
27 #
28
29 include conf.mk
30
31 all:
32 @echo "build server"
33 cd src; $(MAKE) all
34
35 clean:
36 @echo "clean"
37 rm -f -R build
38 rm -f -R work
39
40 install: all
41 @echo "install Webserver to $(WS_INSTALL_DIR)"
42 mkdir -p $(WS_INSTALL_DIR)bin
43 mkdir -p $(WS_INSTALL_DIR)lib
44 mkdir -p $(WS_INSTALL_DIR)conf
45 mkdir -p $(WS_INSTALL_DIR)include
46 @echo "copy config"
47 cp templates/conf/init.conf $(WS_INSTALL_DIR)conf/init.conf
48 cp templates/conf/obj.conf $(WS_INSTALL_DIR)conf/obj.conf
49 cp templates/conf/server.conf $(WS_INSTALL_DIR)conf/server.conf
50 @echo "copy binaries"
51 mv work/bin/webservd work/bin/webservd.bin
52 cp work/bin/webservd.bin $(WS_INSTALL_DIR)bin/webservd
53 rm work/bin/webservd.bin
54 @echo "copy includes"
55 cp src/server/nsapi.h $(WS_INSTALL_DIR)include/nsapi.h
56 @echo "copy scripts"
57 sed s:%%WS_INSTALL_DIR%%:$(WS_INSTALL_DIR):g templates/bin/startserv.template > $(WS_INSTALL_DIR)bin/startserv
58 chmod +x $(WS_INSTALL_DIR)bin/startserv
59
60

mercurial