* fixes to work with the new makefile

* os2 compiles now correct under linux
This commit is contained in:
peter 1999-06-01 13:23:07 +00:00
parent f95fe26921
commit f7812b9f34
9 changed files with 340 additions and 272 deletions

View File

@ -17,6 +17,9 @@
# Start of configurable section # Start of configurable section
##################################################################### #####################################################################
# Default place of makefile.fpc
DEFAULTFPCDIR=..
# Set redir to YES if you want a log file to be kept. # Set redir to YES if you want a log file to be kept.
ifndef REDIR ifndef REDIR
REDIR=NO REDIR=NO
@ -39,17 +42,6 @@ ifndef ERRORFILE
ERRORFILE= ERRORFILE=
endif endif
# Everything else has been moved to rtl/cfg/makefile.cfg
#####################################################################
# Include default makefile
#####################################################################
CFG=cfg
include $(CFG)/makefile.cfg
####################################################################### #######################################################################
# Fix options # Fix options
@ -78,7 +70,7 @@ else
override REDIR:= >> log override REDIR:= >> log
endif endif
else else
override REDIR:= >> con override REDIR:=
endif endif
# Variables to export # Variables to export
@ -95,18 +87,65 @@ export PP OPT REDIR REDIRFILE ERRORFILE
clean install native diffs diffclean \ clean install native diffs diffclean \
libs libinstall \ libs libinstall \
all: rtls all: native
clean: clean:
make -C template clean $(MAKE) -C go32v1 clean
make -C go32v1 clean $(MAKE) -C go32v2 clean
make -C go32v2 clean $(MAKE) -C linux clean
make -C linux clean $(MAKE) -C win32 clean
make -C win32 clean $(MAKE) -C os2 clean
make -C os2 clean
-$(DEL) *.dif -$(DEL) *.dif
#####################################################################
# Include default makefile
#####################################################################
# test if FPCMAKE is still valid
ifndef FPCMAKE
ifdef FPCDIR
FPCMAKE=$(FPCDIR)/makefile.fpc
endif
endif
ifdef FPCMAKE
ifeq ($(strip $(wildcard $(FPCMAKE))),)
FPCDIR=
FPCMAKE=
endif
endif
ifndef FPCDIR
ifdef DEFAULTFPCDIR
FPCDIR=$(DEFAULTFPCDIR)
endif
endif
ifndef FPCMAKE
ifdef FPCDIR
FPCMAKE=$(FPCDIR)/makefile.fpc
else
FPCMAKE=makefile.fpc
endif
endif
override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
ifndef FPCMAKE
testfpcmake:
@echo makefile.fpc not found!
@echo Check the FPCMAKE and FPCDIR environment variables.
@stopnow
ifndef NODEFAULTALL
all: testfpcmake
endif
install: testfpcmake
clean: testfpcmake
else
include $(FPCMAKE)
testfpcmake:
endif
############################################################################ ############################################################################
# RTLs # RTLs
############################################################################ ############################################################################
@ -116,22 +155,23 @@ native: rtl$(OS_SOURCE)
rtls: rtlgo32v1 rtlgo32v2 rtllinux rtlos2 rtlwin32 rtls: rtlgo32v1 rtlgo32v2 rtllinux rtlos2 rtlwin32
rtlgo32v1: rtlgo32v1:
make -C go32v1 $(MAKE) -C go32v1
rtlgo32v2: rtlgo32v2:
make -C go32v2 $(MAKE) -C go32v2
rtllinux: rtllinux:
make -C linux $(MAKE) -C linux
rtlos2: rtlos2:
make -C os2 $(MAKE) -C os2
rtlwin32: rtlwin32:
make -C win32 $(MAKE) -C win32
rtlamiga: rtlamiga:
make -C amiga $(MAKE) -C amiga
############################################################################ ############################################################################
# Libs # Libs
@ -142,19 +182,19 @@ nativelibs : $(OS_SOURCE)libs
libs: go32v1libs go32v2libs linuxlibs os2libs win32libs libs: go32v1libs go32v2libs linuxlibs os2libs win32libs
go32v1libs: go32v1libs:
make -C go32v1 libs $(MAKE) -C go32v1 libs
go32v2libs: go32v2libs:
make -C go32v2 libs $(MAKE) -C go32v2 libs
linuxlibs: linuxlibs:
make -C linux libs $(MAKE) -C linux libs
os2libs: os2libs:
make -C os2 libs $(MAKE) -C os2 libs
win32libs: win32libs:
make -C win32 libs $(MAKE) -C win32 libs
############################################################################ ############################################################################
@ -166,15 +206,15 @@ install: install_linux install_go32v1 install_go32v2 install_os2 install_win32
native_install: install_$(OS_SRC) native_install: install_$(OS_SRC)
install_go32v1: install_go32v1:
make -C go32v1 install $(MAKE) -C go32v1 install
install_go32v2: install_go32v2:
make -C go32v2 install $(MAKE) -C go32v2 install
install_linux: install_linux:
make -C linux install $(MAKE) -C linux install
install_os2: install_os2:
make -C os2 install $(MAKE) -C os2 install
install_win32: install_win32:
make -C win32 install $(MAKE) -C win32 install
############################################################################ ############################################################################
@ -187,15 +227,15 @@ libinstall: libinstall_linux libinstall_go32v1 libinstall_go32v2 \
native_libinstall: libinstall_$(OS_SOURCE) native_libinstall: libinstall_$(OS_SOURCE)
libinstall_go32v1: libinstall_go32v1:
make -C go32v1 libinstall $(MAKE) -C go32v1 libinstall
libinstall_go32v2: libinstall_go32v2:
make -C go32v2 libinstall $(MAKE) -C go32v2 libinstall
libinstall_linux: libinstall_linux:
make -C linux libinstall $(MAKE) -C linux libinstall
libinstall_os2: libinstall_os2:
make -C os2 libinstall $(MAKE) -C os2 libinstall
libinstall_win32: libinstall_win32:
make -C win32 libinstall $(MAKE) -C win32 libinstall
############################################################################ ############################################################################
@ -212,59 +252,40 @@ makefile.dif : makefile
diffs_rtl: makefile.dif diffs_rtl: makefile.dif
diffs_inc: diffs_inc:
make -C inc diffs $(MAKE) -C inc diffs
diffs_i386: diffs_i386:
make -C i386 diffs $(MAKE) -C i386 diffs
diffs_m68k: diffs_m68k:
make -C m68k diffs $(MAKE) -C m68k diffs
diffs_cfg: diffs_cfg:
make -C cfg diffs $(MAKE) -C cfg diffs
diffs_template: diffs_template:
make -C template diffs $(MAKE) -C template diffs
diffs_go32v1: diffs_go32v1:
make -C go32v1 diffs $(MAKE) -C go32v1 diffs
diffs_go32v2: diffs_go32v2:
make -C go32v2 diffs $(MAKE) -C go32v2 diffs
diffs_linux: diffs_linux:
make -C linux diffs $(MAKE) -C linux diffs
diffs_os2: diffs_os2:
make -C os2 diffs $(MAKE) -C os2 diffs
diffs_win32: diffs_win32:
make -C win32 diffs $(MAKE) -C win32 diffs
diffclean: diffclean:
make -C template diffclean $(MAKE) -C template diffclean
make -C dos diffclean $(MAKE) -C dos diffclean
make -C go32v1 diffclean $(MAKE) -C go32v1 diffclean
make -C go32v2 diffclean $(MAKE) -C go32v2 diffclean
make -C linux diffclean $(MAKE) -C linux diffclean
make -C os2 diffclean $(MAKE) -C os2 diffclean
make -C win32 diffclean $(MAKE) -C win32 diffclean
-$(DEL) *.dif -$(DEL) *.dif
# #
# $Log$ # $Log$
# Revision 1.6 1999-05-19 10:59:48 peter # Revision 1.7 1999-06-01 13:23:07 peter
# * remove utils # * fixes to work with the new makefile
# * os2 compiles now correct under linux
# #
# Revision 1.5 1999/02/24 15:59:04 michael
# * fixed clean target
#
# Revision 1.4 1998/12/21 14:26:52 pierre
# * go32v? directory change reflected
#
# Revision 1.3 1998/10/22 16:45:23 pierre
# + added rtlamiga target
#
# Revision 1.2 1998/09/16 16:47:20 peter
# * merged fixes
#
# Revision 1.1.2.1 1998/09/16 16:17:46 peter
# * updates to install with go32,win32
#
# Revision 1.1 1998/09/10 14:19:02 peter
# - renamed
#
# Revision 1.10 1998/09/04 17:32:36 pierre
# * REDIR handling corrected
# #

