Ignore:
Timestamp:
Dec 3, 2000, 12:32:41 AM (25 years ago)
Author:
bird
Message:

Adapted to be more comform with the new makefile style.
Most subdirectories are now using the style while the win32k.sys makefile
is not at all - as allways.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/elf2lx/makefile

    r2923 r4715  
    1 ##############################################################################
    2 # $Id: makefile,v 1.2 2000-02-27 02:15:35 bird Exp $
     1# $Id: makefile,v 1.3 2000-12-02 23:32:38 bird Exp $
     2
    33#
    4 # PD-Win32 API
     4# Odin32 API
    55#
    66#       elf2lx.exe makefile
    77#
    8 ##############################################################################
    98
    10 ##############################################################################
    11 # Include
    12 ##############################################################################
     9
     10#
     11# Tell buildenvironment that we're making an vio exe and to invoke additional dep rule
     12#
     13VIO=1
     14EXETARGET=1
     15ADDITIONAL_DEP = mydep
     16
     17
     18#
     19# Compiler, tools, and interference rules thru the win32k makefile.inc file.
     20#
     21!include ..\..\..\makefile.inc
    1322!include ..\makefile.inc
    14 !include $(PDWIN32_INCLUDE)\pdwin32.mk
    1523
    16 ##############################################################################
    17 # Object extention
    18 ##############################################################################
    19 OBJEXT          = elf_obj
    2024
    21 ##############################################################################
    22 # Tools and Flags Addjustments
    23 ##############################################################################
    24 CINCLUDES  = -I$(WIN32KINCLUDE) -I$(PDWIN32_INCLUDE)
    25 CFLAGS     = $(CINCLUDES) $(CFLAGS) -DRING3 -DELF2LX \
    26              -Ge+ -Wall+ppt-ppc-inl-cnv-gnr-vft-gen-uni-ext- -Gm- -Gn- -Ti+ -Rn
    27 CXXFLAGS   = $(CINCLUDES) $(CXXFLAGS) -DRING3 -DELF2LX \
    28              -Ge+ -Wall+ppt-ppc-inl-cnv-gnr-vft- -Gm- -Gn- -Ti+ -Gx -Rn
    29 
    30 LD         = ilink
    31 LDFLAGS    = /nologo /NOI /A:16 /NOE /O:$@ /packcode /packdata \
    32              /MAP:$(WIN32KLIST)\$(@B).map /pmtype:vio /Stack:4096 \
    33 !ifdef DEBUG
    34 !ifndef NODEBUGINFO
    35     /debug /dbgpack
    36 !endif
    37 !else
    38     /exepack:2
     25#
     26# Sanity check
     27#
     28!ifndef WIN32KINCLUDE
     29!error "Fatal error! WIN32KINCLUDE is undefined!"
    3930!endif
    4031
    4132
    42 ##############################################################################
    43 # Interference rules. Note: -Fo is IBMCPP specific.
    44 ##############################################################################
    45 {$(WIN32KMISC)}.c{$(WIN32KOBJ)}.$(OBJEXT):
    46     @echo compiling: $(@B).c
    47     @$(CC) $(CFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$@ $<
    48 
    49 {$(WIN32KMISC)}.cpp{$(WIN32KOBJ)}.$(OBJEXT):
    50     @echo compiling: $(@B).cpp
    51     @$(CXX) $(CXXFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$@ $<
    52 
    53 {$(WIN32KLDR)}.cpp{$(WIN32KOBJ)}.$(OBJEXT):
    54     @echo compiling: $(@B).cpp
    55     @$(CXX) $(CXXFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$@ $<
    56 
    57 .cpp{$(WIN32KOBJ)}.$(OBJEXT):
    58     @echo compiling: $(@B).cpp
    59     @$(CXX) $(CXXFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$@ $<
     33#
     34# Tools and Flags Addjustments
     35#
     36CINCLUDES   = -I$(WIN32KINCLUDE) $(CINCLUDES)
     37CDEFINES    = $(CDEFINES) -DRING3 -DELF2LX
     38!if "$(VAC3)" == "1" || "$(VAC36)" == "1"
     39CFLAGS      = $(CFLAGS)   -Ge+ -Wall+ppt-ppc-inl-cnv-gnr-vft-gen-uni-ext- -Gm- -Gn- -Ti+ -Rn
     40CXXFLAGS    = $(CXXFLAGS) -Ge+ -Wall+ppt-ppc-inl-cnv-gnr-vft-             -Gm- -Gn- -Ti+ -Rn -Gx
     41CLISTING    = -Fa$(OBJDIR)\$(@B).s
     42COBJOUT     = -Fo$(OBJDIR)\$(@B).obj
     43LD2FLAGS    = $(LD2FLAGS) /A:16 /Stack:4096
     44!else
     45!error  "Compiler is not yet supported."
     46!endif
    6047
    6148
    6249#
    63 # Visual slick edit!
     50# Interference rules.
    6451#
     52!if "$(VAC3)" == "1" || "$(VAC36)" == "1"
    6553{$(WIN32KMISC)}.c.obj:
    6654    @echo compiling: $(@B).c
    67     @$(CC) $(CFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$(WIN32KOBJ)\$(@B).$(OBJEXT) $<
     55    @$(CC)  $(CFLAGS)   $(CINCLUDES) $(CDEFINES) -c $(CLISTING) $(COBJOUT) $<
    6856
    6957{$(WIN32KMISC)}.cpp.obj:
    7058    @echo compiling: $(@B).cpp
    71     @$(CXX) $(CXXFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$(WIN32KOBJ)\$(@B).$(OBJEXT) $<
     59    @$(CXX) $(CXXFLAGS) $(CINCLUDES) $(CDEFINES) -c $(CLISTING) $(COBJOUT) $<
    7260
    7361{$(WIN32KLDR)}.cpp.obj:
    7462    @echo compiling: $(@B).cpp
    75     @$(CXX) $(CXXFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$(WIN32KOBJ)\$(@B).$(OBJEXT) $<
     63    @$(CXX) $(CXXFLAGS) $(CINCLUDES) $(CDEFINES) -c $(CLISTING) $(COBJOUT) $<
    7664
    77 .cpp.obj:
     65.cpp{$(OBJDIR)}.obj:
    7866    @echo compiling: $(@B).cpp
    79     @$(CXX) $(CXXFLAGS) -c -Fa$(WIN32KLIST)\$(@B).asm -Fo$(WIN32KOBJ)\$(@B).$(OBJEXT) $<
     67    @$(CXX) $(CXXFLAGS) $(CINCLUDES) $(CDEFINES) -c $(CLISTING) $(COBJOUT) $<
     68!else
     69!error  "Compiler is not yet supported."
     70!endif
    8071
    8172
    82 ##############################################################################
    83 # Main targets.
    84 ##############################################################################
    85 TARGET   =  Elf2Lx
    86 
    87 OBJS     =  $(WIN32KOBJ)\elf2lx.$(OBJEXT) \
    88             $(WIN32KOBJ)\elf2lxmain.$(OBJEXT) \
    89             $(WIN32KOBJ)\modulebase.$(OBJEXT) \
    90             $(WIN32KOBJ)\malloc.$(OBJEXT) \
    91             $(WIN32KOBJ)\smalloc_avl.$(OBJEXT) \
    92             $(WIN32KOBJ)\avl.$(OBJEXT) \
    93             $(WIN32KOBJ)\rmalloc_avl.$(OBJEXT) \
    94             $(WIN32KOBJ)\new.$(OBJEXT) \
    95             $(WIN32KOBJ)\stricmp.$(OBJEXT) \
    96             $(WIN32KOBJ)\vprintf.$(OBJEXT)
    97 
    98 all: ELFDumper.exe $(TARGET).exe
    99 
    100 $(TARGET).exe: $(OBJS)
    101     @echo linking $@
    102     $(LD) $(LDFLAGS) $**
    103     $(CP) $@ $(PDWIN32_BIN)
    104 
    105 ELFDumper.exe: ELFDumper.cpp ..\include\elf.h
    106     $(CXX) $(CXXFLAGS) -Re -Gn- -Fa$(WIN32KLIST)\ELFDumper.asm \
    107         -Fo$(WIN32KOBJ)\ELFDumper.$(OBJEXT) -Fe$@ ELFDumper.cpp
     73#
     74# Object files. Prefix with OBJDIR and one space before the '\'.
     75#
     76OBJS = \
     77$(OBJDIR)\elf2lx.obj \
     78$(OBJDIR)\elf2lxmain.obj \
     79$(OBJDIR)\modulebase.obj \
     80$(OBJDIR)\malloc.obj \
     81$(OBJDIR)\smalloc_avl.obj \
     82$(OBJDIR)\avl.obj \
     83$(OBJDIR)\rmalloc_avl.obj \
     84$(OBJDIR)\new.obj \
     85$(OBJDIR)\stricmp.obj \
     86$(OBJDIR)\vprintf.obj
    10887
    10988
    110 ##############################################################################
    111 # Dependencies.
    112 ##############################################################################
    113 dep:
    114     $(DEPEND) -obj$(OBJEXT) -o..\Object $(CINCLUDES) ..\misc\*.c* ..\include\*.h
     89#
     90# Libraries. One space before the '\'.
     91#
     92LIBS = \
     93$(RTLLIB_NRE) \
     94os2386.lib
    11595
    116 !ifndef NODEP
    117 !include .depend
     96
     97#
     98# Target name - name of the exe without extention and path.
     99#
     100TARGET  = Elf2Lx
     101
     102
     103#
     104# Includes the common rules.
     105#
     106!include $(ODIN32_POST_INC)
     107
     108
     109#
     110# Additional dependencies.
     111#
     112mydep:
     113    $(DEPEND) @<<
     114        -a -o$$(OBJDIR) $(CINCLUDES)
     115        $(WIN32KMISC)\*.c*
     116        $(WIN32KLDR)\*.c*
     117        $(WIN32KINCLUDE)\*.h
     118<<
     119
     120
     121#
     122# Elfdumper.
     123#
     124!if "$(VAC3)" == "1" || "$(VAC36)" == "1"
     125ELFDumper.exe: ELFDumper.cpp ..\include\elf.h
     126    $(CXX) $(CXXFLAGS) $(CINCLUDES) $(CDEFINES) $(CLISTING) $(COBJOUT) -Re -Gn- -Fe$@ ELFDumper.cpp
     127!else
     128!error  "Compiler is not yet supported."
    118129!endif
    119130
    120 ##############################################################################
    121 # Cleanup
    122 ##############################################################################
    123 clean:
    124     @-$(RM) $(OBJS) $(TARGET).exe $(PE2LXLIST)\$(TARGET).map *.pch
    125 
Note: See TracChangeset for help on using the changeset viewer.