home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / mitsch75.zip / scheme-7_5_17-src.zip / scheme-7.5.17 / src / microcode / os2utl / makefile.wcc < prev    next >
Makefile  |  2000-12-05  |  4KB  |  120 lines

  1. ### -*- Fundamental -*-
  2. ###
  3. ### $Id: makefile.wcc,v 1.8 2000/12/05 21:23:51 cph Exp $
  4. ###
  5. ### Copyright (c) 1994-2000 Massachusetts Institute of Technology
  6. ###
  7. ### This program is free software; you can redistribute it and/or
  8. ### modify it under the terms of the GNU General Public License as
  9. ### published by the Free Software Foundation; either version 2 of the
  10. ### License, or (at your option) any later version.
  11. ###
  12. ### This program is distributed in the hope that it will be useful,
  13. ### but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. ### General Public License for more details.
  16. ###
  17. ### You should have received a copy of the GNU General Public License
  18. ### along with this program; if not, write to the Free Software
  19. ### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ###
  21.  
  22. #### Makefile for Scheme under OS/2 using Watcom C/C++
  23.  
  24. # This makefile is configured for use with GNU make, the Watcom C
  25. # compiler, GNU m4, the Watcom assembler, and the RC program included
  26. # with the IBM OS/2 Toolkit.
  27.  
  28. OBJ = obj
  29. ASM = asm
  30. CC = wcc386
  31. M4 = m4
  32. AS = wasm
  33.  
  34. # Compiler options.
  35. # [DEBUG] marks options used for debugging.
  36. # [OPTIMIZE] marks options used for optimization.
  37. #
  38. # /4r        386 instructions, 486 timings, register-based args
  39. # /bm        build multi-thread binary
  40. # /bt=os2    build OS/2 binary (default)
  41. # /d1+        generate debug info [OPTIMIZE]
  42. # /d2        generate debug info [DEBUG]
  43. # /fpi        generate in-line 387 insns, emulate if none (default)
  44. # /fp3        generate in-line 387 insns (default)
  45. # /hw        generate Watcom debug info (default)
  46. # /mf        use flat memory model (default)
  47. # /od        disable optimization (default with /d2)
  48. # /oe        enable in-line user-code expansion [OPTIMIZE]
  49. # /ox        enable various optimizations [OPTIMIZE]
  50. # /s        remove stack overflow checks
  51. # /sg        generate calls to grow stack
  52. # /w0        disable warning messages
  53. # /zc        place literal strings in code segment
  54. # /ze        enable language extensions (default)
  55. # /zp4        use 4-byte alignment
  56. # /zq        operate quietly
  57. CFLAGS := /4r /bm /fpi /fp3 /s /sg /w0 /zc /zp4 /zq /dMIT_SCHEME
  58.  
  59. ifeq ($(debug_mode),debug)
  60. CFLAGS := $(CFLAGS) /d2
  61. else
  62. ifeq ($(debug_mode),optimize)
  63. CFLAGS := $(CFLAGS) /d1+ /oe /ox
  64. endif
  65. endif
  66.  
  67. # Linker options.
  68. #
  69. # debug all        include debug info in executable
  70. # option caseexact    use case-sensitive comparison for identifiers
  71. # option quiet        operate quietly
  72. # option symfile    put debug info in .sym file
  73. LDFLAGS := debug all option caseexact option quiet option symfile
  74.  
  75. # M4 options.
  76. #
  77. # -DOS2        Select OS/2 assembly-language conventions:
  78. #         * No leading underscore in C symbols.
  79. #         * 6-bit type codes.
  80. #         * OS/2 _System calling convention.
  81. # -DDASM    Select Intel assembly language.
  82. # -DWCC386R    Select Watcom 386 register-based conventions.
  83. M4FLAGS = -DOS2 -DDASM -DWCC386R
  84.  
  85. # Assembler options.
  86. #
  87. # /d1        generate debug info
  88. # /fpi        generate in-line 387 insns, emulate if none
  89. # /fp3        generate in-line 387 insns
  90. # /mf        use flat memory model
  91. # /zq        operate quietly
  92. ASFLAGS := /fpi /fp3 /mf /zq
  93. ifeq ($(debug_mode),debug)
  94. ASFLAGS := $(ASFLAGS) /d1
  95. endif
  96.  
  97. %.obj : %.c
  98.     $(CC) $(CFLAGS) $<
  99.  
  100. %.obj : %.asm
  101.     $(AS) $(ASFLAGS) /fo=$@ $<
  102.  
  103. %.exe :
  104.     wlink system os2v2 $(LDFLAGS) name $@ file { $^ }
  105.  
  106. include os2utl\makefile.cmn
  107.  
  108. cmpauxmd.asm : cmpauxmd.m4 asmcvt.exe
  109.     .\asmcvt pre < $< | $(M4) $(M4FLAGS) | .\asmcvt post > $@
  110.  
  111. scheme.exe : $(OBJECTS) scheme.res
  112.     wlink system os2v2_pm name $@ $(LDFLAGS) \
  113.     file { $(OBJECTS) } $(SCHEME_LIB)
  114.     rc scheme.res $@
  115.  
  116. bchschem.exe : $(BCHOBJECTS) bchschem.res
  117.     wlink system os2v2_pm name $@ $(LDFLAGS) \
  118.     file { $(BCHOBJECTS) } $(SCHEME_LIB)
  119.     rc bchschem.res $@
  120.