Jelajahi Sumber

* charset added

florian 25 tahun lalu
induk
melakukan
13db1a0ef0
2 mengubah file dengan 56 tambahan dan 105 penghapusan
  1. 54 104
      rtl/go32v2/Makefile
  2. 2 1
      rtl/go32v2/Makefile.fpc

+ 54 - 104
rtl/go32v2/Makefile

@@ -1,12 +1,12 @@
 #
-# Makefile generated by fpcmake v1.00 [2000/09/27]
+# Makefile generated by fpcmake v1.00 [2000/08/18]
 #
 
 defaultrule: all
 
 #####################################################################
 # Autodetect OS (Linux or Dos or Windows NT)
-# define inUnix when running under Unix (Linux,FreeBSD)
+# define inlinux when running under linux
 # define inWinNT when running under WinNT
 #####################################################################
 
@@ -23,18 +23,22 @@ nopwd:
 	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
 	@exit
 else
-inUnix=1
+inlinux=1
 endif
 else
 PWD:=$(firstword $(PWD))
 endif
 
 # Detect NT - NT sets OS to Windows_NT
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inUnix
+ifndef inlinux
 ifeq ($(OS),Windows_NT)
 inWinNT=1
-else
+endif
+endif
+
+# Detect OS/2 - OS/2 has OS2_SHELL defined
+ifndef inlinux
+ifndef inWinNT
 ifdef OS2_SHELL
 inOS2=1
 endif
@@ -42,14 +46,14 @@ endif
 endif
 
 # The extension of executables
-ifdef inUnix
-SRCEXEEXT=
+ifdef inlinux
+EXEEXT=
 else
-SRCEXEEXT=.exe
+EXEEXT=.exe
 endif
 
 # The path which is searched separated by spaces
-ifdef inUnix
+ifdef inlinux
 SEARCHPATH=$(subst :, ,$(PATH))
 else
 SEARCHPATH=$(subst ;, ,$(PATH))
@@ -79,11 +83,15 @@ ifndef FPC
 ifdef PP
 FPC=$(PP)
 else
+ifdef inOS2
+FPC=ppos2
+else
 FPC=ppc386
 endif
 endif
-override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+endif
+override FPC:=$(subst $(EXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
 
 # Target OS
 ifndef OS_TARGET
@@ -166,7 +174,7 @@ endif
 
 # Detect FPCDIR
 ifeq ($(FPCDIR),wrong)
-ifdef inUnix
+ifdef inlinux
 override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
 ifeq ($(wildcard $(FPCDIR)/units),)
 override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
@@ -195,7 +203,7 @@ endif
 # Targets
 
 override LOADEROBJECTS+=prt0 exceptn fpu
-override UNITOBJECTS+=$(SYSTEMUNIT) objpas strings go32 dpmiexcp initc ports profile dxeload emu387 dos crt objects printer graph sysutils math typinfo cpu mmx getopts heaptrc lineinfo msmouse varutils
+override UNITOBJECTS+=$(SYSTEMUNIT) objpas strings go32 dpmiexcp initc ports profile dxeload emu387 dos crt objects printer graph sysutils math typinfo cpu mmx getopts heaptrc lineinfo msmouse charset varutils
 override RSTOBJECTS+=math varutils
 
 # Clean
@@ -255,7 +263,7 @@ SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
 ifndef ECHO
 ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(SRCEXEEXT),$(SEARCHPATH))))
+ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(ECHO),)
 ECHO:=echo
 ECHOE:=echo
@@ -296,7 +304,7 @@ endif
 
 # To install files
 ifndef INSTALL
-ifdef inUnix
+ifdef inlinux
 INSTALL:=install -m 644
 else
 INSTALL:=$(COPY)
@@ -305,7 +313,7 @@ endif
 
 # To install programs
 ifndef INSTALLEXE
-ifdef inUnix
+ifdef inlinux
 INSTALLEXE:=install -m 755
 else
 INSTALLEXE:=$(COPY)
@@ -314,7 +322,7 @@ endif
 
 # To make a directory.
 ifndef MKDIR
-ifdef inUnix
+ifdef inlinux
 MKDIR:=install -m 755 -d
 else
 MKDIR:=ginstall -m 755 -d
@@ -338,7 +346,7 @@ LD=ld
 endif
 
 # ppas.bat / ppas.sh
-ifdef inUnix
+ifdef inlinux
 PPAS=ppas.sh
 else
 ifdef inOS2
@@ -349,7 +357,7 @@ endif
 endif
 
 # ldconfig to rebuild .so cache
-ifdef inUnix
+ifdef inlinux
 LDCONFIG=ldconfig
 else
 LDCONFIG=
