Ignore:
Timestamp:
Jan 25, 2016, 4:22:26 PM (10 years ago)
Author:
rousseau
Message:

And then there were three: (Pm32, Odin32 and Win32) [apitest]

This commit introduces the Odin32 and Win32 variants of ApiTest.
All three are generated from a software-model and composed from
source-snippets, a process that will continue to be enhanced at the
developer site.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/swt/testapp/apitest/GNUmakefile

    r22110 r22112  
     1#! GENINFO :: platform:OS/2, version:20.45, target:ApiTest.generate
    12###############################################################################
    2 # GNUmakefile :: Build the ApiTestPm Program                                  #
     3# GNUmakefile :: Build the ApiTest Program as multiple variants               #
    34# --------------------------------------------------------------------------- #
    4 # For this initial version we start with a PM version because, well, we are   #
    5 # on OS/2! However, this is not the module of focus since it is not directly  #
    6 # connected to the SWT for OS/2 project. Upcoming commits will bring the      #
    7 # Odin32 based and Native Win32 variants.                                     #
     5#                                                                             #
     6# The purpose of the ApiTest Program is to get Odin in a better shape.        #
     7# Currently the main focus is on the Standard Widget Toolkit for OS/2, which  #
     8# is a separate but closely related project in development. For more info see #
     9# the 'doc' directory.                                                        #
     10#                                                                             #
     11# The ApiTest Program can be build as 3 variants:                             #
     12# -----------------------------------------------                             #
     13# o A native Pm32 variant                                                     #
     14#   This variant is not the true focus of ApiTest but is used to investigate  #
     15#   things from the Pm32 angle, especially stuff that Odin32 delegates to Pm. #
     16#                                                                             #
     17# o An Odin32 Based variant                                                   #
     18#   This variant is the true focus of ApiTest and relates to the test-module  #
     19#   of the SwtOs2Demo. That test-module addresses issues encountered through  #
     20#   the SwtOs2 layer while ApiTestOdin addresses these issues by directly     #
     21#   using the Odin32-API. Using this approach makes it easier to determine if #
     22#   issues are caused at the SwtOs2 layer or by Odin.                         #
     23#                                                                             #
     24# o A native Win32 variant                                                    #
     25#   This variant is a PE-executable which causes Odin32 to handle it          #
     26#   differently as apposed to the Odin Based (LX-executable) variant. This    #
     27#   variant also runs Win(e)dows, which enables investigation of the Win32    #
     28#   implementation of those environments. This is especially interesting with #
     29#   regard to the Wine because its sources may contain 'cherries' for Odin.   #
     30#                                                                             #
     31# Currently 2 tool-chains are supported on OS/2:                              #
     32# ----------------------------------------------                              #
     33# o Open Watcom (v1.9+)                                                       #
     34#   This is the default tool-chain for these 'out-of-kBuild' builds, because  #
     35#   it can build all 3 variants, either on OS/2 or on Win(e)dows.             #
     36#   For convenience and compatibility with gcc, the 'owcc' front-end is used. #
     37#                                                                             #
     38# o GNU Compiler Collection for OS/2                                          #
     39#   This is the same tool-chain used by kBuild when building Odin.            #
     40#   Currently the 4.9.2 version is used at the developer site.                #
     41#   This tool-chain can build the Pm32 and Odin32 variants.                   #
     42#                                                                             #
    843###############################################################################
    944
    10 # This is the default target when no targets are specified.
     45#
     46# File Commander User Menu
     47# ------------------------
     48# To ease building from the command-line, a File Commander user-menu is
     49# available. Just navigate with FC/2 to the directory containing this Makefile
     50# and press F2. Besides the normal menu navigation, one can use the hotkeys
     51# to quickly activate the desired entry. For instance, the 'bgo' key-sequence
     52# would build the Odin Based variant using GCC/2, while a sequence of 'ba'
     53# would build all variants using Open Watcom, which is the default tool-chain
     54# for these 'out-of-kBuild' builds of ApiTest.
     55#
     56
     57# Get the name of this Makefile so in can be recursively invoked if needed.
     58# This should always be the first statement, so any include statements should
     59# go *below* this one.
     60SELF:=$(lastword $(MAKEFILE_LIST))
     61
     62# This is the true default target invoked when no targets are specified.
     63# Because only one target can be specified, we redirect to a target called
     64# 'default' where multiple targets can be specified as dependencies.
     65# So any changes to default behavior should not be made here but to the
     66# mentioned 'default' target defined a few paragraphs down.
    1167.DEFAULT_GOAL:=default
    1268
    13 # Use the wl.exe Open Watcom derivative for linking
     69# When using extensions that are not in the default suffixes list, the special
     70# macro '$*' which holds the stem of the target has an empty value when the
     71# recipe is executed. Adding it to the suffixes list solves this. We use the
     72# '.ors' extension (object resource) to hold the translated Win32 resources
     73# for the Odin32 variant.
     74.SUFFIXES: .ors
     75
     76# Use 'wl.exe' for linking
    1477export EMXOMFLD_TYPE=wlink
    1578export EMXOMFLD_LINKER=wl.exe
    1679
    17 # The header, source and output directories relative to this makefile
     80# The header, source and output directories relative to this Makefile
    1881inc=h
    1982src=src
    2083out=out
    2184
    22 # While this is the first target, the true default target is
    23 # specified in .DEFAULT_GOAL above. Here we'll redirect to target 'default'.
    24 all: default
     85# Accumulate Open Watcom Include Directories and compose a ';' separated
     86# include-path with '/' for both for 32-bit OS/2 and 32-bit Windows.
     87WATCOM2:=$(subst \,/,$(WATCOM))
     88OW_OS2V2_INCDIRS:=$
     89OW_OS2V2_INCDIRS+=$(WATCOM2)/h
     90OW_OS2V2_INCDIRS+=$(WATCOM2)/h/os2
     91OW_OS2V2_INCDIRS:=$(strip $(OW_OS2V2_INCDIRS))
     92OW_OS2V2_INCPATH:=$(subst $  ,;,$(OW_OS2V2_INCDIRS))
     93OW_WIN32_INCDIRS:=$
     94OW_WIN32_INCDIRS+=$(WATCOM2)/h
     95OW_WIN32_INCDIRS+=$(WATCOM2)/h/nt
     96OW_WIN32_INCDIRS:=$(strip $(OW_WIN32_INCDIRS))
     97OW_WIN32_INCPATH:=$(subst $  ,;,$(OW_WIN32_INCDIRS))
     98
     99# Accumulate Odin32 Include Directories and compose a ';' separated
     100# include-path from them.
     101ODIN32SDK_INCDIRS:=$
     102ODIN32SDK_INCDIRS+=../../include
     103ODIN32SDK_INCDIRS+=../../include/win
     104ODIN32SDK_INCDIRS+=../../include/win/wine
     105ODIN32SDK_INCDIRS:=$(strip $(ODIN32SDK_INCDIRS))
     106ODIN32SDK_INCPATH:=$(subst $  ,;,$(ODIN32SDK_INCDIRS))
     107
     108# Accumulate Odin32 Library Directories (only one) and compose a ';' separated
     109# library-path from them.
     110ODIN32SDK_LIBDIRS:=$
     111ODIN32SDK_LIBDIRS+=../../out/os2.x86/release/stage/lib
     112ODIN32SDK_LIBDIRS:=$(strip $(ODIN32SDK_LIBDIRS))
     113ODIN32SDK_LIBPATH:=$(subst $  ,;,$(ODIN32SDK_LIBDIRS))
     114
     115# Accumulate Odin32 Libraries
     116ODIN32SDK_LIBS:=$
     117ODIN32SDK_LIBS+=kernel32.lib
     118ODIN32SDK_LIBS+=user32.lib
     119ODIN32SDK_LIBS+=gdi32.lib
     120ODIN32SDK_LIBS:=$(strip $(ODIN32SDK_LIBS))
     121
     122# This macro is invoked by defined but not yet implemented targets
     123define target.not.implemented
     124@echo !!! Target "$@" is not implemented yet... !!!
     125endef
     126
     127# Display an empty line
     128define nl
     129echo.
     130endef
     131
     132# Convert a space or ';' separated list of include dirs to a list of -I flags for gcc
     133define incdirs2flags.gcc
     134$(foreach idir,$(subst ;, ,$(1)),-I$(idir))
     135endef
     136
     137# Convert a space or ';' separated list of library dirs to a list of -L flags for gcc
     138define libdirs2flags.gcc
     139$(foreach ldir,$(subst ;, ,$(1)),-L$(ldir))
     140endef
     141
     142# Convert a space or ';' separated list of library names to a list of -l flags for gcc
     143define libnames2flags.gcc
     144$(foreach lname,$(subst ;, ,$(1)),-l$(lname))
     145endef
     146
     147
     148
     149# ------------------------------------------------------------------- [default]
     150# This is the redirected default target from the '.DEFAULT_GOAL' statement
     151# -----------------------------------------------------------------------------
     152# It gets invoked when no targets are specified. Any changes to the behavior of
     153# the default target should be made here by modifying the dependency list.
     154# Multiple targets can be specified on the dependency list.
     155# Please note that:
     156# When typing 'make', the default is building the 'Odin32' variant with GCC/2.
     157# However, the default from the FC/2 menu is building the 'Odin32' variant with
     158# Open Watcom. This makes is easy to switch between the two: F2 'BD' for 'owcc'
     159# or a command recall (cli:up / fc2:ctrl-up) of 'make' for 'gcc'.
     160# -----------------------------------------------------------------------------
     161default: gcc.build.odin32
    25162#       @echo [$@]
    26163
    27 # PM version of ApiTest
    28 $(out)/ApiTestPm.exe: $(src)/ApiTestPm.cpp $(out)/ApiTestPm.res $(src)/ApiTestPm.def
    29         @echo [$@]
    30         gcc -Zomf -I$(inc) $< -o $@ $(src)/ApiTestPm.def
     164
     165# ----------------------------------------------------------------------- [all]
     166# A 'well-known' target which we forward to building all 3 variants
     167# -----------------------------------------------------------------------------
     168all: owcc.build.all
     169#       @echo [$@]
     170
     171
     172# ------------------------------------------------------------ [owcc.build.all]
     173# This builds all 3 variants using Open Watcom
     174# -----------------------------------------------------------------------------
     175# Double colon targets are executed in sequence and each target can have their
     176# own target-specific macros. We just use them to display the target-name that
     177# is invoked and to be able to selectively comment-out the invocation of
     178# targets declared on the dependency list, which is now split-up over multiple
     179# '::'-targets.
     180# -----------------------------------------------------------------------------
     181owcc.build.all::
     182        @$(nl)
     183        @echo [$@]
     184        @echo Building all 3 variants using Open Watcom
     185owcc.build.all:: owcc.build.pm32
     186owcc.build.all:: owcc.build.odin32
     187owcc.build.all:: owcc.build.win32
     188
     189
     190# ----------------------------------------------------------- [owcc.build.pm32]
     191# This builds the Pm32 variant using Open Watcom
     192# -----------------------------------------------------------------------------
     193# Because the dependency list gets evaluated before the target-specific macros,
     194# $(modulename) is not defined yet. This could be solved by '.SECONDEXPANSION:'
     195# and '$(target-specific-var)', but the 'expandproperties' task used in the
     196# code-generator at the developers site currently eats all the '$' characters.
     197# (Ant::<concat><filterchain><expandproperties/></filterchain></concat>)
     198# So we work around this by using $(eval ...), which has the side-effect that
     199# $(modulename) becomes a global variable, but that has no further impact.
     200# -----------------------------------------------------------------------------
     201owcc.build.pm32::
     202        @$(nl)
     203        @echo [$@]
     204        @echo Building 'Pm32' variant using using Open Watcom
     205owcc.build.pm32:: $(eval modulename:=ApiTestPm)
     206owcc.build.pm32:: cc:=owcc
     207owcc.build.pm32:: cc.flags.sys:=-b os2v2
     208owcc.build.pm32:: cc.flags.pre:=-xc -Wc,"-q -bc" -Wl,"op q" -fo=$(out)/.obj
     209owcc.build.pm32:: cc.flags.pre+=-fd=$(out)/$(modulename).wlk
     210owcc.build.pm32:: cc.flags.pre+=-fm=$(out)/$(modulename).map
     211owcc.build.pm32:: cc.flags.incdirs:=-I. -I$(inc)
     212owcc.build.pm32:: cc.flags.libdirs:=
     213owcc.build.pm32:: cc.flags.libs:=
     214owcc.build.pm32:: cc.flags.post:=
     215owcc.build.pm32:: cc.defines:=-DNULL=0
     216owcc.build.pm32:: module.def:=
     217owcc.build.pm32:: export INCLUDE:=$(OW_OS2V2_INCPATH)
     218owcc.build.pm32:: export LIB:=
     219owcc.build.pm32:: $(out)/$(modulename).exe
     220
     221
     222# --------------------------------------------------------- [owcc.build.odin32]
     223# This builds the Odin32 variant using Open Watcom
     224# -----------------------------------------------------------------------------
     225owcc.build.odin32::
     226        @$(nl)
     227        @echo [$@]
     228        @echo Building 'Odin32' variant using using Open Watcom
     229owcc.build.odin32:: $(eval modulename:=ApiTestOdin)
     230owcc.build.odin32:: cc:=owcc
     231owcc.build.odin32:: cc.flags.sys:=-b os2v2
     232owcc.build.odin32:: cc.flags.pre:=-xc -Wc,"-q -bc" -Wl,"op q" -fo=$(out)/.obj
     233owcc.build.odin32:: cc.flags.pre+=-fd=$(out)/$(modulename).wlk
     234owcc.build.odin32:: cc.flags.pre+=-fm=$(out)/$(modulename).map
     235owcc.build.odin32:: cc.flags.incdirs:=-I. -I$(inc)
     236owcc.build.odin32:: cc.flags.libdirs:=
     237owcc.build.odin32:: cc.flags.libs:=
     238owcc.build.odin32:: cc.flags.post:=-Wl,"file {$(out)/ApiTestOdin.ors} lib {$(ODIN32SDK_LIBS)}"
     239owcc.build.odin32:: cc.defines:=-DNULL=0 -D__i386__ -D__WIN32OS2__
     240owcc.build.odin32:: module.def:=
     241owcc.build.odin32:: export INCLUDE:=$(OW_OS2V2_INCPATH);$(ODIN32SDK_INCPATH)
     242owcc.build.odin32:: export LIB:=$(ODIN32SDK_LIBPATH)
     243owcc.build.odin32:: $(out)/$(modulename).exe
     244
     245
     246# ---------------------------------------------------------- [owcc.build.win32]
     247# This builds the Win32 variant using Open Watcom
     248# -----------------------------------------------------------------------------
     249owcc.build.win32::
     250        @$(nl)
     251        @echo [$@]
     252        @echo Building 'Win32' variant using using Open Watcom
     253owcc.build.win32:: $(eval modulename:=ApiTestWin)
     254owcc.build.win32:: cc:=owcc
     255owcc.build.win32:: cc.flags.sys:=-b nt
     256owcc.build.win32:: cc.flags.pre:=-xc -Wc,"-q -bc" -Wl,"op q" -fo=$(out)/.obj
     257owcc.build.win32:: cc.flags.pre+=-fd=$(out)/$(modulename).wlk
     258owcc.build.win32:: cc.flags.pre+=-fm=$(out)/$(modulename).map
     259owcc.build.win32:: cc.flags.incdirs:=-I. -I$(inc)
     260owcc.build.win32:: cc.flags.libdirs:=
     261owcc.build.win32:: cc.flags.libs:=
     262owcc.build.win32:: cc.flags.post:=
     263owcc.build.win32:: cc.defines:=-DNULL=0
     264owcc.build.win32:: module.def:=
     265owcc.build.win32:: export INCLUDE:=$(OW_WIN32_INCPATH)
     266owcc.build.win32:: export LIB:=
     267owcc.build.win32:: $(out)/$(modulename).exe
     268
     269
     270# ------------------------------------------------------------- [gcc.build.all]
     271# This builds the Pm32 and Odin32 variants using the GNU/2 tool-chain
     272# -----------------------------------------------------------------------------
     273gcc.build.all::
     274        @$(nl)
     275        @echo [$@]
     276        @echo Building 'Pm32' and 'Odin32' variants using GCC/2
     277gcc.build.all:: gcc.build.pm32
     278gcc.build.all:: gcc.build.odin32
     279#gcc.build.all:: gcc.build.win32
     280
     281
     282# ----------------------------------------------------------- [gcc.build.pm32]
     283# This builds the Pm32 variant using the GNU/2 tool-chain
     284# -----------------------------------------------------------------------------
     285gcc.build.pm32::
     286        @$(nl)
     287        @echo [$@]
     288        @echo Building 'Pm32' variant using using GCC/2
     289gcc.build.pm32:: $(eval modulename:=ApiTestPm)
     290gcc.build.pm32:: cc:=gcc
     291gcc.build.pm32:: cc.flags.sys:=-Zomf -Zmap
     292gcc.build.pm32:: cc.flags.pre:=-xc
     293gcc.build.pm32:: cc.flags.incdirs:=-I. -I$(inc)
     294gcc.build.pm32:: cc.flags.libdirs:=
     295gcc.build.pm32:: cc.flags.libs:=
     296gcc.build.pm32:: cc.flags.post:=-Wl,"$(src)/$(modulename).def"
     297gcc.build.pm32:: cc.defines:=-DNULL=0
     298gcc.build.pm32:: module.def:=
     299gcc.build.pm32:: export INCLUDE:=
     300gcc.build.pm32:: export C_INCLUDE_PATH:=
     301gcc.build.pm32:: export CPLUS_INCLUDE_PATH:=
     302gcc.build.pm32:: $(out)/$(modulename).exe
     303
     304
     305# ---------------------------------------------------------- [gcc.build.odin32]
     306# This builds the Odin32 variant using the GNU/2 tool-chain
     307# -----------------------------------------------------------------------------
     308gcc.build.odin32::
     309        @$(nl)
     310        @echo [$@]
     311        @echo Building 'Odin32' variant using using GCC/2
     312gcc.build.odin32:: $(eval modulename:=ApiTestOdin)
     313gcc.build.odin32:: cc:=gcc
     314gcc.build.odin32:: cc.flags.sys:=-Zomf -Zmap
     315gcc.build.odin32:: cc.flags.pre:=-xc
     316gcc.build.odin32:: cc.flags.incdirs:=-I. -I$(inc)
     317gcc.build.odin32:: cc.flags.libdirs:=$(call libdirs2flags.gcc,$(ODIN32SDK_LIBDIRS))
     318gcc.build.odin32:: cc.flags.libs:=$(call libnames2flags.gcc,$(ODIN32SDK_LIBS))
     319gcc.build.odin32:: cc.flags.post:=-Wl,"$(out)/ApiTestOdin.ors" -Wl,"$(src)/$(modulename).def"
     320gcc.build.odin32:: cc.defines:=-DNULL=0 -D__i386__ -D__WIN32OS2__
     321gcc.build.odin32:: export INCLUDE:=$(ODIN32SDK_INCPATH)
     322gcc.build.odin32:: export C_INCLUDE_PATH:=$(ODIN32SDK_INCPATH)
     323gcc.build.odin32:: export CPLUS_INCLUDE_PATH:=$(ODIN32SDK_INCPATH)
     324gcc.build.odin32:: module.def:=
     325gcc.build.odin32:: $(out)/$(modulename).exe
     326
     327
     328# ------------------------------------------------------------- [ApiTestPm.exe]
     329# Build the Pm32 target executable (LX)
     330# -----------------------------------------------------------------------------
     331$(out)/ApiTestPm.exe: $(src)/ApiTestPm.cpp $(out)/ApiTestPm.res $(module.def)
     332        @echo [$@]
     333        $(cc) $(cc.flags.sys) $(cc.flags.pre) $(cc.flags.incdirs) $(cc.flags.libdirs) $(cc.flags.libs) $(cc.flags.post) $(cc.defines) $< -o $@
    31334        wrc -q -bt=os2 -zm $*.res $@
    32335
     336
     337# ------------------------------------------------------------- [ApiTestPm.res]
     338# Compile the Pm32 resources to binary form
     339# -----------------------------------------------------------------------------
    33340$(out)/ApiTestPm.res: $(src)/ApiTestPm.rc
    34341        @echo [$@]
     342        @if not exist $(out) mkdir $(out)
    35343        wrc -q -r -bt=os2 -zm -fo=$@ $<
    36344
    37 # The default target
    38 default: $(out)/ApiTestPm.exe
    39 #       @echo [$@]
    40 
    41 # Redirect to target 'default'
     345
     346# ----------------------------------------------------------- [ApiTestOdin.exe]
     347# Build the Odin32 target executable (LX)
     348# -----------------------------------------------------------------------------
     349$(out)/ApiTestOdin.exe: $(src)/ApiTestOdin.cpp $(out)/ApiTestOdin.ors $(module.def)
     350        @echo [$@]
     351        $(cc) $(cc.flags.sys) $(cc.flags.pre) $(cc.flags.incdirs) $(cc.flags.libdirs) $(cc.flags.libs) $(cc.flags.post) $(cc.defines) $< -o $@
     352
     353
     354# ----------------------------------------------------------- [ApiTestOdin.ors]
     355# Translate the Win32 resource source to binary form
     356# -----------------------------------------------------------------------------
     357# Resources for Odin Based applications (LX) are bound by first translating
     358# the Win32 resource source (.rc) to Assembly and then assembling the assembler
     359# source (.s) to an object file (.ors), which is linked-in when building the
     360# target executable. This target performs those steps and could be considered
     361# a case of 'early binding' as opposed to normal resource binding (.res) which
     362# is done after the target executable is built, which is 'late binding'.
     363# Unlike with regular Odin kBuilds, we do not use the 'rsrc' suffix on the
     364# modulename, but name the object '.ors', which is short for 'object resource'.
     365# The '.ors' file is in regular OMF however.
     366# -----------------------------------------------------------------------------
     367$(out)/ApiTestOdin.ors: $(src)/ApiTestOdin.rc
     368        @echo [$@]
     369        @if not exist $(out) mkdir $(out)
     370        winerc -D__WIN32OS2__ -s $(cc.flags.incdirs) -I$(src) $< -o $*.s
     371        as -Zomf $*.s -o $@
     372
     373
     374# ------------------------------------------------------------ [ApiTestWin.exe]
     375# Build the Win32 target executable (PE)
     376# -----------------------------------------------------------------------------
     377$(out)/ApiTestWin.exe: $(src)/ApiTestWin.cpp $(out)/ApiTestWin.res $(module.def)
     378        @echo [$@]
     379        $(cc) $(cc.flags.sys) $(cc.flags.pre) $(cc.flags.incdirs) $(cc.flags.libdirs) $(cc.flags.libs) $(cc.flags.post) $(cc.defines) $< -o $@ $(module.def)
     380        wrc -q -bt=nt -zm $*.res $@
     381
     382
     383# ------------------------------------------------------------ [ApiTestWin.res]
     384# Compile the Win32 resources to binary form
     385# -----------------------------------------------------------------------------
     386$(out)/ApiTestWin.res: $(src)/ApiTestWin.rc
     387        @echo [$@]
     388        @if not exist $(out) mkdir $(out)
     389        wrc -q -r -bt=nt -zm -fo=$@ $<
     390
     391
     392# --------------------------------------------------------------------- [build]
     393# Redirect to a target that is considered to do the default build
     394# -----------------------------------------------------------------------------
    42395build: default
    43396#       @echo [$@]
    44397
    45 # Cleanup files
     398
     399# ------------------------------------------------------------------ [run.pm32]
     400# Run the Pm32 variant
     401# -----------------------------------------------------------------------------
     402run.pm32: owcc.build.pm32
     403        @echo [$@]
     404        $(out)\ApiTestPm.exe
     405
     406
     407# ---------------------------------------------------------------- [run.odin32]
     408# Run the Odin32 variant
     409# -----------------------------------------------------------------------------
     410# Observation: *** App compiled as WINDOWAPI is started as WINDOWCOMPAT ***
     411# Starting a WINDOWAPI compiled Odin Based app directly (without 'cmd /c')
     412# starts it a WINDOWCOMPAT, thus waiting for it to end and stdout visible on
     413# the console. Using 'cmd /c' makes the starting behave correctly for both
     414# WINDOWCOMPAT and WINDOWAPI. Both 'make' and 'kmk' exhibit this behavior while
     415# 'nmake' (v4.00) does not. I wonder if this is related to the pe/pec quirk
     416# below...
     417# -----------------------------------------------------------------------------
     418run.odin32: owcc.build.odin32
     419        @echo [$@]
     420#       $(out)\ApiTestOdin.exe
     421        cmd /c $(out)\ApiTestOdin.exe
     422
     423
     424# ------------------------------------------------------------- [run.win32.pec]
     425# Run the Win32 variant using pec
     426# -----------------------------------------------------------------------------
     427# Quirk: *** Both pe and pec fail when started from 'make' or 'kmk' ***
     428# The pec.exe program pops up a stange dialog about not finding '?kLIBc?.exe'.
     429# The pe.exe program does not even show anything but returns with an error.
     430# Possibly an environment (shell? / klibc?) issue.
     431# Under investigation; for now 'cmd /c' works around this issue.
     432# -----------------------------------------------------------------------------
     433run.win32.pec: owcc.build.win32
     434        @echo [$@]
     435#       pec $(out)\ApiTestWin.exe
     436        cmd /c pec $(out)\ApiTestWin.exe
     437
     438
     439# ---------------------------------------------------------- [run.win32.win32k]
     440# Run the Win32 variant using the win32k.sys driver
     441# -----------------------------------------------------------------------------
     442run.win32.win32k: owcc.build.win32
     443        @echo [$@]
     444        $(out)\ApiTestWin.exe
     445
     446# ----------------------------------------------------------- [gen.tools.flags]
     447# Dump the usage flags of some tools used
     448# -----------------------------------------------------------------------------
     449gen.tools.flags:
     450        @echo [$@]
     451        -owcc -? 2> .flags.owcc
     452        -wcc386 > .flags.wcc386
     453        -wpp386 > .flags.wpp386
     454        -wcl386 > .flags.wcl386
     455        -gcc --help > .flags.gcc
     456        -gcc --help=common > .flags.gcc.common
     457
     458# --------------------------------------------------------------------- [clean]
     459# Cleanup by removing the complete out-directory
     460# -----------------------------------------------------------------------------
    46461clean:
    47462        @echo [$@]
    48         rm -f -v $(out)/*.exe $(out)/*.res
    49 
    50 # Run the program
    51 run: build
    52         @echo [$@]
    53         $(out)/ApiTestPm.exe
    54 
    55 # Distribute to somewhere (NI)
    56 dist:
    57         @echo [$@]
     463        rm -rf -v $(out)
     464#       rd $(out)
Note: See TracChangeset for help on using the changeset viewer.