View File

@ -55,11 +55,12 @@ SYSTEMUNIT=system
LOADEROBJECTS=prt0 LOADEROBJECTS=prt0
# Unit Objects # Unit Objects
UNITOBJECTS=$(SYSTEMUNIT) strings go32 \ UNITOBJECTS=$(SYSTEMUNIT) objpas strings \
dos crt objects printer \ go32 \
objpas sysutils math typinfo \ dos crt objects printer \
sysutils math typinfo \
cpu mmx getopts heaptrc \ cpu mmx getopts heaptrc \
msmouse msmouse
##################################################################### #####################################################################
# Common targets # Common targets
@ -170,29 +171,25 @@ prt0$(OEXT) : prt0.as
$(SYSTEMPPU) : system.pp $(SYSDEPS) $(SYSTEMPPU) : system.pp $(SYSDEPS)
$(COMPILER) -Us -Sg system.pp $(REDIR) $(COMPILER) -Us -Sg system.pp $(REDIR)
objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc \ $(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
$(SYSTEMPPU) $(SYSTEMPPU)
go32$(PPUEXT) : go32.pp $(SYSTEMPPU)
#
# Delphi Object Model
#
include $(OBJPASDIR)/makefile.op
# #
# System Dependent Units # System Dependent Units
# #
go32$(PPUEXT) : go32.pp objpas$(PPUEXT) $(SYSTEMPPU)
# #
# TP7 Compatible RTL Units # TP7 Compatible RTL Units
# #
dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \ dos$(PPUEXT) : dos.pp $(INC)/filerec.inc $(INC)/textrec.inc \
go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU) go32$(PPUEXT) strings$(PPUEXT) $(SYSTEMPPU)
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU) crt$(PPUEXT) : crt.pp $(INC)/textrec.inc go32$(PPUEXT) $(SYSTEMPPU)
@ -201,7 +198,21 @@ objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
printer$(PPUEXT) : printer.pp $(SYSTEMPPU) printer$(PPUEXT) : printer.pp $(SYSTEMPPU)
# #
# Other RTL Units # Delphi Compatible Units
#
sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
filutil.inc disk.inc objpas$(PPUEXT) dos$(PPUEXT) go32$(PPUEXT)
$(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
$(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
#
# Other system-independent RTL Units
# #
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU) cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
@ -211,12 +222,21 @@ mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU) getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU) heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
$(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
#
# Other system-dependent RTL Units
#
msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU) msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
# #
# $Log$ # $Log$
# Revision 1.6 1999-04-08 12:22:52 peter # Revision 1.7 1999-06-01 13:23:08 peter
# * fixes to work with the new makefile
# * os2 compiles now correct under linux
#
# Revision 1.6 1999/04/08 12:22:52 peter
# * removed os.inc # * removed os.inc
# #
# #

