Makefile

changeset 40
56cda23f48d4
parent 39
de4bc3cd2d36
child 45
a24aa388f02f
equal deleted inserted replaced
39:de4bc3cd2d36 40:56cda23f48d4
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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 25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 # POSSIBILITY OF SUCH DAMAGE. 26 # POSSIBILITY OF SUCH DAMAGE.
27 # 27 #
28 28
29 include conf.mk 29 all: config.mk
30
31 all:
32 @echo "build server" 30 @echo "build server"
33 cd src; $(MAKE) all 31 cd src; $(MAKE) all
32
33 config.mk:
34 @echo "create config"
35 ./configure
34 36
35 clean: 37 clean:
36 @echo "clean" 38 @echo "clean"
37 rm -f -R build 39 rm -f -R build
38 rm -f -R work 40 rm -f -R work
39 41
40 install: all 42 install:
41 @echo "install Webserver to $(WS_INSTALL_DIR)" 43 cd make; $(MAKE) -f install.mk install
42 mkdir -p $(WS_INSTALL_DIR)bin
43 mkdir -p $(WS_INSTALL_DIR)lib
44 mkdir -p $(WS_INSTALL_DIR)config
45 mkdir -p $(WS_INSTALL_DIR)docs
46 mkdir -p $(WS_INSTALL_DIR)logs
47 mkdir -p $(WS_INSTALL_DIR)include
48 @echo "copy config"
49 cp templates/config/init.conf $(WS_INSTALL_DIR)config/init.conf
50 cp templates/config/obj.conf $(WS_INSTALL_DIR)config/obj.conf
51 cp templates/config/server.conf $(WS_INSTALL_DIR)config/server.conf
52 cp templates/config/mime.types $(WS_INSTALL_DIR)config/mime.types
53 @echo "copy binaries"
54 mv work/bin/webservd work/bin/webservd.bin
55 cp work/bin/webservd.bin $(WS_INSTALL_DIR)bin/webservd
56 rm work/bin/webservd.bin
57 @echo "copy includes"
58 cp src/server/public/nsapi.h $(WS_INSTALL_DIR)include/nsapi.h
59 @echo "copy scripts"
60 sed s:%%WS_INSTALL_DIR%%:$(WS_INSTALL_DIR):g templates/bin/startserv.template > $(WS_INSTALL_DIR)bin/startserv
61 chmod +x $(WS_INSTALL_DIR)bin/startserv
62 sed s:%%WS_INSTALL_DIR%%:$(WS_INSTALL_DIR):g templates/bin/stopserv.template > $(WS_INSTALL_DIR)bin/stopserv
63 chmod -x $(WS_INSTALL_DIR)bin/stopserv
64 sed s:%%WS_INSTALL_DIR%%:$(WS_INSTALL_DIR):g templates/bin/reconfig.template > $(WS_INSTALL_DIR)bin/reconfig
65 chmod -x $(WS_INSTALL_DIR)bin/reconfig
66 @echo "copy docs"
67 cp -R templates/docs $(WS_INSTALL_DIR)
68
69 44

mercurial