]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/MAI/bios_emulator/scitech/src/pm/makefile
* Patch by Thomas Frieden, 13 Nov 2002:
[karo-tx-uboot.git] / board / MAI / bios_emulator / scitech / src / pm / makefile
1 #############################################################################
2 #
3 #                   Copyright (C) 1996 SciTech Software.
4 #                           All rights reserved.
5 #
6 # Descripton:   Generic makefile for the PM library. Builds the library
7 #               file and all test programs.
8 #
9 #############################################################################
10
11 .IMPORT .IGNORE : DEBUG_AGP_DRIVER TEST_HARNESS DEBUG_SDDPMI
12
13 #----------------------------------------------------------------------------
14 # Add DOS extender dependant flags to command line
15 #----------------------------------------------------------------------------
16
17 CFLAGS          += $(DX_CFLAGS)
18 ASFLAGS         += $(DX_ASFLAGS)
19 NO_PMLIB        := 1
20
21 #----------------------------------------------------------------------------
22 # Include definitions specific for the target system
23 #----------------------------------------------------------------------------
24
25 .IF $(USE_VXD)
26
27 # Building for Win32 VxD (minimal PM library implementation)
28
29 LIBNAME         = pm
30 OBJECTS         = pm$O vflat$O ztimer$O cpuinfo$O mtrr$O fileio$O pcilib$O \
31                   agp$O malloc$O vgastate$O gavxd$O _pm$O _mtrr$O _cpuinfo$O \
32                   _int64$O _pcihelp$O
33 DEPEND_SRC      := vxd;common;codepage;tests
34 .SOURCE:           vxd common codepage tests
35
36 .ELIF $(USE_NTDRV)
37
38 # Building for NT device drivers (minimal PM library implementation)
39
40 LIBNAME         = pm
41 OBJECTS         = pm$O vflat$O ztimer$O cpuinfo$O mtrr$O mem$O irq$O int86$O \
42                   stdio$O stdlib$O pcilib$O agp$O malloc$O vgastate$O gantdrv$O \
43                   _pm$O _mtrr$O _cpuinfo$O _int64$O _pcihelp$O _irq$O
44 DEPEND_SRC      := ntdrv;common;codepage;tests
45 .SOURCE:           ntdrv common codepage tests
46
47 .ELIF $(USE_WIN32)
48
49 # Building for Win32
50
51 CFLAGS          += -DUSE_OS_JOYSTICK
52 LIBNAME         = pm
53 OBJECTS         = pm$O vflat$O event$O ddraw$O ztimer$O cpuinfo$O pcilib$O \
54                   agp$O malloc$O vgastate$O gawin32$O ntservc$O _joy$O _cpuinfo$O \
55                   _int64$O _pcihelp$O
56 DEPEND_SRC      := win32;common;codepage;tests
57 .SOURCE:           win32 common codepage tests
58
59 .ELIF $(USE_OS232)
60
61 # Building for OS/2
62
63 .IF $(USE_OS2GUI)
64 LIBNAME         = pm_pm
65 .ELSE
66 LIBNAME         = pm
67 .ENDIF
68 OBJECTS         = pm$O vflat$O event$O ztimer$O cpuinfo$O mtrr$O pcilib$O \
69                   agp$O malloc$O vgastate$O gaos2$O _pmos2$O _joy$O _cpuinfo$O \
70                   _int64$O _pcihelp$O dossctl$O
71 DEPEND_SRC      := os2;common;codepage;tests
72 .SOURCE:           os2 common codepage tests
73
74 .ELIF $(USE_QNX)
75
76 # Building for QNX
77
78 USE_BIOS        := 1
79 .IF $(USE_PHOTON)
80 LIBNAME         = pm_ph
81 .ELIF $(USE_X11)
82 LIBNAME         = pm_x11
83 .ELSE
84 LIBNAME         = pm
85 .ENDIF
86 OBJECTS         = pm$O vflat$O event$O ztimer$O cpuinfo$O mtrr$O pcilib$O \
87                   agp$O malloc$O mtrrqnx$O unixio$O vgastate$O gaqnx$O _joy$O \
88                   _mtrrqnx$O _cpuinfo$O _int64$O _pcihelp$O
89 DEPEND_SRC      := qnx;common;codepage;tests
90 .SOURCE:           qnx common codepage tests
91
92 # Indicate that this program uses Nucleus device drivers (so needs I/O access)
93 USE_NUCLEUS     := 1
94
95 .ELIF $(USE_LINUX)
96
97 # Building for Linux
98
99 CFLAGS          += -DENABLE_MTRR -DUSE_OS_JOYSTICK
100 .IF $(USE_X11)
101 LIBNAME         = pm_x11
102 .ELSE
103 LIBNAME         = pm
104 .ENDIF
105 OBJECTS         = pm$O vflat$O event$O ztimer$O cpuinfo$O pcilib$O \
106                   agp$O malloc$O unixio$O vgastate$O galinux$O _cpuinfo$O \
107                   _int64$O _pcihelp$O
108 DEPEND_SRC      := linux;common;codepage;tests;x11
109 .SOURCE:           linux common codepage tests x11
110
111 # Building a shared library
112 .IF $(SOFILE)
113 LIB             := ld
114 LIBFLAGS        := -r -o
115 CFLAGS          += -fPIC
116 .ENDIF
117
118 .ELIF $(USE_BEOS)
119
120 # Building for BeOS GUI
121
122 LIBNAME         = pm
123 OBJECTS         = pm$O vflat$O event$O ztimer$O cpuinfo$O pcilib$O \
124                   agp$O malloc$O vgastate$O gabeos$O _joy$O _cpuinfo$O \
125                   _int64$O _pcihelp$O
126 DEPEND_SRC      := beos;common;codepage;tests
127 .SOURCE:           beos common codepage tests
128
129 .ELIF $(USE_SMX32)
130
131 # Building for SMX
132
133 LIBNAME         = pm
134 OBJECTS         = pm$O pmsmx$O vflat$O event$O ztimer$O cpuinfo$O mtrr$O pcilib$O \
135                   agp$O malloc$O vgastate$O gasmx$O _pm$O _pmsmx$O _mtrr$O _event$O \
136                   _joy$O _cpuinfo$O _int64$O _pcihelp$O _lztimer$O
137 DEPEND_SRC      := smx;common;codepage;tests
138 .SOURCE:           smx common codepage tests
139
140 .ELIF $(USE_RTTARGET)
141
142 # Building for RTTarget-32
143
144 LIBNAME         = pm
145 OBJECTS         = pm$O vflat$O event$O ztimer$O cpuinfo$O mtrr$O pcilib$O \
146                   agp$O malloc$O vgastate$O gartt$O _mtrr$O _joy$O _cpuinfo$O \
147                   _int64$O _pcihelp$O
148 DEPEND_SRC      := rttarget;common;codepage;tests
149 .SOURCE:           rttarget common codepage tests
150
151 .ELSE
152
153 # Building for MSDOS
154
155 LIBNAME         = pm
156 OBJECTS         = pm$O pmdos$O vflat$O event$O ztimer$O cpuinfo$O mtrr$O \
157                   agp$O malloc$O pcilib$O vgastate$O gados$O \
158                   _pm$O _pmdos$O _mtrr$O _vflat$O _event$O _joy$O _pcihelp$O \
159                   _cpuinfo$O _int64$O _lztimer$O _dma$O
160 DEPEND_SRC      := dos;common;codepage;tests
161 .SOURCE:           dos common codepage tests
162
163 .ENDIF
164
165 # Object modules for keyboard code pages
166
167 OBJECTS         += us_eng$O
168
169 # Common object modules
170
171 OBJECTS         += common$O
172 .IF $(CHECKED)
173 OBJECTS         += debug$O
174 .ENDIF
175
176 # Nucleus loader library object modules. Note that when compiling a test harness
177 # library we need to exclude the Nucleus loader library.
178
179 .IF $(TEST_HARNESS)
180 CFLAGS          += -DTEST_HARNESS -DPMLIB
181 LIBNAME         = pm_test
182 .ELSE
183 OBJECTS         += galib$O _ga_imp$O
184 .ENDIF
185
186 .IF $(DEBUG_SDDPMI)
187 CFLAGS          += -DDEBUG_SDDPMI
188 .ENDIF
189
190 # AGP library object modules
191
192 .IF $(DEBUG_AGP_DRIVER)
193 CFLAGS          += -DDEBUG_AGP_DRIVER
194 OBJECTS         += agplib$O
195 .ELSE
196 OBJECTS         += agplib$O peloader$O libcimp$O _gatimer$O
197 .ENDIF
198
199 #----------------------------------------------------------------------------
200 # Name of library and generic object files required to build it
201 #----------------------------------------------------------------------------
202
203 .IF $(STKCALL)
204 LIBFILE         = s$(LP)$(LIBNAME)$L
205 .ELSE
206 LIBFILE         = $(LP)$(LIBNAME)$L
207 .ENDIF
208 LIBCLEAN        = *.lib *.a
209
210 #----------------------------------------------------------------------------
211 # Change destination for library file depending the extender being used. This
212 # is only necessary for DOS extender since the file go into a subdirectory
213 # in the normal library directory, one for each supported extender. Other
214 # OS'es put the file into the regular library directory, since there is
215 # only one per OS in this case.
216 #----------------------------------------------------------------------------
217
218 MK_PMODE        = 1
219
220 .IF $(TEST_HARNESS)
221 LIB_DEST        := $(LIB_BASE)
222 .ELIF $(USE_TNT)
223 LIB_DEST        := $(LIB_BASE)\tnt
224 .ELIF $(USE_DOS4GW)
225 LIB_DEST        := $(LIB_BASE)\dos4gw
226 .ELIF $(USE_X32)
227 LIB_DEST        := $(LIB_BASE)\x32
228 .ELIF $(USE_DPMI16)
229 LIB_DEST        := $(LIB_BASE)\dpmi16
230 .ELIF $(USE_DPMI32)
231 LIB_DEST        := $(LIB_BASE)\dpmi32
232 .ELIF $(USE_DOSX)
233 LIB_DEST        := $(LIB_BASE)\dosx
234 .END
235
236 #----------------------------------------------------------------------------
237 # Names of all executable files built
238 #----------------------------------------------------------------------------
239
240 .IF $(USE_REALDOS)
241 EXEFILES        = memtest$E biosptr$E video$E isvesa$E callreal$E       \
242                   mouse$E tick$E key$E key15$E brk$E altbrk$E           \
243                   critical$E altcrit$E vftest$E rtc$E getch$E           \
244                   cpu$E timerc$E timercpp$E showpci$E uswc$E block$E
245 .ELSE
246 EXEFILES        = memtest$E video$E isvesa$E callreal$E vftest$E getch$E \
247                   cpu$E timerc$E timercpp$E showpci$E uswc$E block$E \
248                   save$E restore$E
249 .ENDIF
250
251 all: $(EXEFILES)
252
253 $(EXEFILES): $(LIBFILE)
254
255 memtest$E:  memtest$O
256 biosptr$E:  biosptr$O
257 video$E:    video$O
258 isvesa$E:   isvesa$O
259 mouse$E:    mouse$O
260 tick$E:     tick$O
261 key$E:      key$O
262 key15$E:    key15$O
263 brk$E:      brk$O
264 altbrk$E:   altbrk$O
265 critical$E: critical$O
266 altcrit$E:  altcrit$O
267 callreal$E: callreal$O
268 vftest$E:   vftest$O
269 rtc$E:      rtc$O
270 getch$E:    getch$O
271 cpu$E:      cpu$O
272 timerc$E:   timerc$O
273 timercpp$E: timercpp$O
274 showpci$E:  showpci$O
275 uswc$E:     uswc$O
276 block$E:    block$O
277 save$E:     save$O
278 restore$E:  restore$O
279 test$E:     test$O _test$O
280
281 #----------------------------------------------------------------------------
282 # Define the list of object files to create dependency information for
283 #----------------------------------------------------------------------------
284
285 DEPEND_OBJ      := $(OBJECTS) memtest$O biosptr$O video$O isvesa$O mouse$O  \
286                    tick$O key$O key$O brk$O altbrk$O critical$O altcrit$O   \
287                    callreal$O vftest$O getch$O timercpp$O
288
289 .INCLUDE: "$(SCITECH)/makedefs/common.mk"
290