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".
2000-11-19 02:49:44 -08:00
verbose=false
2000-11-17 16:33:00 -08:00
# 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.
ifeq ($(strip $(verbose)),true)
PPC386FLAGS += -vwnh
endif
ifeq ($(strip $(debug)),true)
BUILDDIR := $(cpu)/Debug
PPC386FLAGS += -g # include debug symbols.
2000-11-19 02:49:44 -08:00
#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.
2000-11-17 16:33:00 -08:00
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-19 02:49:44 -08:00
# Rebuild all units needed.
2000-11-17 23:10:27 -08:00
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).
2000-11-19 02:49:44 -08:00
#PPC386FLAGS += -Rintel
2000-11-17 16:33:00 -08:00
# Output target Linux. !!! FIXME: Want win32 compiles?
2000-11-19 02:49:44 -08:00
#PPC386FLAGS += -TLINUX
2000-11-17 16:33:00 -08:00
# 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)
2000-11-19 02:49:44 -08:00
# This are the names of the produced binaries.
MAINEXE=$(BUILDDIR)/bbs
MINITERMEXE=$(BUILDDIR)/miniterm
INITEXE=$(BUILDDIR)/init
TPAGEEXE=$(BUILDDIR)/tpage
IFLEXE=$(BUILDDIR)/ifl
FINDITEXE=$(BUILDDIR)/findit
T2TEXE=$(BUILDDIR)/t2t
OBLITEXE=$(BUILDDIR)/oblit
MTESTEXE=$(BUILDDIR)/mtest
BBEXE=$(BUILDDIR)/bb
CBBSEXE=$(BUILDDIR)/cbbs
MABSEXE=$(BUILDDIR)/mabs
COCONFIGEXE=$(BUILDDIR)/coconfig
SPDATEEXE=$(BUILDDIR)/spdate
2000-11-17 16:33:00 -08:00
#---------------------------------------------------------------------------
# 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) \
2000-11-19 02:49:44 -08:00
$(FINDITEXE) $(OBLITEXE) $(MTESTEXE) $(BBEXE) $(CBBSEXE) \
$(MABSEXE) $(COCONFIGEXE) $(SPDATEEXE) $(T2TEXE)
2000-11-17 16:33:00 -08:00
2000-11-19 02:49:44 -08:00
$(MAINEXE) : $(BUILDDIR) bbs.pas
2000-11-17 16:33:00 -08:00
$(PPC386) $(PPC386FLAGS) bbs.pas
2000-11-19 02:49:44 -08:00
$(MINITERMEXE) : $(BUILDDIR) miniterm.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) miniterm.pas
2000-11-19 02:49:44 -08:00
$(INITEXE) : $(BUILDDIR) init.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) init.pas
2000-11-19 02:49:44 -08:00
$(TPAGEEXE) : $(BUILDDIR) tpage.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) tpage.pas
2000-11-19 02:49:44 -08:00
$(IFLEXE) : $(BUILDDIR) ifl.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) ifl.pas
2000-11-19 02:49:44 -08:00
$(FINDITEXE) : $(BUILDDIR) findit.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) findit.pas
2000-11-19 02:49:44 -08:00
$(T2TEXE) : $(BUILDDIR) t2t.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) t2t.pas
2000-11-19 02:49:44 -08:00
$(OBLITEXE) : $(BUILDDIR) oblit.pas
$(PPC386) $(PPC386FLAGS) oblit.pas
2000-11-17 23:10:27 -08:00
2000-11-19 02:49:44 -08:00
$(MTESTEXE) : $(BUILDDIR) mtest.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) mtest.pas
2000-11-19 02:49:44 -08:00
$(BBEXE) : $(BUILDDIR) bb.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) bb.pas
2000-11-19 02:49:44 -08:00
$(CBBSEXE) : $(BUILDDIR) cbbs.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) cbbs.pas
2000-11-19 02:49:44 -08:00
$(MABSEXE) : $(BUILDDIR) mabs.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) mabs.pas
2000-11-19 02:49:44 -08:00
$(COCONFIGEXE) : $(BUILDDIR) coconfig.pas
2000-11-17 23:10:27 -08:00
$(PPC386) $(PPC386FLAGS) coconfig.pas
2000-11-19 02:49:44 -08:00
$(SPDATEEXE) : $(BUILDDIR) spdate.pas
2000-11-17 23:10:27 -08:00
$(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 ...