summaryrefslogtreecommitdiff
path: root/fpcsrc/rtl/palmos/Makefile.fpc
blob: b9645cf7becc907f351157df2fe4841a7694ded8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#
#   Makefile.fpc for Free Pascal WinCE RTL
#

[package]
main=rtl

[target]
loaders= prt0
units=$(SYSTEMUNIT) ctypes objpas macpas iso7185 strings \
      lnfodwrf lineinfo heaptrc \
      windows messages dynlibs \
      dos objects \
      rtlconsts sysconst sysutils \
      typinfo types fgl classes fmtbcd \
      strutils convutils math dateutils \
      varutils variants \
      matrix ucomplex \
      charset getopts winsock sockets
# initc cmem signals \
#    crt graph \
#    wincrt winmouse winevent  printer \
#    video mouse keyboard \
#    winsysut
implicitunits=exeinfo

# rsts=math varutils typinfo variants classes dateutils sysconst

[require]
nortl=y

[install]
fpcpackage=y

[default]
fpcdir=../..
target=palmos

[compiler]
includedir=$(INC) $(PROCINC) $(RTL)/palmos
sourcedir=$(INC) $(PROCINC) $(COMMON)


[prerules]
# Where are the include files
RTL=..
INC=$(RTL)/inc
COMMON=$(RTL)/common
PROCINC=$(RTL)/$(CPU_TARGET)

UNITPREFIX=rtl

SYSTEMUNIT=system
PRT0=prt0

# Use new feature from 1.0.5 version
# that generates release PPU files
# which will not be recompiled
ifdef RELEASE
override FPCOPT+=-Ur
endif

# Paths
OBJPASDIR=$(RTL)/objpas
GRAPHDIR=$(INC)/graph



[rules]
.NOTPARALLEL:
SYSTEMPPU=syspalm.ppu

# Get the system independent include file names.
# This will set the following variables : 
# SYSINCNAMES
include $(INC)/makefile.inc
SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))

# Get the processor dependent include file names.
# This will set the following variables : 
# CPUINCNAMES
include $(PROCINC)/makefile.cpu
SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))

# Put system unit dependencies together.
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)


#
# Loaders
#

$(PRT0)$(OEXT) : $(CPU_TARGET)/$(PRT0).as
        $(AS) $(ASTARGET) -o $(UNITTARGETDIRPREFIX)$(PRT0)$(OEXT) $(CPU_TARGET)/$(PRT0).as


#
# System Units (System, Objpas, Strings)
#

$(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp $(SYSDEPS)
        $(COMPILER) -Us -Sg $(SYSTEMUNIT).pp

objpas$(PPUEXT): $(OBJPASDIR)/objpas.pp $(INC)/except.inc $(SYSTEMUNIT)$(PPUEXT)
        $(COMPILER) -I$(OBJPASDIR) $(OBJPASDIR)/objpas.pp

strings$(PPUEXT) : $(INC)/strings.pp $(INC)/stringsi.inc\
                   $(PROCINC)/strings.inc $(PROCINC)/stringss.inc\
                   $(SYSTEMUNIT)$(PPUEXT)

#
# System Dependent Units
#

#
# TP7 Compatible RTL Units
#

#dos$(PPUEXT) : $(DOSDEPS) $(SYSTEMPPU)
#	$(PP) $(OPT) dos $(REDIR)

#crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(INC)/filerec.inc $(SYSTEMPPU)
#	$(PP) $(OPT) crt $(REDIR)

#objects$(PPUEXT) : $(INC)/objects.pp objinc.inc $(SYSTEMPPU)
#	$(COPY) $(INC)/objects.pp .
#	$(PP) $(OPT) objects $(REDIR)
#	$(DEL) objects.pp

#
# Other system-independent RTL Units
#

fmtbcd$(PPUEXT) : $(OBJPASDIR)/fmtbcd.pp objpas$(PPUEXT) sysutils$(PPUEXT) variants$(PPUEXT) classes$(PPUEXT) system$(PPUEXT)
        $(COMPILER) $(OBJPASDIR)/fmtbcd.pp

#####################################################################
# Libs
#####################################################################

staticlib:
	make clean
	make all SMARTLINK=YES LIBNAME=fpc LIBTYPE=static

sharedlib:
	make clean
	make all
	$(PPUMOVE) -o fpc $(SHAREDLIBFILES)

staticlibinstall: staticlib
	$(MKDIR) $(STATIC_LIBINSTALLDIR)
	$(MKDIR) $(STATIC_UNITINSTALLDIR)
	$(INSTALLEXE) libfpc$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
	$(INSTALL) *$(PPUEXT) *$(OEXT) $(STATIC_UNITINSTALLDIR)

sharedlibinstall: sharedlib
	$(MKDIR) $(SHARED_LIBINSTALLDIR)
	$(MKDIR) $(SHARED_UNITINSTALLDIR)
	$(INSTALLEXE) libfpc$(SHAREDLIBEXT) $(SHARED_LIBINSTALLDIR)
	$(INSTALL) *$(PPUEXT) *$(OEXT) $(SHARED_UNITINSTALLDIR)
	ldconfig

libinstall: staticlibinstall sharedlibinstall

libsclean : clean
	-$(DEL) *$(SMARTLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)