3 # This file is part of the Free Pascal run time library.
4 # Copyright (c) 1999-2000 by Michael van Canneyt
6 # Makefile for the Free Pascal PalmOS Runtime Library
8 # See the file COPYING.FPC, included in this distribution,
9 # for details about the copyright.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 #####################################################################
17 # Start of configurable section.
18 # Please note that all these must be set in the main makefile, and
19 # should be set there.
20 # Don't remove the indef statements. They serve to avoid conflicts
21 # with the main makefile.
22 #####################################################################
24 # What is the Operating System ?
29 # What is the target operating system ?
31 override OS_TARGET
=palmos
34 # What compiler to use ?
39 # What options to pass to the compiler ?
40 # You may want to specify a config file or error definitions file here.
51 # If this is set, all units will be put in the same library.
52 # If it is empty (default), the units will be left in separate files.
58 # Should the library be shared or static (only if LIBNAME is set).
59 # Set this to 'shared' or 'static' to create a librrary
60 # Setting this to shared will disable smart linking.
66 # Where is the PPUMOVE program ?
71 #####################################################################
72 # End of configurable section.
73 # Do not edit after this line.
74 #####################################################################
75 override OS_TARGET
=palmos
78 #####################################################################
80 #####################################################################
82 # Where are the include files
87 OBJPASDIR
=$(RTL
)/objpas
89 # Get some defaults for Programs and OSes.
90 # This will set the following variables :
91 # inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
92 # It will also set OPT for cross-compilation, and add required options.
93 # also checks for config file.
94 # it expects INC PROCINC to be set !!
95 include $(CFG
)/makefile.cfg
97 # Get the system independent include file names.
98 # This will set the following variables :
100 include $(INC
)/makefile.inc
101 SYSINCDEPS
=$(addprefix $(INC
)/,$(SYSINCNAMES
))
103 # Get the processor dependent include file names.
104 # This will set the following variables :
106 include $(PROCINC
)/makefile.cpu
107 SYSCPUDEPS
=$(addprefix $(PROCINC
)/,$(CPUINCNAMES
))
109 # Put system unit dependencies together.
110 SYSDEPS
=$(SYSINCDEPS
) $(SYSCPUDEPS
)
112 #####################################################################
114 #####################################################################
116 # Check if we need C library.
117 ifeq ($(LINK_TO_C
),YES
)
118 override OPT
:=$(OPT
) -dCRTLIB
121 # Define PalmOS units
122 SYSTEMPPU
= syspalm.ppu
131 # Add Prefix and Suffixes
132 OBJLOADERS
=$(addsuffix $(OEXT
), $(LOADERS
))
133 PPUOBJECTS
=$(addsuffix $(PPUEXT
), $(OBJECTS
))
135 .PHONY
: all install clean \
139 all : $(OBJLOADERS
) $(PPUOBJECTS
)
142 $(MKDIR
) $(UNITINSTALLDIR
)
143 $(INSTALL
) *$(PPUEXT
) *$(OEXT
) $(UNITINSTALLDIR
)
146 -$(DEL
) *$(OEXT
) *$(ASMEXT
) *$(PPUEXT
) *.PPS log
148 #####################################################################
150 #####################################################################
156 #prt0$(OEXT) : $(LOADERAS)
157 # -as $(LOADERAS) -o prt0$(OEXT)
159 #gprt0$(OEXT) : $(GLOADERAS)
160 # -as $(GLOADERAS) -o gprt0$(OEXT)
163 # Base Units (System, strings, os-dependent-base-unit)
166 $(SYSTEMPPU
) : syspalm.pp
$(SYSLINUXDEPS
) $(SYSDEPS
)
167 $(COMPILER
) -Us
-Sg syspalm.pp
$(REDIR
)
169 # strings$(PPUEXT) : ../template/strings.pp $(SYSTEMPPU)
170 # $(COPY) ../template/strings.pp .
171 # $(PP) $(OPT) strings $(REDIR)
175 # Delphi Object Model
178 # objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
179 # $(COPY) $(OBJPASDIR)/objpas.pp .
180 # $(PP) $(OPT) objpas $(REDIR)
184 # System Dependent Units
188 # TP7 Compatible RTL Units
191 #dos$(PPUEXT) : $(DOSDEPS) $(SYSTEMPPU)
192 # $(PP) $(OPT) dos $(REDIR)
194 #crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(INC)/filerec.inc $(SYSTEMPPU)
195 # $(PP) $(OPT) crt $(REDIR)
197 #objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
198 # $(COPY) $(INC)/objects.pp .
199 # $(PP) $(OPT) objects $(REDIR)
206 #####################################################################
208 #####################################################################
212 make
all SMARTLINK
=YES LIBNAME
=fpc LIBTYPE
=static
217 $(PPUMOVE
) -o fpc
$(SHAREDLIBFILES
)
219 staticlibinstall
: staticlib
220 $(MKDIR
) $(STATIC_LIBINSTALLDIR
)
221 $(MKDIR
) $(STATIC_UNITINSTALLDIR
)
222 $(INSTALLEXE
) libfpc
$(STATICLIBEXT
) $(STATIC_LIBINSTALLDIR
)
223 $(INSTALL
) *$(PPUEXT
) *$(OEXT
) $(STATIC_UNITINSTALLDIR
)
225 sharedlibinstall
: sharedlib
226 $(MKDIR
) $(SHARED_LIBINSTALLDIR
)
227 $(MKDIR
) $(SHARED_UNITINSTALLDIR
)
228 $(INSTALLEXE
) libfpc
$(SHAREDLIBEXT
) $(SHARED_LIBINSTALLDIR
)
229 $(INSTALL
) *$(PPUEXT
) *$(OEXT
) $(SHARED_UNITINSTALLDIR
)
232 libinstall
: staticlibinstall sharedlibinstall
235 -$(DEL
) *$(SMARTLIBEXT
) *$(SHAREDLIBEXT
) *$(PPLEXT
)
237 #####################################################################
239 #####################################################################
241 include $(CFG
)/makefile.def
245 # Revision 1.1 2002/02/19 08:26:08 sasu
248 # Revision 1.1 2000/07/13 06:31:10 michael
251 # Revision 1.5 2000/01/07 16:41:50 daniel
254 # Revision 1.4 2000/01/07 16:32:34 daniel
255 # * copyright 2000 added
257 # Revision 1.3 1998/10/14 10:31:28 florian
260 # Revision 1.2 1998/10/02 09:26:03 peter
263 # Revision 1.1 1998/09/10 14:15:51 peter
264 # - renamed makefile to Makefile