@@ -357,7 +365,7 @@ endif
 
 # ppumove
 ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(SRCEXEEXT),$(SEARCHPATH))))
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(PPUMOVE),)
 PPUMOVE=
 else
@@ -368,7 +376,7 @@ export PPUMOVE
 
 # ppufiles
 ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(SRCEXEEXT),$(SEARCHPATH))))
+PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(PPUFILES),)
 PPUFILES=
 else
@@ -387,7 +395,7 @@ ifeq ($(OS_TARGET),win32)
 UPXPROG:=1
 endif
 ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(SRCEXEEXT),$(SEARCHPATH))))
+UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(UPXPROG),)
 UPXPROG=
 else
@@ -401,7 +409,7 @@ export UPXPROG
 
 # ZipProg, you can't use Zip as the var name (PFV)
 ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(SRCEXEEXT),$(SEARCHPATH))))
+ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(ZIPPROG),)
 ZIPPROG=
 else
@@ -415,7 +423,7 @@ ZIPEXT=.zip
 
 # Tar
 ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(SRCEXEEXT),$(SEARCHPATH))))
+TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
 ifeq ($(TARPROG),)
 TARPROG=
 else
@@ -438,7 +446,6 @@ endif
 
 # Default needed extensions (Go32v2,Linux)
 LOADEREXT=.as
-EXEEXT=.exe
 PPLEXT=.ppl
 PPUEXT=.ppu
 OEXT=.o
@@ -467,18 +474,9 @@ endif
 
 # Linux
 ifeq ($(OS_TARGET),linux)
-EXEEXT=
-HASSHAREDLIB=1
 FPCMADE=fpcmade.lnx
 endif
 
-# Linux
-ifeq ($(OS_TARGET),freebsd)
-EXEEXT=
-HASSHAREDLIB=1
-FPCMADE=fpcmade.freebsd
-endif
-
 # Win32
 ifeq ($(OS_TARGET),win32)
 PPUEXT=.ppw
@@ -530,17 +528,9 @@ endif
 # Default Directories
 #####################################################################
 
-# Linux and freebsd use unix dirs with /usr/bin, /usr/lib
-ifeq ($(OS_TARGET),linux)
-UNIXINSTALLDIR=1
-endif
-ifeq ($(OS_TARGET),freebsd)
-UNIXINSTALLDIR=1
-endif
-
 # set the prefix directory where to install everything
 ifndef PREFIXINSTALLDIR
-ifdef UNIXINSTALLDIR
+ifdef inlinux
 PREFIXINSTALLDIR=/usr
 else
 PREFIXINSTALLDIR=/pp
@@ -560,7 +550,7 @@ export DESTZIPDIR
 
 # set the base directory where to install everything
 ifndef BASEINSTALLDIR
-ifdef UNIXINSTALLDIR
+ifdef inlinux
 BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
 else
 BASEINSTALLDIR=$(PREFIXINSTALLDIR)
@@ -569,7 +559,7 @@ endif
 
 # set the directory where to install the binaries
 ifndef BININSTALLDIR
-ifdef UNIXINSTALLDIR
+ifdef inlinux
 BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
 else
 BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
@@ -586,7 +576,7 @@ endif
 
 # Where to install shared libraries
 ifndef LIBINSTALLDIR
-ifdef UNIXINSTALLDIR
+ifdef inlinux
 LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
 else
 LIBINSTALLDIR=$(UNITINSTALLDIR)
@@ -595,7 +585,7 @@ endif
 
 # Where the source files will be stored
 ifndef SOURCEINSTALLDIR
-ifdef UNIXINSTALLDIR
+ifdef inlinux
 SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
 else
 SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
@@ -607,7 +597,7 @@ endif
 
 # Where the doc files will be stored
 ifndef DOCINSTALLDIR
-ifdef UNIXINSTALLDIR
+ifdef inlinux
 DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
 else
 DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
@@ -617,7 +607,7 @@ endif
 # Where to install the examples, under linux we use the doc dir
 # because the copytree command will create a subdir itself
 ifndef EXAMPLEINSTALLDIR
-ifdef UNIXINSTALLDIR
+ifdef inlinux
 EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
 else
 EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
@@ -641,7 +631,7 @@ REDIRFILE=log
 endif
 
 ifdef REDIR
-ifndef inUnix
+ifndef inlinux
 override FPC=redir -eo $(FPC)
 endif
 # set the verbosity to max
@@ -688,7 +678,7 @@ endif
 
 # Debug
 ifdef DEBUG