View File

@ -15,7 +15,9 @@
unit go32; unit go32;
{$mode objfpc}
{$S-}{no stack check, used by DPMIEXCP !! } {$S-}{no stack check, used by DPMIEXCP !! }
interface interface
const const
@ -574,16 +576,16 @@ end ['EAX','EDX'];
begin begin
asm asm
pushl %ebx pushl %ebx
movw $0,U_GO32_INT31ERROR movw $0,INT31ERROR
movl flag,%ebx movl flag,%ebx
testb $1,%bl testb $1,%bl
jz 1f jz .L1
movw %ax,U_GO32_INT31ERROR movw %ax,INT31ERROR
xorl %eax,%eax xorl %eax,%eax
jmp 2f jmp .L2
1: .L1:
movl $1,%eax movl $1,%eax
2: .L2:
popl %ebx popl %ebx
end; end;
end; end;
@ -1104,6 +1106,9 @@ end ['EAX','EDX'];
sti sti
end; end;
var
_run_mode : word;external name '_run_mode';
function get_run_mode : word; function get_run_mode : word;
begin begin
@ -1129,6 +1134,9 @@ end ['EAX','EDX'];
end; end;
end; end;
var
_core_selector : word;external name '_core_selector';
function get_core_selector : word; function get_core_selector : word;
begin begin
@ -1203,7 +1211,11 @@ end.
{ {
$Log$ $Log$
Revision 1.1 1998-12-21 13:07:02 peter Revision 1.2 1999-06-01 13:23:09 peter
* fixes to work with the new makefile
* os2 compiles now correct under linux
Revision 1.1 1998/12/21 13:07:02 peter
* use -FE * use -FE
Revision 1.12 1998/08/27 10:30:50 pierre Revision 1.12 1998/08/27 10:30:50 pierre

View File

@ -26,7 +26,7 @@ begin
movw handle,%bx movw handle,%bx
movb $0x3e,%ah movb $0x3e,%ah
pushl %ebp pushl %ebp
intl $0x21 int $0x21
popl %ebp popl %ebp
end; end;
FileClose := 0; FileClose := 0;
@ -173,7 +173,11 @@ END;
{ {
$Log$ $Log$
Revision 1.1 1998-12-21 13:07:02 peter Revision 1.2 1999-06-01 13:23:10 peter
* fixes to work with the new makefile
* os2 compiles now correct under linux
Revision 1.1 1998/12/21 13:07:02 peter
* use -FE * use -FE
Revision 1.4 1998/07/06 12:26:19 carl Revision 1.4 1998/07/06 12:26:19 carl

View File

@ -220,7 +220,7 @@ asm
movl h,%ebx movl h,%ebx
movb $0x3e,%ah movb $0x3e,%ah
pushl %ebp pushl %ebp
intl $0x21 int $0x21
popl %ebp popl %ebp
jnc .LCLOSE1 jnc .LCLOSE1
movw %ax,inoutres movw %ax,inoutres
@ -614,7 +614,11 @@ Begin
End. End.
{ {
$Log$ $Log$
Revision 1.4 1999-04-08 12:22:57 peter Revision 1.5 1999-06-01 13:23:11 peter
* fixes to work with the new makefile
* os2 compiles now correct under linux
Revision 1.4 1999/04/08 12:22:57 peter
* removed os.inc * removed os.inc
Revision 1.3 1999/01/18 10:05:49 pierre Revision 1.3 1999/01/18 10:05:49 pierre

View File

@ -63,10 +63,10 @@ LOADEROBJECTS=prt0 exceptn fpu
# Unit Objects # Unit Objects
UNITOBJECTS=$(SYSTEMUNIT) objpas strings \ UNITOBJECTS=$(SYSTEMUNIT) objpas strings \
go32 initc dpmiexcp profile dxeload emu387 \ go32 initc dpmiexcp profile dxeload emu387 \
dos crt objects printer graph \ dos crt objects printer graph \
sysutils math typinfo \ sysutils math typinfo \
cpu mmx getopts heaptrc \ cpu mmx getopts heaptrc \
msmouse msmouse
@ -189,7 +189,7 @@ strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
# System Dependent Units # System Dependent Units
# #
go32$(PPUEXT) : go32.pp $(SYSTEMPPU) go32$(PPUEXT) : go32.pp objpas$(PPUEXT) $(SYSTEMPPU)
dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) $(SYSTEMPPU) dpmiexcp$(PPUEXT) : dpmiexcp.pp exceptn$(OEXT) $(SYSTEMPPU)
$(COMPILER) -Sg dpmiexcp.pp $(REDIR) $(COMPILER) -Sg dpmiexcp.pp $(REDIR)
@ -255,7 +255,11 @@ msmouse$(PPUEXT) : msmouse.pp $(SYSTEMPPU)
# #
# $Log$ # $Log$
# Revision 1.15 1999-05-13 22:38:02 peter # Revision 1.16 1999-06-01 13:23:13 peter
# * fixes to work with the new makefile
# * os2 compiles now correct under linux
#
# Revision 1.15 1999/05/13 22:38:02 peter
# * -Sg for heaptrc # * -Sg for heaptrc
# #
# Revision 1.14 1999/05/04 23:23:53 pierre # Revision 1.14 1999/05/04 23:23:53 pierre

View File

@ -18,75 +18,121 @@
# spaces, or the makefile won't work anymore after you save. # spaces, or the makefile won't work anymore after you save.
##################################################################### #####################################################################
# Start of configurable section. # Makefile Defaults
# Please note that all these must be set in the main makefile, and
# should be set there.
# Don't remove the indef statements. They serve to avoid conflicts
# with the main makefile.
##################################################################### #####################################################################
# What is the target operating system ? # Default place of the makefile.fpc
ifndef OS_TARGET DEFAULTFPCDIR=../..
OS_TARGET=os2
endif
# What is the target processor : # set target and cpu which are required
ifndef CPU override OS_TARGET=os2
CPU=i386 override CPU=i386
#CPU=m68k
endif
# What compiler to use ? # Where are the include files
ifndef PP RTL=..
PP=ppc386 INC=$(RTL)/inc
endif PROCINC=$(RTL)/$(CPU)
# What options to pass to the compiler ? # Where to place the result files
# You may want to specify a config file or error definitions file here. TARGETDIR=.
ifndef OPT
OPT=
endif
# Where is the PPUMOVE program ? # These units belong to the RTL
ifndef PPUMOVE UNITPREFIX=rtl
PPUMOVE=ppumove
endif
# Set this to 'shared' or 'static'
# LIBTYPE=shared
# AOUT should be defined in main makefile.
# But you can set it here too.
# AOUT = -DAOUT
# Do you want to link to the C library ?
# Standard it is NO. You can set it to YES to link in th C library.
ifndef LINK_TO_C
LINK_TO_C=NO
endif
##################################################################### #####################################################################
# End of configurable section. # Own defaults
# Do not edit after this line.
##################################################################### #####################################################################
# Paths
OBJPASDIR=$(RTL)/objpas
# Define os2 system Unit name
SYSTEMUNIT=sysos2
# Loaders
LOADEROBJECTS=prt0 prt1 code2 code3
# Unit Objects
UNITOBJECTS=$(SYSTEMUNIT) objpas strings \
os2def doscalls moncalls kbdcalls viocalls \
dos crt objects printer \
objpas sysutils math typinfo \
cpu mmx getopts heaptrc \
##################################################################### #####################################################################
# System independent # Common targets
##################################################################### #####################################################################
# Where are the include files ? .PHONY: all clean install info \
INC=../inc staticlib sharedlib libsclean \
PROCINC=../$(CPU) staticinstall sharedinstall libinstall \
CFG=../cfg
OBJPASDIR=../objpas
# Get some defaults for Programs and OSes. all: testfpcmake fpc_all
# This will set the following variables :
# inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR clean: testfpcmake fpc_clean
# It will also set OPT for cross-compilation, and add required options.
# also checks for config file. install: testfpcmake fpc_install
# it expects INC PROCINC to be set !!
include $(CFG)/makefile.cfg info: testfpcmake fpc_info
staticlib: testfpcmake fpc_staticlib
sharedlib: testfpcmake fpc_sharedlib
libsclean: testfpcmake fpc_libsclean
staticinstall: testfpcmake fpc_staticinstall
sharedinstall: testfpcmake fpc_sharedinstall
libinstall: testfpcmake fpc_libinstall
#####################################################################
# Include default makef
#####################################################################
# test if FPCMAKE is still valid
ifdef FPCMAKE
ifeq ($(strip $(wildcard $(FPCMAKE))),)
FPCDIR=
FPCMAKE=
endif
endif
ifndef FPCDIR
ifdef DEFAULTFPCDIR
FPCDIR=$(DEFAULTFPCDIR)
endif
endif
ifndef FPCMAKE
ifdef FPCDIR
FPCMAKE=$(FPCDIR)/makefile.fpc
else
FPCMAKE=makefile.fpc
endif
endif
override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
ifeq ($(FPCMAKE),)
testfpcmake:
@echo makefile.fpc not found!
@echo Check the FPCMAKE and FPCDIR environment variables.
@exit
else
include $(FPCMAKE)
testfpcmake:
endif
#####################################################################
# Include system unit dependencies
#####################################################################
SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
# Get the system independent include file names. # Get the system independent include file names.
# This will set the following variables : # This will set the following variables :
@ -103,45 +149,13 @@ SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
# Put system unit dependencies together. # Put system unit dependencies together.
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS) SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
#####################################################################
# System dependent
#####################################################################
PPUEXT=.ppo
ASMEXT=.so2
OEXT=.oo2
# Define Linux Units
SYSTEMPPU=sysos2$(PPUEXT)
OBJECTS=strings dos crt objpas sysutils
# objects still not implemented !!
LOADERS=prt0 prt1 code2 code3
##################################################################### #####################################################################
# System independent Makefile # Dependencies
##################################################################### #####################################################################
# Add Prefix and Suffixes vpath %.pas $(INC) $(PROCINC)
OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS)) vpath %.pp $(INC) $(PROCINC)
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
.PHONY : all install clean \
libs libsclean \
diffs diffclean \
all : $(OBJLOADERS) $(PPUOBJECTS)
install : all
$(MKDIR) $(UNITINSTALLDIR)
$(INSTALL) *$(PPUEXT) *$(OEXT) $(UNITINSTALLDIR)
clean :
-$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) log
#####################################################################
# Files
#####################################################################
# #
# Loaders # Loaders
@ -150,6 +164,7 @@ clean :
%$(OEXT) : %.as %$(OEXT) : %.as
as -o $*$(OEXT) $*.as as -o $*$(OEXT) $*.as
# #
# Base Units (System, strings, os-dependent-base-unit) # Base Units (System, strings, os-dependent-base-unit)
# #
@ -157,99 +172,73 @@ clean :
$(SYSTEMPPU) : sysos2.pas $(SYSDEPS) $(SYSTEMPPU) : sysos2.pas $(SYSDEPS)
$(COMPILER) -Us -Sg sysos2.pas $(REDIR) $(COMPILER) -Us -Sg sysos2.pas $(REDIR)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\ objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMPPU)
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc\ $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp $(REDIR)
strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc \
$(PROCINC)/strings.inc $(PROCINC)/stringss.inc \
$(SYSTEMPPU) $(SYSTEMPPU)
$(COMPILER) $(INC)/strings.pp $(REDIR)
#
# Delphi Object Model
#
objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(INC)/except.inc
$(COPY) $(OBJPASDIR)/objpas.pp .
$(COMPILER) -S2 -I$(OBJPASDIR) objpas $(REDIR)
$(DEL) objpas.pp
SYSUTILINC = $(wildcard $(OBJPASDIR)/*.inc)
sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(SYSUTILINC) filutil.inc disk.inc
$(COPY) $(OBJPASDIR)/sysutils.pp .
$(COMPILER) -S2 -I$(OBJPASDIR) sysutils $(REDIR)
$(DEL) sysutils.pp
# #
# System Dependent Units # System Dependent Units
# #
doscalls$(PPUEXT) : doscalls.pas strings$(PPUEXT) objects$(PPUEXT) $(SYSTEMPPU)
kbdcalls$(PPUEXT) : kbdcalls.pas $(SYSTEMPPU)
moncalls$(PPUEXT) : moncalls.pas strings$(PPUEXT) $(SYSTEMPPU)
# #
# TP7 Compatible RTL Units # TP7 Compatible RTL Units
# #
dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMPPU) dos$(PPUEXT) : dos.pas $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) \
$(COMPILER) dos.pas $(REDIR) $(SYSTEMPPU)
crt$(PPUEXT) : crt.pas dos$(PPUEXT) crt$(PPUEXT) : crt.pas $(INC)/textrec.inc $(SYSTEMPPU)
$(COMPILER) crt.pas $(REDIR)
#objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU) objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
# $(COPY) $(INC)/objects.pp .
# $(COMPILER) $(OPT) objects $(REDIR) printer$(PPUEXT) : printer.pas $(INC)/textrec.inc $(SYSTEMPPU)
# $(DEL) objects.pp
#graph$(PPUEXT) : graph.pp
# #
# Other RTL Units # Delphi Compatible Units
# #
##################################################################### sysutils$(PPUEXT) : $(OBJPASDIR)/sysutils.pp $(wildcard $(OBJPASDIR)/*.inc) \
# Libs filutil.inc disk.inc objpas$(PPUEXT)
##################################################################### $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/sysutils.pp $(REDIR)
libs : all libfpc$(LIBEXT) typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp objpas$(PPUEXT)
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp $(REDIR)
libfpc.so: math$(PPUEXT): $(OBJPASDIR)/math.pp objpas$(PPUEXT) sysutils$(PPUEXT)
$(PPUMOVE) -o fpc *.ppu $(COMPILER) $(OBJPASDIR)/math.pp $(REDIR)
libfpc.a: #
$(PPUMOVE) -s -o fpc *.ppu # Other system-independent RTL Units
#
libinstall : libs cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMPPU)
$(INSTALLEXE) libfpc$(LIBEXT) $(LIBINSTALLDIR)
$(INSTALL) *$(PPLEXT) $(UNITINSTALLDIR)
ldconfig
libsclean : clean mmx$(PPUEXT) : $(PROCINC)/mmx.pp cpu$(PPUEXT) $(SYSTEMPPU)
-$(DEL) *.a *.so *$(PPLEXT)
##################################################################### getopts$(PPUEXT) : $(INC)/getopts.pp $(SYSTEMPPU)
# Default targets
#####################################################################
include $(CFG)/makefile.def heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
$(COMPILER) -Sg $(INC)/heaptrc.pp $(REDIR)
#
# Other system-dependent RTL Units
#
# #
# $Log$ # $Log$
# Revision 1.6 1999-02-25 10:01:25 michael # Revision 1.7 1999-06-01 13:23:14 peter
# + Fixed type in strings target # * fixes to work with the new makefile
# # * os2 compiles now correct under linux
# Revision 1.5 1999/02/25 07:39:22 michael
# * Joined strings and sysutils
#
# Revision 1.4 1998/11/24 19:51:21 jonas
# + added warning about TABs
#
# Revision 1.3 1998/10/27 15:14:03 pierre
# * update sys_os2 so that it compiles with current RTL
# (do_isdevice might be wrong !! Daniel could you check this !!)
# * fixed makefile (works from go32v2 compiler)
# I had to remove library=shared !!
# (it tried to use ld with -CD !!)
#
# Revision 1.2 1998/10/11 13:46:31 michael
# Sysutils changes
#
# Revision 1.1 1998/09/10 14:17:51 peter
# -renamed
# #
# #

View File

@ -157,7 +157,7 @@ on return number of bytes of data moved.}
* For a detailed description of this call see the chapter "Character Device * For a detailed description of this call see the chapter "Character Device
Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And Monitors" in the IBM Operating System/2 Version 1.2 I/O Subsystems And
Device Support Volume 1.} Device Support Volume 1.}
function DosMonRead(var InBuf;WaitFlag:byte;var DataBuf; function DosMonRead(var InBuf;WaitFlag:word;var DataBuf;
var ByteCount:word):word; var ByteCount:word):word;
{Establish an input and output buffers to monitor an I/O stream for a character {Establish an input and output buffers to monitor an I/O stream for a character
@ -239,6 +239,8 @@ external 'EMXWRAP' index 404;
{external 'MONCALLS' index 4;} {external 'MONCALLS' index 4;}
function DosMonOpen(DevName:string;var MonHandle:word):word; function DosMonOpen(DevName:string;var MonHandle:word):word;
var
i : byte;
begin begin
if DevName[0]=#255 then if DevName[0]=#255 then
begin begin

View File

@ -100,6 +100,13 @@ const UnusedHandle=$ffff;
StdOutputHandle=1; StdOutputHandle=1;
StdErrorHandle=2; StdErrorHandle=2;
var
{ C-compatible arguments and environment }
argc : longint;external name '_argc';
argv : ppchar;external name '_argv';
envp : ppchar;external name '_environ';
implementation implementation
{$I SYSTEM.INC} {$I SYSTEM.INC}
@ -669,10 +676,11 @@ var pib:Pprocessinfoblock;
begin begin
{Determine the operating system we are running on.} {Determine the operating system we are running on.}
asm asm
movl $0,os_mode
movw $0x7f0a,%ax movw $0x7f0a,%ax
call syscall call syscall
testw $512,%bx {Bit 9 is OS/2 flag.} testw$512,%bx {Bit 9 is OS/2 flag.}
setnzl os_mode setnzb os_mode
testw $4096,%bx testw $4096,%bx
jz .LnoRSX jz .LnoRSX
movl $2,os_mode movl $2,os_mode
@ -742,7 +750,11 @@ begin
end. end.
{ {
$Log$ $Log$
Revision 1.15 1999-05-17 21:52:44 florian Revision 1.16 1999-06-01 13:23:16 peter
* fixes to work with the new makefile
* os2 compiles now correct under linux
Revision 1.15 1999/05/17 21:52:44 florian
* most of the Object Pascal stuff moved to the system unit * most of the Object Pascal stuff moved to the system unit
} }