Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

GNU pascal (Developers)

posted by Rugxulo Homepage, Usono, 29.03.2024, 06:42

gpc.bat

@echo off
if not "%DJGPP%"=="" goto end
if "%RAMDRIVE%"=="" goto end
if exist %RAMDRIVE%:\GPC\BIN\gpc.exe goto end
set Z1=C:\ZIPS\DJGPP
set U1=%UNZIP%
set UNZIP=%UNZIP% -qqqn
for %%a in (md pushd) do %%a %RAMDRIVE%:\GPC
if not "%DEBUG%"=="" time /t
unzip %Z1%\OLD\g[pc]c.old
unzip %Z1%\djdev.zip
unzip %Z1%\make.zip
unzip %Z1%\binutils.zip
set UNZIP=%U1%
for %%z in (Z1 U1) do set %%z=
popd
if "%NOPACK%"=="" upx -qqq %RAMDRIVE%:\GPC\...\*c1.exe
if "%NOPACK%"=="" upx -qqq --best %RAMDRIVE%:\GPC\...\*.exe
if not "%DEBUG%"=="" time /t
set DJGPP=%RAMDRIVE%:\GPC\djgpp.env
call mypath %RAMDRIVE%:\GPC\BIN
prompt [ FreeDOS - DJGPP/GPC ]
if not "%1"=="" gpc.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
:end


gpc.mak

# By default, GNU make doesn't really set PC and PFLAGS to useful values.
# You can "set PC=gpc" and "set PFLAGS=-O --classic-pascal" and "make b"
# (if b.p exists), but below is a slightly better way.
#
# Put this in /dev/env/DJDIR/include and "set MAKEFILES=gpc.mak".
# Then you can use this as additional default rules, e.g. "make b.exe".
#
# Otherwise you'll have to make your own local makefile and separately
#   "-include" this one at top with its full path specified.
#
# You can then also "set DIALECT=--classic-pascal" so you don't have
#   to manually override it on cmdline every time.

EXE       = .exe
PC        = gpc

DEBUG    ?= -s
MARCH    ?= pentium
MTUNE    ?= i686
OPTLEVEL ?= -O2
INLINE   ?= -finline-functions
OPTIMIZE ?= $(OPTLEVEL) $(INLINE) -march=$(MARCH) -mtune=$(MTUNE)
WARN     ?= -Wall -Wextra
DIALECT  ?= --extended-pascal
AUTOMAKE ?= --automake
RANGE    ?= --no-range-checking
FPO      ?= -fomit-frame-pointer #-momit-leaf-frame-pointer
#OTHER   ?= --uses=heapmon

PFLAGS   ?= $(DEBUG) $(WARN) $(OPTIMIZE) $(DIALECT) $(AUTOMAKE)\
 $(RANGE) $(FPO) $(OTHER)

%$(EXE):: %.pas
{!TAB!}$(PC) $(PFLAGS) $< -o $@

# EOF

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 166 users online (0 registered, 166 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum