Changeset 238 for OCO/trunk/makefile


Ignore:
Timestamp:
Aug 13, 2007, 1:23:41 AM (13 years ago)
Author:
Brendan Oakley
Message:

Mike's new build system, switch to wasm and use Mike's new OWDDK

File:
1 moved

Legend:

Unmodified
Added
Removed
  • OCO/trunk/makefile

    r237 r238  
    1 NMAKEOPTS=-f makefile.os2
     1#**************************************************************************
     2#
     3# Top level makefile for the uniaud16 with Open Watcom 1.7 and above
     4#
     5# MAKEFILE is maintained by Michael Greene <greenemk@cox.net>
     6#
     7# Copyright (c) 2007 The UNIAUD Group Contributors. All Rights Reserved.
     8#
     9#**************************************************************************
     10#
     11# Options:
     12#
     13#    wmake [ibm] (drv | debug)"
     14#
     15#       ibm          - optional - I guess, sets IBM_BUILD
     16#       drv or debug - mandatory build type
     17#
     18#           ** You must maintain order of options **
     19#
     20#       clean        - remove all build files and directories
     21#
     22#**************************************************************************
     23#
     24# Actions:
     25#
     26#
     27#    An example command line:
     28#
     29#       wmake ibm debug
     30#
     31#    will build a debug ibm version (whatever IBM means).
     32#
     33#**************************************************************************
    234
    3 !if "$(DEBUG)" == "1"
    4 NMAKEOPTS += DEBUG=1
     35
     36# do a dummy check - is WATCOM env variable defined?
     37!ifndef %WATCOM
     38!error **** Variable WATCOM not define! Run owsetup.cmd and try again. ****
    539!endif
    640
    7 !if "$(IBM_BUILD)" == "1"
    8 NMAKEOPTS += IBM_BUILD=1
     41# this sets DEBUG on recurse
     42#!ifdef %DEBUG
     43#DEBUG = 1
     44#!error
     45#!endif
     46
     47#******************* Display options *********************
     48# Displays all build options for this makefile
     49#
     50# Default when wmake executed without options
     51#
     52default: .SYMBOLIC
     53  @echo ============================================================
     54  @echo Open Watcom build instructions:
     55  @echo   "wmake drv or debug"
     56  @echo.
     57  @echo   clean - remove all build files and directories
     58  @echo.
     59  @echo   fullclean - same clean plus top level sys files
     60  @echo.
     61
     62#********************** Build rules **********************
     63#
     64# Main targets, can have one or more option targets below:
     65#
     66#  drv    - build release driver
     67#  debug  - builds debug version
     68#
     69# Single targets:
     70#
     71#  clean - remove build files
     72#  fullclean - same clean plus top level sys files
     73
     74
     75# build release rule
     76drv: .SYMBOLIC
     77  @%make alsasetup
     78  @%make build
     79
     80# build debug rule
     81debug: .SYMBOLIC
     82  @set DEBUG=1
     83  @wmake drv
     84
     85# clean rules
     86clean: .SYMBOLIC
     87  @%make alsasetup
     88  @wmake -f $(%UNIBASE16)\mif\fullclean.mif clean
     89
     90# big slam - get rid of all
     91fullclean: .SYMBOLIC
     92  @%make alsasetup
     93  @wmake -f $(%UNIBASE16)\mif\fullclean.mif fullclean
     94
     95# ***** end of build rules *****
     96
     97
     98# The build rule is executed on the second run of this
     99# makefile with all options set
     100build: .PROCEDURE
     101
     102  # setup for release or debug build
     103  @if not exist $(%BUILDDIR) @mkdir $(%BUILDDIR)
     104!ifeq %DEBUG 1
     105  @echo Message BUILDING DEBUG VERSION
     106  @if not exist $(%BUILDDIR)\debug @mkdir $(%BUILDDIR)\debug
     107  @cd $(%BUILDDIR)\debug
     108!else
     109  @echo Message BUILDING RELEASE VERSION
     110  @if not exist $(%BUILDDIR)\release @mkdir $(%BUILDDIR)\release
     111  @cd $(%BUILDDIR)\release
    9112!endif
    10113
    11 !if "$(DEBUG)" == "1"
    12 !Message BUILDING DEBUG VERSION
    13 !else
    14 !Message BUILDING RELEASE VERSION
    15 !endif
     114  # we have already CD into build directory, now do versioning
     115  # start mkversion.cmd with oco base as arg
     116  # this creates version.lnk which is used in drvmake.mif linking
     117  # like this:
     118  #    $(LINK) @$(NAME).lnk @version.lnk FILE {$(OBJS) $(RTOBJS)}
     119  #
     120  $(%UNIBASE16)\tools\mkversion.cmd $(%UNIBASE16)
    16121
     122  # build uniaud16.sys
     123  @echo **** BUILDING uniaud16.sys ****
     124  @wmake -f $(%UNIBASE16)\mif\drvmake.mif
    17125
    18 #===================================================================
     126  # build install files
     127  @echo **** BUILDING install ****
     128  @cd $(%UNIBASE16)\install
     129  @wmake
     130  @cd ..
     131
     132# gets required directories and sets environmental variables:
    19133#
    20 #   Specific dependencies
     134# UNIROOT directory above oco for built files and
     135#         to find makefile.inc
    21136#
    22 #===================================================================
    23 all: subdirs
     137# UNIBASE16 the current oco directory
     138#
     139# BUILDDIR the project build directory
     140#
     141alsasetup: .PROCEDURE
     142  @set UNIBASE16=$(%cdrive):$(%cwd)  # uniaud16 root directory
     143  @cd ..
     144  @set UNIROOT=$(%cdrive):$(%cwd)
     145  @cd  $(%UNIBASE16)
     146  @set BUILDDIR = $(%UNIBASE16)\bin
    24147
    25 subdirs: .SYMBOLIC
    26     @echo BUILDING runtime
    27     @cd runtime
    28     @wmake $(NMAKEOPTS)
    29     @cd ..
    30     @echo BUILDING drv16
    31     @cd drv16
    32     @wmake $(NMAKEOPTS)
    33     @cd ..
    34     @echo BUILDING install
    35     @cd install
    36     @wmake $(NMAKEOPTS)
    37     @cd ..
    38 
    39 clean: .SYMBOLIC
    40     @echo BUILDING runtime
    41     @cd runtime
    42     @wmake $(NMAKEOPTS) clean
    43     @cd ..
    44     @echo BUILDING drv16
    45     @cd drv16
    46     @wmake $(NMAKEOPTS) clean
    47     @cd ..
    48     @echo BUILDING install
    49     @cd install
    50     @wmake $(NMAKEOPTS) clean
    51     @cd ..
Note: See TracChangeset for help on using the changeset viewer.