Source

oclegacy / MasterMake.gnu

#
# Master make file.  This makefile is included by all other makefiles
# so anything defined here affects _all_ makefiles, master makefile,
# source makefiles and individual target headers, except certain libs
# which are maintained independently of OverChat.
#
# This header is intended to be built with GNU make.
#
# OverChat
# (C)Copyright 2001-2002 Daybo Logic, all rights reserved.
#

# CC is the C compiler, it is set by default to cc, if you want to use
# gcc or something else, uncomment and edit the line below.
#CC=gcc

# The make utility the build process uses _matters_.  BSD's make won't
# suffice.  GNU make is what I use.  I'll point to gmake everywhere in
# the tree if it matters.  If you want to point to another make program
# change the line below.  Don't remove the line below.
TMAKE=gmake

# Debugging.  If you want debugging on the entire build, make sure
# that DEBUG is defined, otherwise comment it out.
#DEBUG=1

# If you want to use the new binary databases (R2) on the server and ocquery
# you need to uncomment this line.
BLAKEDB_R2=1

# This specifies the default name of the makefile, don't remove it,
# it's not optional.
THISFILE=Makefile.gnu

# This command lists the files in a directory, line by line
# we had problems with ls -l1 and now use ls -1, perhaps we will make our
# own tools if ls gives us any more problems.
DIR=ls -1

# The very strict ruleset applied to certain files.  If the build is broken
# you might try altering this.
ANSI=-ansi -pedantic -Wall

# Default flags
# CFLAGS specifies the default flags given to the compiler, they should
# not conflict with specific overrides given by lower level makefiles.
# The ruleset is very basic and you shouldn't need to mess with it.
# LFLAGS specifies the default flags given to the linker when creating
# executable programs.  Again, nothing here must conflict with lower
# level makefiles or things will get broken.  All lower level Makefiles
# should specify their CFLAGS like this:
# CFLAGS=$(MASTER_CFLAGS) -pipe (or whatever)

ifdef DEBUG

MASTER_CFLAGS=-D__UNIX__ -g -c
MASTER_LFLAGS=-g

else

MASTER_CFLAGS=-DNDEBUG -D__UNIX__ -O3 -c
MASTER_LFLAGS=

endif

#
# Filenme extensions section
# This deals with differently named files on different systems,
# for example Borland uses obj and UNIX uses o for object.
# EXE file sometimes have an extension, sometimes not.
# For all new makefiles please use these macros.
#

LIB=.a
O=.o
EXE=
C=.c
CPP=.cpp
H=.h

# Legacy database support.  Use the macro DB in the compiler flags of any
# module which needs access to the user database.
ifdef BLAKEDB_R2
DB=-DBLAKEDB_R2=1
else
DB=
endif