-override FPCOPT+=-gl -dDEBUG
+override FPCOPT+=-g -dDEBUG
 endif
 
 # Release mode (strip, optimize and don't load ppc386.cfg)
@@ -725,27 +715,9 @@ override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
 endif
 
 
-# Target dirs and the prefix to use for clean/install
+# Target dirs
 ifdef TARGETDIR
 override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
 endif
 
 # Add commandline options last so they can override
@@ -779,14 +751,11 @@ endif
 override COMPILER:=$(FPC) $(FPCOPT)
 
 # also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
 ifeq (,$(findstring -s ,$(COMPILER)))
 EXECPPAS=
 else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
 EXECPPAS:=@$(PPAS)
 endif
-endif
 
 #####################################################################
 # Standard rules
@@ -892,11 +861,6 @@ fpc_all: fpc_packages $(FPCMADE)
 fpc_debug:
 	$(MAKE) all DEBUG=1
 
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
 # General compile rules, available for both possible PASEXT
 
 .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
@@ -938,7 +902,7 @@ fpc_smart:
 	$(MAKE) all LINKSMART=1 CREATESMART=1
 
 fpc_shared: all
-ifdef HASSHAREDLIB
+ifdef inlinux
 ifndef LIBNAME
 	@$(ECHO) "LIBNAME not set"
 else
@@ -959,17 +923,11 @@ override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
 endif
 
 ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPUFILES))
 ifdef PPUFILES
 INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
 else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
+INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)))
 endif
-override INSTALLPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
 endif
 
 fpc_showinstall: $(SHOWINSTALLTARGET)
@@ -983,7 +941,7 @@ ifneq ($(INSTALLPPULINKFILES),)
 endif
 ifneq ($(wildcard $(LIBFULLNAME)),)
 	@$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef HASSHAREDLIB
+ifdef inlinux
 	@$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
 endif
 endif
@@ -1011,7 +969,7 @@ endif
 ifneq ($(wildcard $(LIBFULLNAME)),)
 	$(MKDIR) $(LIBINSTALLDIR)
 	$(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inUnix
+ifdef inlinux
 	ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
 endif
 endif
@@ -1072,7 +1030,7 @@ endif
 
 # Temporary path to pack a file
 ifndef PACKDIR
-ifndef inUnix
+ifndef inlinux
 PACKDIR=$(BASEDIR)/pack_tmp
 else
 PACKDIR=/tmp/fpc-pack
@@ -1088,7 +1046,7 @@ endif
 
 # Use tar by default under linux
 ifndef USEZIP
-ifdef inUnix
+ifdef inlinux
 USETAR=1
 endif
 endif
@@ -1130,19 +1088,16 @@ override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
 endif
 
 ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
 ifdef PPUFILES
 CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
 else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
+CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)))
 endif
-override CLEANPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPULINKFILES))
 endif
 
 fpc_clean: $(CLEANTARGET)
 ifdef CLEANEXEFILES
-	-$(DEL) $(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
+	-$(DEL) $(CLEANEXEFILES)
 endif
 ifdef CLEANPPUFILES
 	-$(DEL) $(CLEANPPUFILES)
@@ -1151,7 +1106,7 @@ ifneq ($(CLEANPPULINKFILES),)
 	-$(DEL) $(CLEANPPULINKFILES)
 endif
 ifdef CLEANRSTFILES
-	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
+	-$(DEL) $(CLEANRSTFILES)
 endif
 ifdef EXTRACLEANFILES
 	-$(DEL) $(EXTRACLEANFILES)
@@ -1163,13 +1118,7 @@ endif
 
 fpc_distclean: fpc_clean
 
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=fpc_clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
+fpc_cleanall: $(CLEANTARGET)
 ifdef CLEANEXEFILES
 	-$(DEL) $(CLEANEXEFILES)
 endif
@@ -1351,6 +1300,7 @@ heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
 
 lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
 
+charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMPPU)
 
 #
 # Other system-dependent RTL Units

+ 2 - 1
rtl/go32v2/Makefile.fpc

@@ -9,7 +9,7 @@ units=$(SYSTEMUNIT) objpas strings \
       dos crt objects printer graph \
       sysutils math typinfo \
       cpu mmx getopts heaptrc lineinfo \
-      msmouse varutils
+      msmouse charset varutils
 rst=math varutils
 
 [require]
@@ -172,6 +172,7 @@ heaptrc$(PPUEXT) : $(INC)/heaptrc.pp $(SYSTEMPPU)
 
 lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMPPU)
 
+charset$(PPUEXT) : $(INC)/charset.pp $(SYSTEMPPU)
 
 #
 # Other system-dependent RTL Units