telegard/Makefile

168 lines
4.4 KiB
Makefile
Raw Normal View History

2000-11-17 16:33:00 -08:00
#---------------------------------------------------------------------------
# Makefile by Ryan C. Gordon (icculus@lokigames.com)
#---------------------------------------------------------------------------
# should be 386, mmx, 686, or other.
#
# 386 and 486 chips use "386"
# Pentiums, Celerons, PentiumMMX should use "mmx"
# PentiumPro, PII, PIII, K6, Cyrix686/MII, Athlon, etc. should use "686"
# PowerPC and other non-x86 chips should use "other"
cpu=686
# Are you debugging? Specify "true". Release binaries? "false".
debug=true
# want to see more verbose compiles? Set this to "true".
verbose=true
# You probably don't need to touch this one. This is the location of
# your copy of PPC386, if it's not in the path.
# Get this from http://www.freepascal.org/ ...
PPC386=ppc386
#---------------------------------------------------------------------------
# don't touch anything below this line.
2000-11-17 23:10:27 -08:00
# This are the names of the produced binaries.
2000-11-17 16:33:00 -08:00
MAINEXE=bbs
2000-11-17 23:10:27 -08:00
MINITERMEXE=miniterm
INITEXE=init
TPAGEEXE=tpage
IFLEXE=ifl
FINDITEXE=findit
T2TEXE=t2t
OBLITEXE=oblit
MTESTEXE=mtest
BBEXE=bb
CBBSEXE=cbbs
MABSEXE=mabs
COCONFIGEXE=coconfig
SPDATEEXE=spdate
2000-11-17 16:33:00 -08:00
ifeq ($(strip $(verbose)),true)
PPC386FLAGS += -vwnh
endif
ifeq ($(strip $(debug)),true)
BUILDDIR := $(cpu)/Debug
PPC386FLAGS += -g # include debug symbols.
PPC386FLAGS += -gc # generate checks for pointers.
PPC386FLAGS += -Ct # generate stack-checking code.
PPC386FLAGS += -Cr # generate range-checking code.
PPC386FLAGS += -Co # generate overflow-checking code.
PPC386FLAGS += -Ci # generate I/O-checking code.
else
BUILDDIR := $(cpu)/Release
PPC386FLAGS += -Xs # strip the binary.
PPC386FLAGS += -O2 # Level 2 optimizations.
PPC386FLAGS += -OG # Optimize for speed, not size.
2000-11-17 23:10:27 -08:00
PPC386FLAGS += -XD # Dynamic linkage.
PPC386FLAGS += -CX # Smartlink the binary, removing unused code.
2000-11-17 16:33:00 -08:00
ifeq ($(strip $(cpu)),386)
PPC386FLAGS += -OP1
else
ifeq ($(strip $(cpu)),mmx)
PPC386FLAGS += -OP2
else
ifeq ($(strip $(cpu)),686)
PPC386FLAGS += -OP3
endif
endif
endif
endif
2000-11-17 23:10:27 -08:00
# Borland TP7.0 compatibility flag.
PPC386FLAGS += -B
2000-11-17 16:33:00 -08:00
# Borland TP7.0 compatibility flag.
PPC386FLAGS += -So
2000-11-17 23:10:27 -08:00
# Allow LABEL and GOTO. STRIVE TO REMOVE THIS COMMAND LINE PARAMETER!
PPC386FLAGS += -Sg
2000-11-17 16:33:00 -08:00
# Support C-style macros.
#PPC386FLAGS += -Sm
# Assembly statements are Intel-like (instead of AT&T-like).
PPC386FLAGS += -Rintel
# Output target Linux. !!! FIXME: Want win32 compiles?
PPC386FLAGS += -TLINUX
# Pipe output to assembler, rather than to temp file. This is a little faster.
2000-11-17 23:10:27 -08:00
#PPC386FLAGS += -P
2000-11-17 16:33:00 -08:00
# Write bins to this directory...
PPC386FLAGS += -FE$(BUILDDIR)
#---------------------------------------------------------------------------
# Build rules...don't touch this, either.
2000-11-17 23:10:27 -08:00
#include sources
#OBJSx := $(SRCS:.pas=.o)
#OBJS := $(foreach feh,$(OBJSx),$(BUILDDIR)/$(feh))
2000-11-17 16:33:00 -08:00
$(BUILDDIR)/%.o : %.pas
$(PPC386) $(PPC386FLAGS) $<
2000-11-17 23:10:27 -08:00
all: $(BUILDDIR) $(MAINEXE) $(MINITERMEXE) $(INITEXE) $(TPAGEEXE) $(IFLEXE) \
$(FINDITEXE) $(T2TEXE) $(OBLITEXE) $(MTESTEXE) $(BBEXE) $(CBBSEXE) \
$(MABSEXE) $(COCONFIGEXE) $(SPDATEEXE)
2000-11-17 16:33:00 -08:00
$(MAINEXE) : $(BUILDDIR) $(OBJS) bbs.pas
$(PPC386) $(PPC386FLAGS) bbs.pas
2000-11-17 23:10:27 -08:00
$(MINITERMEXE) : $(BUILDDIR) $(OBJS) miniterm.pas
$(PPC386) $(PPC386FLAGS) miniterm.pas
$(INITEXE) : $(BUILDDIR) $(OBJS) init.pas
$(PPC386) $(PPC386FLAGS) init.pas
$(TPAGEEXE) : $(BUILDDIR) $(OBJS) tpage.pas
$(PPC386) $(PPC386FLAGS) tpage.pas
$(IFLEXE) : $(BUILDDIR) $(OBJS) ifl.pas
$(PPC386) $(PPC386FLAGS) ifl.pas
$(FINDITEXE) : $(BUILDDIR) $(OBJS) findit.pas
$(PPC386) $(PPC386FLAGS) findit.pas
$(T2TEXE) : $(BUILDDIR) $(OBJS) t2t.pas
$(PPC386) $(PPC386FLAGS) t2t.pas
$(OBLITEXE) : $(BUILDDIR) $(OBJS) t2t.pas
$(PPC386) $(PPC386FLAGS) t2t.pas
$(MTESTEXE) : $(BUILDDIR) $(OBJS) mtest.pas
$(PPC386) $(PPC386FLAGS) mtest.pas
$(BBEXE) : $(BUILDDIR) $(OBJS) bb.pas
$(PPC386) $(PPC386FLAGS) bb.pas
$(CBBSEXE) : $(BUILDDIR) $(OBJS) cbbs.pas
$(PPC386) $(PPC386FLAGS) cbbs.pas
$(MABSEXE) : $(BUILDDIR) $(OBJS) mabs.pas
$(PPC386) $(PPC386FLAGS) mabs.pas
$(COCONFIGEXE) : $(BUILDDIR) $(OBJS) coconfig.pas
$(PPC386) $(PPC386FLAGS) coconfig.pas
$(SPDATEEXE) : $(BUILDDIR) $(OBJS) spdate.pas
$(PPC386) $(PPC386FLAGS) spdate.pas
2000-11-17 16:33:00 -08:00
$(BUILDDIR): $(cpu)
mkdir $(BUILDDIR)
$(cpu):
mkdir $(cpu)
clean:
rm -rf $(BUILDDIR)
rm -rf core
# end of Makefile ...