# c:\bin\sh.exe
must exist!
.SUFFIXES: .p
.pas .o .h
.pas.o:
$(PC) -c $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
PC =
gpc
DIRFLAGS = -B$(subst \,\\,$(GPC_EXEC_PREFIX)) -L$(subst
\,\\,$(GPC_EXEC_PREFIX))
ALLPFLAGS = $(PFLAGS) -g -O3
--automake="$(DIRFLAGS) -g -O3"
EXE =
.exe
TESTS =
abso$(EXE) asmnames$(EXE) bitmanip$(EXE) caseelse$(EXE)
\
cstparam$(EXE) head$(EXE) incdec$(EXE) kohl$(EXE)
\
mem$(EXE) minimax$(EXE) nohead$(EXE) objects$(EXE)
\
openarr$(EXE) switches$(EXE) varrec$(EXE)
voidparm$(EXE)
TESTSRC =
head.pas nohead.pas cstparam.pas caseelse.pas switches.pas
\
bitmanip.pas incdec.pas minimax.pas mem.pas abso.pas
\
asmnames.pas openarr.pas varrec.pas
voidparm.pas
all:
bptest
bptest:
for x in $(TESTSRC) ; do \
rm -f a.out
2>/dev/null ; \
$(PC) $(ALLPFLAGS) $$x 2>/dev/null ;
\
echo -n "$$x: " ; \
if [ -f
"a.out" ] ; then ./a.out ; else echo "failed" ; fi ;
\
done ; \
rm myunit.o myunit.gpi a.out 2>/dev/null
;
# DOS can't run
shell script
dostest: $(TESTS)
clean:
-rm -f $(TESTS)
-rm -f *.o *.gpi
*.gpc
distclean:
clean
-rm -f *~ core a.out #* *.BAK *.bak
*.orig
#
empty
install:
abso$(EXE):
abso.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
asmnames$(EXE):
asmnames.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
bitmanip$(EXE):
bitmanip.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
caseelse$(EXE):
caseelse.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
cstparam$(EXE):
cstparam.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
head$(EXE):
head.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
incdec$(EXE):
incdec.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
#iso$(EXE):
iso.pas
# $(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@ $<
# strip
$@
#
:-)
kohl$(EXE): kohl.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
mem$(EXE):
mem.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@ $<
strip
$@
minimax$(EXE):
minimax.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
nohead$(EXE):
nohead.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
objects$(EXE):
objects.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
openarr$(EXE):
openarr.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
switches$(EXE):
switches.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
varrec$(EXE):
varrec.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
voidparm$(EXE):
voidparm.pas
$(PC) $(DIRFLAGS) $(ALLPFLAGS) -o $@
$<
strip $@
#--------------------------------------------------------------------
A rule for making voidparm.exe had to be
added, and I could run it with the command
make dostest
as Maurice Lombardi pointed out to
me.
I commented out iso.pas, because it gave
errors:
iso.pas: In function
`program_Iso':
iso.pas:13: parse error before `Operator'
iso.pas:13: comma
missing after identifier `Uses'
iso.pas:13: parse error before
`Shl'
iso.pas:13: comma missing after identifier `Uses'
iso.pas:13: parse
error before `;'
iso.pas:14: comma missing after identifier
`Uses'
iso.pas:14: pointer domain type undefined
iso.pas:14: parse error
before `Uses'
iso.pas:14: comma missing after identifier
`Uses'
iso.pas:14: parse error before `Value'
iso.pas:14: comma missing
after identifier `Uses'
iso.pas:14: parse error before
`Absolute'
iso.pas:21: comma missing after identifier `Uses'
iso.pas:21:
parse error before `('
iso.pas:21: comma missing after identifier
`Uses'
iso.pas:21: parse error before `Operator'
iso.pas:21: extra comma
following id_list
That was not the case in GPC for Cygwin32
b17.1. Harakiri.pas in test\misc gave errors as well:
harakiri.pas: In function
`Paramstr':
harakiri.pas:40: condition must be of Boolean
type
harakiri.pas: In function `Atoi':
harakiri.pas:54: warning: cast to
type of different size
harakiri.pas:54: invalid lvalue in address
expression
and that was also not the case in the
previous version of GPC.
Till so far I didn't try the DLL
demo.
Kind regards,
Hans Lunsing
Leiden, The Netherlands,