home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / audiopdd.zip / makefile < prev    next >
Makefile  |  1999-05-16  |  4KB  |  122 lines

  1. # cs40.sys makefile watcom 10a
  2. # 25-Jan-98
  3. #
  4. #- Set the environmental variables for compiling
  5. #
  6. .ERASE
  7.  
  8. .SUFFIXES:
  9. .SUFFIXES: .sys .obj .asm .inc .def .lrf .ref .lst .sym .map .c .cpp .h .lib
  10.  
  11. NAME   = cs40
  12. WMAPNAME = mapfile
  13.  
  14. .BEFORE
  15. !ifndef %WATCOM
  16.    set WATCOM=d:\dev\comp\wc
  17. !endif
  18.  
  19.    set INCLUDE=\dev\ddk\base\h;$(%WATCOM)\H
  20.  
  21. #########################################
  22. # Options for Watcom 16-bit C compiler
  23. #########################################
  24. #  -bt=os2   = Build target OS is OS/2
  25. #  -ms       = Memory model small
  26. #  -3        = Enable use of 80386 instructions
  27. #  -4        = Optimize for 486 (assumes -3)
  28. #  -5        = Optimize for Pentium (assumes -3)
  29. #  -j        = char default is unsigned
  30. #  -d1       = Include line number info in object
  31. #              (necessary to produce assembler listing)
  32. #  -d2       = Include debugging info for ICAT
  33. #              (necessary to produce assembler listing)
  34. #  -o        = Optimization - i = enable inline intrinsic functions
  35. #                             r = optimize for 80486 and pentium pipes
  36. #                             s = space is preferred to time
  37. #                             l = enable loop optimizations
  38. #                             a = relax aliasing constraints
  39. #                             n = allow numerically unstable optimizations
  40. #  -od to disable optimazations (use this and -d2 -hc for icat)
  41. #  -s        = Omit stack size checking from start of each function
  42. #  -zl       = Place no library references into objects
  43. #  -wx       = Warning level set to maximum (vs 1..4)
  44. #  -zfp      = Prevent use of FS selector
  45. #  -zgp      = Prevent use of GS selector
  46. #  -zq       = Operate quietly
  47. #  -zm       = Put each function in its own segment
  48. #  -zu       = Do not assume that SS contains segment of DGROUP
  49. # -hc = codeview (-hw=watcom  -hd=dwarf)
  50. CC=wcc
  51. ##CFLAGS=-ms -5 -bt=os2 -d2 -oi -s -j -wx -zl -zfp -zgp -zq -zu -hc
  52. #CFLAGS=-ms -5 -bt=os2 -od -d2 -s -j -wx -zl -zfp -zgp -zq -zu -hc
  53.  
  54. CFLAGS=-ms -5 -bt=os2 -d1 -oi -otexan -s -j -wx -zl -zfp -zgp -zq -zu
  55.  
  56. #########################################
  57. # Options for Watcom assembler
  58. #########################################
  59. #  -bt=os2   = Build target OS is OS/2
  60. #  -d1       = Include line number info in object
  61. #              (necessary to produce assembler listing)
  62. #  -i        = Include list
  63. #  -zq       = Operate quietly
  64. #  -3p       = 80386 protected-mode instructions
  65. #
  66. ASM=wasm
  67. AFLAGS=-d1 -zq -5p
  68. LINK=wlink
  69.  
  70. #########################################
  71. # Inference rules
  72. #########################################
  73.  
  74. .c.obj: .AUTODEPEND
  75.      $(CC) $(CFLAGS) $*.c
  76.      wdisasm -l -s -b -e -p $*
  77.  
  78. .asm.obj: .AUTODEPEND
  79.      $(ASM) $(AFLAGS) $*.asm
  80.      wdisasm -l -s -b -e -p $*
  81.  
  82. #########################################
  83. # Object file list
  84. #########################################
  85.  
  86. OBJS1=segsetup.obj header.obj strat.obj
  87. OBJS2=audiobuf.obj audiohw.obj dma.obj irq.obj
  88. OBJS3=wavaudio.obj wavestrm.obj stream.obj
  89. OBJS4=waveplay.obj waverec.obj
  90. OBJS5=ioctl.obj ssm_idc.obj
  91. OBJS7=chipset.obj
  92. OBJS8=malloc.obj
  93. OBJS9=myprintf.obj init.obj
  94.  
  95. OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS7) $(OBJS8) $(OBJS9)
  96.  
  97. all: $(NAME).sys $(NAME).sym
  98.  
  99. $(NAME).lrf: makefile
  100.    @%write $^@ system os2 dll
  101.    @%write $^@ option quiet
  102.    @%write $^@ option verbose
  103.    @%write $^@ option caseexact
  104.    @%write $^@ option symfile=$(NAME).dbg
  105.    @%write $^@ debug codeview
  106.    @%write $^@ option cache
  107.    @%write $^@ option map=$(WMAPNAME).
  108.    @%write $^@ option description 'CS40...'
  109.    @%write $^@ name $(NAME).sys
  110.    @for %f in ($(OBJS)) do @%append $^@ file %f
  111.    @%write $^@ import DOSIODELAYCNT DOSCALLS.427
  112.    @%write $^@ library d:\dev\ddk\base\lib\os2286.lib
  113.    @%write $^@ library d:\dev\ddk\base\lib\rmcalls.lib
  114.  
  115. #$(NAME).sys: $(OBJS) makefile $(NAME).lrf d:\dev\ddk\base\lib\os2286.lib d:\dev\ddk\base\lib\rmcalls.lib
  116. $(NAME).sys: $(OBJS) makefile $(NAME).lrf 
  117.    $(LINK) @$(NAME).lrf
  118.  
  119. $(NAME).sym: $(WMAPNAME)
  120.    wat2map $(WMAPNAME) $(NAME).MAP
  121.    mapsym $(NAME).MAP
  122.