Changeset 238


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

Location:
OCO/trunk
Files:
30 added
15 deleted
3 edited
3 moved

Legend:

Unmodified
Added
Removed
  • OCO/trunk/drv16/init.cpp

    r221 r238  
    6161
    6262
    63 static char szALSA[]      = "OS/2 Universal Audio MMPM/2 Driver v"ALSA_VERSION;
     63static char szALSA[]      = "OS/2 Universal Audio MMPM/2 Driver v"UNIAUD_VERSION;
    6464static char szCopyRight1[]= "Copyright 2000-2002 InnoTek Systemberatung GmbH";
    6565static char szCopyRight2[]= "Copyright 2002 IBM Corporation";
    66 static char szCopyRight3[]= "Maintained by http://uniaud.netlabs.org";
     66static char szCopyRight3[]= "Maintained by Netlabs http://www.netlabs.org";
    6767static char szParamError[]= "Parameter parsing error!!";
    6868#if 0 // fixme to be gone?
     
    147147    if (fVerbose) {
    148148
    149         DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
    150149        DosWrite(1, (VOID FAR*)szALSA, sizeof(szALSA)-1, &result);
    151150        DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
     
    155154        DosWrite(1, (VOID FAR*)szCopyRight2, sizeof(szCopyRight2), &result);
    156155        DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
     156        DosWrite(1, (VOID FAR*)szCopyRight3, sizeof(szCopyRight3), &result);
     157        DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
    157158        DosWrite(1, (VOID FAR*)NEWLINE, sizeof(NEWLINE)-1, &result);
    158159    }
  • OCO/trunk/drv16/runtime.h

    r33 r238  
    1616
    1717int toupper(int c);
    18 char *strncpy(char *dst, const char *src, int n);
    19 char __far *_fstrncpy(char __far *dst, const char __far *src, int n);
    20 int _fstrnicmp(const char __far *string1, const char __far *string2, int n);
    2118
    2219#endif
  • OCO/trunk/install/cardinfo.rc

    r33 r238  
    3636   "2",                        /* Number of Drivers to Install (1 char)      */
    3737   "OS/2 Universal Audio: Wave",   /* Product name (39 chars)                   */
    38    ALSA_VERSION,               /* Version of the adapter's software (5 chars)*/
     38   RM_VERSION,                 /* Version of the adapter's software (5 chars)*/
    3939   "UNIAUD",                   /* PDD Name  (6 chars)                        */
    4040   "MDM",                      /* MCD table name (19 chars)                  */
  • OCO/trunk/install/makefile

    r237 r238  
    1212.SUFFIXES: .sys .obj .asm .inc .def .lrf .ref .lst .sym .map .c .cpp .rc .h .lib
    1313
    14 CINCLUDES = ..\include
     14
     15BASEINC  = $(%UNIBASE16)\include
     16BUILDINC = $(%UNIBASE16)\bin
    1517
    1618PRODUCT_NAME = IBM Generic Audio
     
    2628# Definitions for C Compiler
    2729#################################
    28 
    2930CC        = wcc386
    30 CFLAGS    = -i$(CINCLUDES) -wx -e25 -zq -bt=os2 -mf -bd -s -zl
     31CFLAGS    = -i=$(BASEINC);$(BUILDINC) -wx -e25 -zq -bt=os2 -mf -bd -s -zl
    3132
    3233
     
    4243#########################################
    4344RC        = rc
    44 RFLAGS    = -i $(CINCLUDES)
     45RFLAGS    = -i $(BASEINC) -i $(BUILDINC)
    4546
    4647
     
    5859#################################
    5960.c.obj:
    60         $(CC) $(CFLAGS) $^&.c
     61  $(CC) $(CFLAGS) $^&.c
    6162
    6263#################################
     
    8283##################################
    8384
    84 $(RCDLL).lrf: makefile.os2
    85         @%write $^@ Name        $(RCDLL).DLL
    86         @%write $^@ System      os2v2 dll
    87         @%write $^@ Option      Description '$(PRODUCT_NAME) Installation Dll'
    88         @%write $^@ File        $(RCOBJS)
    89         @%write $^@ library     clib3r.lib
     85$(RCDLL).lrf:
     86  @%write $^@ Name        $(RCDLL).DLL
     87  @%write $^@ System      os2v2 dll
     88  @%write $^@ Option      Description '$(PRODUCT_NAME) Installation Dll'
     89  @%write $^@ File        $(RCOBJS)
     90  @%write $^@ library     clib3r.lib
    9091
    9192
    92 $(RCDLL).dll:   $(RCOBJS) $(RCRES).rc $(RCDLL).lrf makefile.os2
    93         $(LINK) $(LFLAGS) @$(RCDLL).lrf
    94         $(RC) $(RFLAGS) $(RCRES).rc $(RCDLL).dll
    95         @copy $(RCDLL).dll ..\..\bin > nul
    96         @copy control.scr ..\..\bin > nul
    97         @copy audfiles.scr ..\..\bin > nul
    98 
     93$(RCDLL).dll:   $(RCOBJS) $(RCRES).rc $(RCDLL).lrf
     94  $(LINK) $(LFLAGS) @$(RCDLL).lrf
     95  $(RC) $(RFLAGS) $(RCRES).rc $(RCDLL).dll
     96  @if exist $(%UNIBASE16)\release @copy $(RCDLL).dll $(%UNIBASE16)\release
     97  @if exist $(%UNIBASE16)\release @copy control.scr  $(%UNIBASE16)\release
     98  @if exist $(%UNIBASE16)\release @copy audfiles.scr $(%UNIBASE16)\release
    9999
    100100##################################
     
    102102##################################
    103103
    104 $(HELPFILE).hlp: $(HELPFILE).itl makefile.os2
    105         @echo Creating file $@ > con
    106         $(IPF) $(HELPFILE).itl /l=$(L) /codepage=$(P) /country=$(C)
    107         @copy $(HELPFILE).hlp ..\..\bin > nul
    108 
     104$(HELPFILE).hlp: $(HELPFILE).itl
     105  @echo Creating file $@ > con
     106  -@$(IPF) $(HELPFILE).itl /l=$(L) /codepage=$(P) /country=$(C)
     107  @if exist $(%UNIBASE16)\release @copy $(HELPFILE).hlp $(%UNIBASE16)\release
    109108
    110109
     
    117116midimap: $(MIDIDLL).dll
    118117
    119 $(MIDIDLL).lrf: makefile.os2
    120         @%write $^@ Name        $(MIDIDLL).DLL
    121         @%write $^@ System      os2v2 dll
    122         @%write $^@ Option      Description '$(PRODUCT_NAME) Midi Mapper Dll'
    123         @%write $^@ File        $(RCOBJS)
     118$(MIDIDLL).lrf:
     119  @%write $^@ Name        $(MIDIDLL).DLL
     120  @%write $^@ System      os2v2 dll
     121  @%write $^@ Option      Description '$(PRODUCT_NAME) Midi Mapper Dll'
     122  @%write $^@ File        $(RCOBJS)
    124123
    125124
    126 $(MIDIDLL).dll:   $(RCOBJS) $(RCRES).rc $(MIDIDLL).lrf makefile.os2
    127         $(LINK) $(LFLAGS) @$(MIDIDLL).lrf
    128         $(RC) $(RFLAGS) $(RCRES).rc $(MIDIDLL).dll
    129         @copy $(MIDIDLL).dll ..\bin > nul
     125$(MIDIDLL).dll:   $(RCOBJS) $(RCRES).rc $(MIDIDLL).lrf
     126  $(LINK) $(LFLAGS) @$(MIDIDLL).lrf
     127  $(RC) $(RFLAGS) $(RCRES).rc $(MIDIDLL).dll
     128  @if exist $(%UNIBASE16)\release @copy $(MIDIDLL).dll $(%UNIBASE16)\release
    130129
    131 
    132 #############################################################################
    133 # Cleanup directory
    134 #############################################################################
    135 
    136 clean: .SYMBOLIC
    137      -del *.dll *.obj *.err *.lrf *.res *.hlp
    138 
    139 
  • 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 ..
  • OCO/trunk/mif/drvmake.mif

    • Property svn:eol-style set to native
    r237 r238  
    1 #/* SCCSID = src/dev/mme/tropez/makefile, tropez, c.basedd 97/10/22 */
    2 #****************************************************************************
    3 #*                                                                          *
    4 #* Copyright (c) IBM Corporation 1994 - 1997.                               *
    5 #*                                                                          *
    6 #* The following IBM OS/2 source code is provided to you solely for the     *
    7 #* the purpose of assisting you in your development of OS/2 device drivers. *
    8 #* You may use this code in accordance with the IBM License Agreement       *
    9 #* provided in the IBM Device Driver Source Kit for OS/2.                   *
    10 #*                                                                          *
    11 #****************************************************************************/
     1#**************************************************************************
    122#
    13 #- Set the environmental variables for compiling
     3# Top drv16 makefile for the uniaud16 with Open Watcom 1.7 and above
    144#
     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
    1511.ERASE
    1612
     
    1814.SUFFIXES: .sys .obj .asm .inc .def .lrf .ref .lst .sym .map .c .cpp .h .lib
    1915
    20 NAME   = uniaud16
    21 WMAPNAME = uniaud16.wmap
     16NAME       = uniaud16
     17WMAPNAME   = uniaud16.wmap
     18VERSIONINC = $(%UNIBASE16)\bin\version.lnk
    2219
    23 !include ..\..\makefile.inc
     20!include $(%UNIBASE16)\mif\makedirs.inc
     21!include $(%UNIBASE16)\mif\makeopts.inc
    2422
    25 .BEFORE
    26    @set LIB=$(DDK_BASE)\LIB
    27    @set INCLUDE=;.;$(%WATCOM)\H;..\runtime;..\include;$(DDK_BASE)\SRC\DEV\RESOURCE\RMCALLS;$(DDK_BASE)\H;$(DDK_BASE)\SRC\INC;..\OS2Runtime;$(DDK_BASE)\src\dev\mme\midi;
    28    @set PATH=$(DDK_BASE)\TOOLS;$(%WATCOM)\BINP;$(%WATCOM)\BINW;$(%PATH)
     23# Object files
     24RTOBJS = cpp.obj devhelp.obj math.obj iodelay.obj
    2925
    30 !include ..\include\version.mak
     26OBJS = segments.obj header.obj audiohw.obj event.obj commdbg.obj fmsynth.obj   &
     27       apm.obj apmevent.obj idc_vdd.obj init.obj ioctl.obj irq.obj mixer.obj   &
     28       malloc.obj maudio.obj memutil.obj midimsg.obj midipars.obj midistrm.obj &
     29       mpu401.obj wtsynth.obj parse.obj queue.obj rtmidi.obj ssm_idc.obj       &
     30       strategy.obj stream.obj timer.obj vddentry.obj waudio.obj convert.obj   &
     31       convsrate.obj waveplay.obj waverec.obj wavestrm.obj dwavestrm.obj       &
     32       ossidc16.obj
    3133
    32 !if "$(IBM_BUILD)" == "1"
    33 CPPFLAGS += -DIBM_BUILD
    34 CFLAGS   += -DIBM_BUILD
     34all: $(NAME).sys $(NAME).sym cpfiles
     35
     36$(NAME).lnk:
     37  @%write $^@ name $(NAME).sys
     38  @%write $^@ system os2_dll
     39  @%write $^@ option quiet,verbose,caseexact,cache,map=$(WMAPNAME)
     40  @%write $^@ import DOSIODELAYCNT DOSCALLS.427
     41  @%write $^@ import DOS32FLATDS   DOSCALLS.370
     42  @%write $^@ library $(%WATCOM)\lib286\os2\os2.lib,$(%WATCOM)\lib286\plibs.lib
     43!ifdef DEBUG
     44  @%write $^@ segment _DEBUGTEXT PRELOAD SHARED IOPL READWRITE
    3545!endif
    3646
    37 #########################################
    38 # Object file list
    39 #########################################
    40 OBJS1=segments.obj header.obj
    41 OBJS2=audiohw.obj event.obj commdbg.obj
    42 OBJS3=fmsynth.obj apm.obj apmevent.obj
    43 OBJS4=idc_vdd.obj init.obj ioctl.obj irq.obj mixer.obj
    44 OBJS5=malloc.obj maudio.obj memutil.obj
    45 OBJS6=midimsg.obj midipars.obj midistrm.obj mpu401.obj wtsynth.obj
    46 OBJS7=parse.obj queue.obj rtmidi.obj
    47 OBJS8=ssm_idc.obj strategy.obj stream.obj timer.obj vddentry.obj waudio.obj
    48 OBJS9=convert.obj convsrate.obj waveplay.obj waverec.obj wavestrm.obj dwavestrm.obj ossidc16.obj
    49 OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7) $(OBJS8) $(OBJS9)
     47$(NAME).sys: $(OBJS) $(RTOBJS) $(NAME).lnk
     48  $(LINK) @$(NAME).lnk @$(VERSIONINC) FILE {$(OBJS) $(RTOBJS)}
    5049
    51 all: $(OBJDIR)\$(NAME).sys $(OBJDIR)\$(NAME).sym
     50$(NAME).sym: $(WMAPNAME)
     51  $(WAT2MAP) $(WMAPNAME) $(NAME).map
     52  # use -@ here incase mapsym not on system
     53  -@mapsym $(NAME).map
    5254
    53 $(OBJDIR)\$(NAME).lrf: makefile.os2 ..\include\version.mak
    54    @%write $^@ system os2 dll
    55    @%write $^@ option quiet
    56    @%write $^@ option verbose
    57    @%write $^@ option caseexact
    58    @%write $^@ option cache
    59    @%write $^@ option map=$(OBJDIR)\$(WMAPNAME)
    60    @%write $^@ option description '@$#$(_VENDOR):$(_VERSION)$#@'
    61    @%write $^@ name $(OBJDIR)\$(NAME).sys
    62    @for %f in ($(OBJS)) do @%append $^@ file $(OBJDIR)\%f
    63    @%write $^@ import DOSIODELAYCNT DOSCALLS.427
    64    @%write $^@ import DOS32FLATDS DOSCALLS.370
    65    @%write $(OBJDIR)\$(NAME).lrf library $(DDK_BASE)\lib\os2286.lib
    66    @%write $(OBJDIR)\$(NAME).lrf library $(ALSA_LIB)\runtime.lib
    67    @%write $(OBJDIR)\$(NAME).lrf library $(DDK_BASE)\src\dev\resource\rmcalls\rmcalls.lib
    68    @%write $(OBJDIR)\$(NAME).lrf library $(DDK_BASE)\SRC\DEV\THINKPAD\DOCKII\APMCALLS\apmcalls.lib
    69    @%write $(OBJDIR)\$(NAME).lrf library $(%WATCOM)\lib286\plibs.lib
    70 !ifdef DEBUG
    71    @%write $(OBJDIR)\$(NAME).lrf segment _DEBUGTEXT PRELOAD SHARED IOPL READWRITE
    72 !endif
     55# copy to an easy spot to access and try gpl copy
     56cpfiles: .SYMBOLIC
     57  if not exist $(FINALDIR) mkdir $(FINALDIR)
     58  copy uniaud16.sy* $(FINALDIR)
    7359
    74 #   @%write $(OBJDIR)\$(NAME).lrf library $(%WATCOM)\lib286\os2\clibs.lib
     60  # copy to gpl tree if exists
     61  if exist $(ALSA_GPL).W4 copy uniaud16.sy* $(ALSA_GPL).W4
     62  if exist $(ALSA_GPL).KEE copy uniaud16.sy* $(ALSA_GPL).KEE
    7563
    76 $(OBJDIR)\$(NAME).sys: $(OBJS) $(OBJDIR)\$(NAME).lrf makefile.os2 $(DDK_BASE)\lib\os2286.lib $(ALSA_LIB)\runtime.lib $(DDK_BASE)\src\dev\resource\rmcalls\rmcalls.lib
    77    $(LINK) @$(OBJDIR)\$(NAME).lrf
    78    copy $(OBJDIR)\$(NAME).sys $(ALSA_BIN).KEE
    79    copy $(OBJDIR)\$(NAME).sys $(ALSA_BIN).W4
    80    copy $(OBJDIR)\$(NAME).sys $(ALSA_BIN_)
    81 
    82 $(OBJDIR)\$(NAME).sym: $(OBJDIR)\$(WMAPNAME)
    83    $(WAT2MAP) $(OBJDIR)\$(WMAPNAME) $(OBJDIR)\$(NAME).MAP
    84    cd $(OBJDIR)
    85    mapsym $(NAME).MAP
    86    cd ..\..
    87    copy $(OBJDIR)\$(NAME).sym $(ALSA_BIN).KEE
    88    copy $(OBJDIR)\$(NAME).sym $(ALSA_BIN).W4
    89    copy $(OBJDIR)\$(NAME).sym $(ALSA_BIN_)
    90 
    91 clean: .SYMBOLIC
    92      -del *.obj *.err *.lnk *.sys *.sym *.lst *.map *.wmap *.lrf
Note: See TracChangeset for help on using the changeset viewer.