1 #############################################################################
3 # Copyright (C) 1996 SciTech Software.
6 # Descripton: Generic makefile for the PM library. Builds the library
7 # file and all test programs.
9 #############################################################################
11 .IMPORT .IGNORE : DEBUG_AGP_DRIVER TEST_HARNESS DEBUG_SDDPMI
13 #----------------------------------------------------------------------------
14 # Add DOS extender dependant flags to command line
15 #----------------------------------------------------------------------------
17 CFLAGS += $(DX_CFLAGS)
18 ASFLAGS += $(DX_ASFLAGS)
21 #----------------------------------------------------------------------------
22 # Include definitions specific for the target system
23 #----------------------------------------------------------------------------
27 # Building for Win32 VxD (minimal PM library implementation)
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 \
33 DEPEND_SRC := vxd;common;codepage;tests
34 .SOURCE: vxd common codepage tests
38 # Building for NT device drivers (minimal PM library implementation)
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
51 CFLAGS += -DUSE_OS_JOYSTICK
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 \
56 DEPEND_SRC := win32;common;codepage;tests
57 .SOURCE: win32 common codepage tests
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
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
92 # Indicate that this program uses Nucleus device drivers (so needs I/O access)
99 CFLAGS += -DENABLE_MTRR -DUSE_OS_JOYSTICK
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 \
108 DEPEND_SRC := linux;common;codepage;tests;x11
109 .SOURCE: linux common codepage tests x11
111 # Building a shared library
120 # Building for BeOS GUI
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 \
126 DEPEND_SRC := beos;common;codepage;tests
127 .SOURCE: beos common codepage tests
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
140 .ELIF $(USE_RTTARGET)
142 # Building for RTTarget-32
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 \
148 DEPEND_SRC := rttarget;common;codepage;tests
149 .SOURCE: rttarget common codepage tests
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
165 # Object modules for keyboard code pages
169 # Common object modules
176 # Nucleus loader library object modules. Note that when compiling a test harness
177 # library we need to exclude the Nucleus loader library.
180 CFLAGS += -DTEST_HARNESS -DPMLIB
183 OBJECTS += galib$O _ga_imp$O
187 CFLAGS += -DDEBUG_SDDPMI
190 # AGP library object modules
192 .IF $(DEBUG_AGP_DRIVER)
193 CFLAGS += -DDEBUG_AGP_DRIVER
196 OBJECTS += agplib$O peloader$O libcimp$O _gatimer$O
199 #----------------------------------------------------------------------------
200 # Name of library and generic object files required to build it
201 #----------------------------------------------------------------------------
204 LIBFILE = s$(LP)$(LIBNAME)$L
206 LIBFILE = $(LP)$(LIBNAME)$L
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 #----------------------------------------------------------------------------
221 LIB_DEST := $(LIB_BASE)
223 LIB_DEST := $(LIB_BASE)\tnt
225 LIB_DEST := $(LIB_BASE)\dos4gw
227 LIB_DEST := $(LIB_BASE)\x32
229 LIB_DEST := $(LIB_BASE)\dpmi16
231 LIB_DEST := $(LIB_BASE)\dpmi32
233 LIB_DEST := $(LIB_BASE)\dosx
236 #----------------------------------------------------------------------------
237 # Names of all executable files built
238 #----------------------------------------------------------------------------
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
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 \
253 $(EXEFILES): $(LIBFILE)
265 critical$E: critical$O
267 callreal$E: callreal$O
273 timercpp$E: timercpp$O
279 test$E: test$O _test$O
281 #----------------------------------------------------------------------------
282 # Define the list of object files to create dependency information for
283 #----------------------------------------------------------------------------
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
289 .INCLUDE: "$(SCITECH)/makedefs/common.mk"