Changeset 8167 for branches


Ignore:
Timestamp:
Apr 1, 2002, 2:42:15 PM (24 years ago)
Author:
bird
Message:

New makesystem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/splittup/src/win32k/win32k.mak

    r7055 r8167  
    1 # $Id: win32k.mak,v 1.13.2.3 2001-10-14 22:57:31 bird Exp $
     1# $Id: win32k.mak,v 1.13.2.4 2002-04-01 12:42:15 bird Exp $
    22
    33#
    4 # Win32k.sys makefile.
     4# win32k.sys
    55#
    6 # Copyright 1998-2001 knut st. osmundsen (kosmunds@csc.com)
    7 #
    8 # Project Odin Software License can be found in LICENSE.TXT
     6# Copyright (c) 1998-2002 knut st. osmundsen (bird@anduin.net)
    97#
    108
    119
    1210#
    13 # Include path definitions, common stuff and our own tools.
     11# Setup.
    1412#
    15 !include makefile.inc
    16 !include ../../makefile.inc
    17 !include win32k.tools.mk
     13PATH_ROOT = ..\..
     14!include $(PATH_ROOT)\tools\make\setup.mak
    1815
    1916
    2017#
    21 # Main targetname
     18# kLib overrides variables.
    2219#
    23 NAME = Win32k
    24 
    25 
    26 #
    27 # Main rules.
    28 #
    29 !if "$(DDKPATH)" == "" || "$(MSCPATH)" == ""  || "$(TOOLKIT)" == "" || "$(VACPATH)" == ""
    30 all:    $(WIN32KBIN)\$(NAME).sys
     20!if [SET KLIB_INC=$(MAKEDIR)\kLib.inc]
    3121!endif
    3222
    3323
    3424#
    35 # Win32k.sys objects and libraries - Don't mess with the order or objects and libraries!
     25# Config.
    3626#
    37 OBJS  =\
    38     $(WIN32KOBJ)\devfirst.obj \
    39     $(WIN32KOBJ)\d16strat.obj \
    40     $(WIN32KOBJ)\d32CallGate.obj \
    41     $(WIN32KOBJ)\d32globals.obj \
    42     $(WIN32KOBJ)\d16globl.obj \
    43     $(WIN32KOBJ)\PerTaskW32kData.obj \
    44     $(WIN32KOBJ)\ldr.obj \
    45     $(WIN32KOBJ)\myldrClose.obj \
    46     $(WIN32KOBJ)\myldrOpen.obj \
    47     $(WIN32KOBJ)\myldrRead.obj \
    48     $(WIN32KOBJ)\myLDRQAppType.obj \
    49     $(WIN32KOBJ)\myldrEnum32bitRelRecs.obj \
    50     $(WIN32KOBJ)\myldrOpenPath.obj \
    51     $(WIN32KOBJ)\myldrOpenPatha.obj \
    52     $(WIN32KOBJ)\myldrFindModule.obj \
    53     $(WIN32KOBJ)\myldrCheckInternalName.obj \
    54     $(WIN32KOBJ)\myldrGetFileName.obj \
    55     $(WIN32KOBJ)\d32Events.obj \
    56     $(WIN32KOBJ)\pe2lx.obj \
    57     $(WIN32KOBJ)\ModuleBase.obj \
    58     $(WIN32KOBJ)\d32Win32kIOCtl.obj \
    59     $(WIN32KOBJ)\d32Win32kOpenClose.obj \
    60     $(WIN32KOBJ)\k32AllocMemEx.obj \
    61     $(WIN32KOBJ)\k32KillProcessEx.obj \
    62     $(WIN32KOBJ)\k32HandleSystemEvent.obj \
    63     $(WIN32KOBJ)\k32ProcessReadWrite.obj \
    64     $(WIN32KOBJ)\k32QueryCallGate.obj \
    65     $(WIN32KOBJ)\k32QueryOTEs.obj \
    66     $(WIN32KOBJ)\k32QueryOptionsStatus.obj \
    67     $(WIN32KOBJ)\k32QuerySystemMemInfo.obj \
    68     $(WIN32KOBJ)\k32SetEnvironment.obj \
    69     $(WIN32KOBJ)\k32SetOptions.obj \
    70     $(WIN32KOBJ)\mytkExecPgm.obj \
    71     $(WIN32KOBJ)\mytkStartProcess.obj \
    72     $(WIN32KOBJ)\vprntf16.obj \
    73     $(WIN32KOBJ)\d32init.obj \
    74     $(WIN32KOBJ)\d16init.obj_init
    75 
    76 LASTOBJ =\
    77     $(WIN32KOBJ)\devlast.obj
    78 
    79 LASTLIB = $(WIN32KOBJ)\lastlib.lib
    80 
    81 LIBS =\
    82     $(ODIN32_LIB)\kKrnlLib.lib \
    83     $(VACPATH)\lib\$(RTLLIB_NRE) \
    84     $(DDKPATH)\lib\os2386.lib \
    85     $(WIN32KOBJ)\devhelp.lib \
    86     $(WIN32KOBJ)\clib.lib
     27TARGET_MODE = SYS
     28TARGET_NAME = win32k
     29MAKEFILE    = $(TARGET_NAME).mak
    8730
    8831
    8932#
    90 # Win32k.sys rule. (Don't mess with the order or objects and libraries!)
     33# Object files.
    9134#
    92 $(NAME).sys: $(WIN32KBIN)\$(NAME).sys
     35TARGET_OBJS =\
     36$(PATH_OBJ)\Win32k_first.$(EXT_LIB)\Win32k_first.$(EXT_LIB)\
     37$(PATH_OBJ)\Win32k_src.$(EXT_LIB)\Win32k_src.$(EXT_LIB)\
    9338
    94 $(WIN32KBIN)\$(NAME).sys:   $(WIN32KBIN)\clfix.exe \
    95                             $(WIN32KBIN)\ignore.exe \
    96                             $(WIN32KINCLUDE)\options.inc \
    97                             $(WIN32KINCLUDE)\api.inc \
    98                             $(WIN32KINCLUDE)\win32k.inc \
    99                             $(OBJS) \
    100                             $(LIBS) \
    101                             $(WIN32KOBJ)\$(NAME)bldlevel.def \
    102                             $(LASTLIB) \
    103                             $(LIBSINIT) \
    104                             $(WIN32KOBJ)\$(@B).lnk \
    105                             win32k.mak makefile.inc ..\..\makefile.inc
    106     -@$(ECHO) recompiling d16globl to get correct build time and date:
    107     $(CC16) -c $(CFLAGS16) $(CDEFINES16) $(CINCLUDES16) -Fo$(WIN32KOBJ)\d16globl.obj \
    108         -Fa$(WIN32KLIST)\d16globl.s dev16\d16globl.c
    109     -@$(ECHO) linking: $@
    110 !ifdef GREP
    111     -4 $(LD) /FORCE $(LFLAGS) @$(WIN32KOBJ)\$(@B).lnk | $(GREP) -v LNK4001 | $(GREP) -v LNK4031
     39TARGET_LIBS =\
     40kKrnlLib\kKrnlLib.$(EXT_LIB)\
     41os2386p.$(EXT_LIB)\
     42os2386.$(EXT_LIB)\
     43os2286p.$(EXT_LIB)\
     44!if "$(BUILD_ENV)" == "VAC308"
     45cppon30.$(EXT_LIB)\
    11246!else
    113     -4 $(LD) $(LFLAGS) @$(WIN32KOBJ)\$(@B).lnk
     47!if "$(BUILD_ENV)" == "VAC365"
     48cpprni36.$(EXT_LIB)\
     49!else
     50$(LIB_C_OBJ)\
    11451!endif
    115     cd $(WIN32KBIN)
    116     @mapsym $(*B).map > nul
    117     cd $(WIN32KBASE)
    118     if not exist $(ODIN32_BIN) $(CREATEPATH) $(ODIN32_BIN)
    119     $(CP) $@ $(ODIN32_BIN)
    120     $(CP) $*.sym $(ODIN32_BIN)
    121     $(CP) $(WIN32KBASE)\$(*B).ddp $(ODIN32_BIN)
     52!endif
     53$(PATH_OBJ)\Win32k_last.$(EXT_LIB)\Win32k_last.$(EXT_LIB)
    12254
    123 # Linker file.
    124 $(WIN32KOBJ)\$(NAME).lnk: win32k.mak makefile.inc ..\..\makefile.inc
    125     echo Creating linkerfile: @<<$(WIN32KOBJ)\$(NAME).lnk
    126 /OUT:$(WIN32KBIN)\$(NAME).sys
    127 /MAP:$(WIN32KBIN)\$(NAME).map
    128 $(OBJS:  =^
    129 )
    130 /IG
    131 $(LIBS:  =^
    132 )
    133 $(LASTLIB)
    134 $(WIN32KOBJ)\$(NAME)bldlevel.def
    135 <<KEEP
     55TARGET_DEPS =\
     56$(PATH_OBJ)\Win32k_last.$(EXT_LIB)\Win32k_last.$(EXT_LIB)
    13657
    137 # Add bldlevel signature to win32k.def - creates temporary win32kbldlevel.def.
    138 $(WIN32KOBJ)\$(NAME)bldlevel.def: $(NAME).def win32k.mak
    139     -$(ECHO) Creates $@ with bldlevel signature string.
    140     $(BLDLEVELINF) $(NAME).def $@ -R"$(NAME).def" \
    141         -V"#define=ODIN32_VERSION,$(ODIN32_INCLUDE)\odinbuild.h" \
    142         -M"#define=ODIN32_BUILD_NR,$(ODIN32_INCLUDE)\odinbuild.h"
    143 
    144 # Last lib - needed to get LASTOBJ in after the importlibraries.
    145 $(LASTLIB): $(LASTOBJ)
    146     -@$(RM) $@ > nul 2> nul
    147     $(ILIB) $@ $**;
     58#SUBDIRS     = kKrnlLib include src
     59SUBDIRS     = include src
    14860
    14961
    15062#
    151 # Win32ktst.exe object configuration.
    152 #   (It should be as identical as possible to win32k.sys.)
    153 #   (Don't mess with the order or objects and libraries!)
     63# Process
    15464#
    155 TSTOBJS =\
    156     $(WIN32KOBJ)\devfirst.obj \
    157     $(WIN32KOBJ)\d16strat.obj \
    158     $(WIN32KOBJ)\d32CallGate.obj \
    159     $(WIN32KOBJ)\d32hlp.obj \
    160     $(WIN32KOBJ)\d32globals.obj \
    161     $(WIN32KOBJ)\d16globl.obj \
    162     $(WIN32KOBJ)\asmutils.obj \
    163     $(WIN32KOBJ)\locks.obj \
    164     $(WIN32KOBJ)\PerTaskW32kData.obj \
    165     $(WIN32KOBJ)\ldr.obj \
    166     $(WIN32KOBJ)\myldrClose.obj \
    167     $(WIN32KOBJ)\myldrOpen.obj \
    168     $(WIN32KOBJ)\myldrRead.obj \
    169     $(WIN32KOBJ)\myLDRQAppType.obj \
    170     $(WIN32KOBJ)\myldrEnum32bitRelRecs.obj \
    171     $(WIN32KOBJ)\myldrOpenPath.obj \
    172     $(WIN32KOBJ)\myldrOpenPatha.obj \
    173     $(WIN32KOBJ)\myldrFindModule.obj \
    174     $(WIN32KOBJ)\myldrCheckInternalName.obj \
    175     $(WIN32KOBJ)\myldrGetFileName.obj \
    176     $(WIN32KOBJ)\d32Events.obj \
    177     $(WIN32KOBJ)\OS2KTCB.obj \
    178     $(WIN32KOBJ)\OS2KPTDA.obj \
    179     $(WIN32KOBJ)\pe2lx.obj \
    180     $(WIN32KOBJ)\ModuleBase.obj \
    181     $(WIN32KOBJ)\d32Win32kIOCtl.obj \
    182     $(WIN32KOBJ)\d32Win32kOpenClose.obj \
    183     $(WIN32KOBJ)\k32AllocMemEx.obj \
    184     $(WIN32KOBJ)\k32KillProcessEx.obj \
    185     $(WIN32KOBJ)\k32HandleSystemEvent.obj \
    186     $(WIN32KOBJ)\k32ProcessReadWrite.obj \
    187     $(WIN32KOBJ)\k32QueryCallGate.obj \
    188     $(WIN32KOBJ)\k32QueryOTEs.obj \
    189     $(WIN32KOBJ)\k32QueryOptionsStatus.obj \
    190     $(WIN32KOBJ)\k32QuerySystemMemInfo.obj \
    191     $(WIN32KOBJ)\k32SetEnvironment.obj \
    192     $(WIN32KOBJ)\k32SetOptions.obj \
    193     $(WIN32KOBJ)\mytkExecPgm.obj \
    194     $(WIN32KOBJ)\mytkStartProcess.obj \
    195     $(WIN32KOBJ)\vprntf16.obj_tst. \
    196     $(WIN32KOBJ)\d32init.obj_tst. \
    197     $(WIN32KOBJ)\d16init.obj_tst_init. \
    198     $(WIN32KOBJ)\$(NAME)tst.obj \
    199     $(WIN32KOBJ)\dh.obj \
    200     $(WIN32KOBJ)\dos.obj \
    201     $(WIN32KOBJ)\dosa.obj \
    202     $(WIN32KOBJ)\init.obj \
    203     $(WIN32KOBJ)\fake.obj \
    204     $(WIN32KOBJ)\fakea.obj \
     65!include $(MAKE_INCLUDE_PROCESS)
    20566
    206 TSTLASTOBJ = $(LASTOBJ)
    207 
    208 TSTLIBS = $(LIBS)
    209 
    210 
    211 #
    212 # Win32ktst.exe rule.
    213 #   This is a test executable; win32k.sys wrapped into an executable with emulation
    214 #   code for most of the OS/2 kernel dependencies.
    215 #
    216 $(NAME)tst.exe: $(WIN32KBIN)\$(NAME)tst.exe
    217     $(CP) $(WIN32KBIN)\$@ $@
    218 $(WIN32KBIN)\$(NAME)tst.exe:    clfix.exe \
    219                                 ignore.exe \
    220                                 Test\TstFakers.c \
    221                                 $(NAME)tst.def \
    222                                 $(TSTOBJS:. = ) \
    223                                 $(TSTLIBS) \
    224                                 $(TSTLASTOBJ) \
    225                                 $(WIN32KOBJ)\$(@B).lnk \
    226                                 win32k.mak makefile.inc ..\..\makefile.inc
    227     -@$(ECHO) linking: $@
    228 !ifdef GREP
    229     -4 $(LD) $(LFLAGS) @$(WIN32KOBJ)\$(@B).lnk | $(GREP) -v LNK4001 | $(GREP) -v LNK4031
    230 !else
    231     -4 $(LD) $(LFLAGS) @$(WIN32KOBJ)\$(@B).lnk
    232 !endif
    233 
    234 # Linker file.
    235 $(WIN32KOBJ)\$(NAME)tst.lnk: win32k.mak makefile.inc ..\..\makefile.inc
    236     echo Creating linkerfile: @<<$(WIN32KOBJ)\$(NAME)tst.lnk
    237 /DEBUG
    238 /OUT:$(WIN32KBIN)\$(NAME)tst.exe
    239 /MAP:$(WIN32KBIN)\$(NAME)tst.map
    240 $(TSTOBJS:  =^
    241 )
    242 /IG
    243 $(TSTLIBS:  =^
    244 )
    245 $(TSTLASTOBJ)
    246 $(NAME)tst.def
    247 <<KEEP
    248 
    249 
    250 
    251 #
    252 #
    253 #   L i b r a r i e s
    254 #
    255 #
    256 
    257 #
    258 # Libraries - segments are renamed for the 16-bit libraries.
    259 #
    260 
    261 # List of object files in the converted devhelp library.
    262 DHLPOBJS =  +$(WIN32KOBJ)\dhcall5b.obj +$(WIN32KOBJ)\dhcal11a.obj \
    263             +$(WIN32KOBJ)\dhcal11g.obj +$(WIN32KOBJ)\dhret.obj
    264 
    265 # Make corrected devhelp library with only the required object files.
    266 $(WIN32KOBJ)\devhelp.lib: $(DDKPATH)\lib\dhcalls.lib $(WIN32KBIN)\libconv.exe $(DHLPOBJS:+=)
    267     @$(RM) $@
    268     @cd $(WIN32KOBJ)
    269     $(DDKPATH)\tools\lib /nologo $@ $(DHLPOBJS);
    270     @cd $(MAKEDIR)
    271 
    272 # Convert devhelp library.
    273 $(WIN32KOBJ)\devhelp_.lib: $(DDKPATH)\lib\dhcalls.lib
    274     $(WIN32KBIN)\libconv $** $@
    275 
    276 # Extract required object files from the converted devhelp library.
    277 $(DHLPOBJS:+=): $(WIN32KOBJ)\devhelp_.lib
    278     @cd $(WIN32KOBJ)
    279     $(DDKPATH)\tools\lib /nologo $** *$@;
    280     @cd $(MAKEDIR)
    281 
    282 
    283 # List of object files in the converted crt library.
    284 CLIBOBJS =  +$(WIN32KOBJ)\inp.obj       +$(WIN32KOBJ)\outp.obj \
    285             +$(WIN32KOBJ)\anfalmul.obj  +$(WIN32KOBJ)\anfaldiv.obj \
    286             +$(WIN32KOBJ)\anfalrem.obj  +$(WIN32KOBJ)\anfauldi.obj \
    287             +$(WIN32KOBJ)\anuldiv.obj   +$(WIN32KOBJ)\fmemcpy.obj \
    288             +$(WIN32KOBJ)\anulrem.obj   +$(WIN32KOBJ)\anlmul.obj \
    289             +$(WIN32KOBJ)\__AHINCR.obj  +$(WIN32KOBJ)\anlshl.obj
    290 
    291 # Make corrected crt library with only the required object files.
    292 $(WIN32KOBJ)\clib.lib: $(MSCPATH)\lib\clibcep.lib $(WIN32KBIN)\libconv.exe $(CLIBOBJS:+=)
    293     @$(RM) $@
    294     @cd $(WIN32KOBJ)
    295     $(DDKPATH)\tools\lib /nologo $@ $(CLIBOBJS);
    296     @cd $(MAKEDIR)
    297 
    298 # Convert devhelp library.
    299 $(WIN32KOBJ)\clib_.lib: $(MSCPATH)\lib\clibcep.lib
    300     $(WIN32KBIN)\libconv $** $@ > nul
    301 
    302 # Extract required object files from the converted crt library.
    303 $(CLIBOBJS:+=): $(WIN32KOBJ)\clib_.lib
    304     @cd $(WIN32KOBJ)
    305     $(ILIB) $** *$@;
    306     @cd $(MAKEDIR)
    307 
    308 
    309 #
    310 # Make last library.
    311 #
    312 $(WIN32KOBJ)\last.lib: $(WIN32KOBJ)\devlast.obj
    313     -@$(RM) $@ > nul 2> nul
    314     $(ILIB) $@ $**;
    315 
    316 
    317 #
    318 #
    319 #   S o u r c e
    320 #
    321 #
    322 
    323 #
    324 # Make assembly version of options.h; options.inc
    325 #
    326 $(WIN32KINCLUDE)\options.inc:  $(WIN32KINCLUDE)\options.h
    327     @$(ECHO) H2Inc: $**
    328     $(H2INC) $** > $@
    329 
    330 
    331 #
    332 # Make assembly version of api.h; api.inc
    333 #
    334 $(WIN32KINCLUDE)\api.inc:  $(WIN32KINCLUDE)\api.h
    335     @$(ECHO) H2Inc: $**
    336     $(H2INC) $** > $@
    337 
    338 #
    339 # Make assembly version of win32k.h; win32k.inc
    340 #
    341 $(WIN32KINCLUDE)\win32k.inc:  $(ODIN32_INCLUDE)\win32k.h
    342     @$(ECHO) H2Inc: $**
    343     $(H2INC) $** > $@
    344 
    345 
    346 #
    347 #
    348 #   T o o l s
    349 #
    350 #
    351 
    352 #
    353 # Make the convert tool.
    354 #
    355 $(WIN32KBIN)\libconv.exe: kKrnlLib\tools\libconv.c
    356     icc -Q+ -Ti+ -Fe$@ -Fo$(WIN32KOBJ)\$(*B).obj $**
    357 
    358 
    359 #
    360 # Make the clfix.exe utillity - clfix.exe
    361 #   This should fix some of the problems we are experiencing with the
    362 #   MSC v6.0a compiler (cl.exe) (16-bit).
    363 #
    364 $(WIN32KBIN)\clfix.exe: kKrnlLib\tools\clfix.c
    365     icc -Q+ -Ti+ -Fe$@ -Fo$(WIN32KOBJ)\$(*B).obj $**
    366 
    367 #
    368 # Ignore utility used to ignore output from icc and linker.
    369 #
    370 $(WIN32KBIN)\ignore.exe: kKrnlLib\tools\ignore.c
    371     icc -Q+ -Ti+ -Fe$@ -Fo$(WIN32KOBJ)\$(*B).obj $**
    372 
    373 
    374 #
    375 # Include the .depend file.
    376 #
    377 !if [$(EXISTS) .depend] == 0
    378 !   include .depend
    379 !else
    380 !   if [$(ECHO) .depend doesn't exist]
    381 !   endif
    382 !endif
    383 
Note: See TracChangeset for help on using the changeset viewer.