Source

oclegacy / Makefile.bor

Full commit
# $Id: Makefile.bor,v 0.6 2005/09/20 13:47:00 ddrp Exp $
#
# Copyright (C) 2001-2004 Daybo Logic.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. Neither the name of the project nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# OverChat master build for for source tree
# Maintainer: DDRP <daybologic.co.uk/mailddrp>
# Please report problems with _FULL_ output, using the script utility

!include MasterMake.bor

# If we don't even know our own filename, print the message in
# configure/not_configured.txt
# Printing nop just means we're safe!

!ifndef THISFILE
NONSENSE_COMMAND=type configure/not_configured.txt
!else
NONSENSE_COMMAND=echo "nop"
!endif

!ifdef DEBUG
DPCRTLMM_OPTIONS=--disable-threads --enable-debug --enable-log --maxport
RTTB_OPTIONS=--enable-debug
!else
DPCRTLMM_OPTIONS=--disable-threads --disable-debug --disable-log --maxport
RTTB_OPTIONS=--disable-debug
!endif

ERASE=perl ../shared/scripts/erase.pl

# Master build rule
all : depend basictools blake_lib overchat cgi _clients _supdae advtools _testbed
	cd buildtimer
	$(TMAKE) -f $(THISFILE) stop
	cd ..
	@echo Build complete.  You may want to run a make test

depend:
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 1                                       "
	@echo "  Generate autodependencies                     "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.

	cd blake
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd buildtimer
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd c2raw
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd cgi-bin
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd clients
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd committee
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd configure
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd db2fix
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd mailall
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd NetBuffer
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd occdtk
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd ocquery
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd raw2c
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd src
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd testbed
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd tools
	$(TMAKE) -f $(THISFILE) depend
	cd ..

	cd watchproc
	$(TMAKE) -f $(THISFILE) depend
	cd ..

basictools:
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 2                                       "
	@echo "  Essential tools                               "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd buildtimer
	$(TMAKE) -f $(THISFILE) start
	cd ..

	cd raw2c
	$(TMAKE) -f $(THISFILE) all
	cd ..

	cd watchproc
	$(TMAKE) -f $(THISFILE) all
	cd ..

blake_lib : blake$(LIB)

blake$(LIB):
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 3                                       "
	@echo "  Blake                                         "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd blake
	$(TMAKE) -f $(THISFILE)
	cd ..

overchat : overchatd

overchatd : src/$(THISFILE) src/*$(H) src/*$(C)
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 4                                       "
	@echo "  The OverChat server                           "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd src
	$(TMAKE) -f $(THISFILE)
	cd ..

test:
	cd testbed
	$(TMAKE) -f $(THISFILE) run
	cd ..

distclean : clean
	cd configure
	$(TMAKE) -f $(THISFILE) clean
	cd ..

clean : testbed_clean advtools_clean supdae_clean clients_clean cgi_clean overchat_clean blake_lib_clean basictools_clean
	-$(ERASE) core overchatd.core

overchat_clean:
	cd src
	$(TMAKE) -f $(THISFILE) clean
	cd ..

blake_lib_clean:
	cd blake
	$(TMAKE) -f $(THISFILE) clean
	cd ..

dlini_lib_clean:
	cd dlini
	$(TMAKE) -f $(THISFILE) clean
	cd ..

basictools_clean:

	cd raw2c
	$(TMAKE) -f $(THISFILE) clean
	cd ..

	cd buildtimer
	$(TMAKE) -f $(THISFILE) clean
	cd ..

	cd watchproc
	$(TMAKE) -f $(THISFILE) clean
	cd ..

cgi:
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 5                                       "
	@echo "  Common Gateway Interface modules              "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd cgi-bin
	$(TMAKE) -f $(THISFILE) all
	cd ..

cgi_clean:
	cd cgi-bin
	$(TMAKE) -f $(THISFILE) clean
	cd ..

_clients:
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 6                                       "
	@echo "  Basic service clients                         "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd clients
	$(TMAKE) -f $(THISFILE) all
	cd ..

clients_clean:
	cd clients
	$(TMAKE) -f $(THISFILE) clean
	cd ..

_supdae:
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 7                                       "
	@echo "  Supplementry daemons                          "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd ocquery
	$(TMAKE) -f $(THISFILE) all
	cd ..

supdae_clean:
	cd ocquery
	$(TMAKE) -f $(THISFILE) clean
	cd ..


advtools:
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 8                                       "
	@echo "  Supplementry tools                            "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd db2fix
	$(TMAKE) -f $(THISFILE) all
	cd ..

	cd tools
	$(TMAKE) -f $(THISFILE) all
	cd ..

	cd mailall
	$(TMAKE) -f $(THISFILE) all
	cd ..

advtools_clean:
	cd db2fix
	$(TMAKE) -f $(THISFILE) clean
	cd ..

	cd tools
	$(TMAKE) -f $(THISFILE) clean
	cd ..

	cd mailall
	$(TMAKE) -f $(THISFILE) clean
	cd ..

_testbed:
	@echo "------------------------------------------------"
	@echo "                                                "
	@echo "  Stage 9                                       "
	@echo "  The testbed                                   "
	@echo "                                                "
	@echo "------------------------------------------------"
	@echo.
	cd testbed
	$(TMAKE) -f $(THISFILE) all
	cd ..

testbed_clean:
	cd testbed
	$(TMAKE) -f $(THISFILE) clean
	cd ..