gcc_beos.mk 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. #############################################################################
  2. #
  3. # SciTech Multi-platform Graphics Library
  4. #
  5. # ========================================================================
  6. #
  7. # The contents of this file are subject to the SciTech MGL Public
  8. # License Version 1.0 (the "License"); you may not use this file
  9. # except in compliance with the License. You may obtain a copy of
  10. # the License at http://www.scitechsoft.com/mgl-license.txt
  11. #
  12. # Software distributed under the License is distributed on an
  13. # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  14. # implied. See the License for the specific language governing
  15. # rights and limitations under the License.
  16. #
  17. # The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.
  18. #
  19. # The Initial Developer of the Original Code is SciTech Software, Inc.
  20. # All Rights Reserved.
  21. #
  22. # ========================================================================
  23. #
  24. # Descripton: Generic DMAKE startup makefile definitions file. Assumes
  25. # that the SCITECH environment variable has been set to point
  26. # to where all our stuff is installed. You should not need
  27. # to change anything in this file.
  28. #
  29. # BeOS version for GNU C/C++.
  30. #
  31. #############################################################################
  32. # Disable warnings for macros redefined here that were given
  33. # on the command line.
  34. __.SILENT := $(.SILENT)
  35. .SILENT := yes
  36. # Import enivornment variables that we use common to all compilers
  37. .IMPORT .IGNORE : TEMP SHELL INCLUDE LIB SCITECH PRIVATE SCITECH_LIB
  38. .IMPORT .IGNORE : DBG OPT OPT_SIZE SHW BETA CHECKED USE_X11 USE_LINUX
  39. .IMPORT .IGNORE : USE_EGCS USE_PGCC STATIC_LIBS LIBC
  40. TMPDIR := $(TEMP)
  41. # Standard file suffix definitions
  42. #
  43. # NOTE: BeOS does not require any extenion for executeable files, but you
  44. # can use an extension if you wish. We use the .x extension for building
  45. # executeable files so that we can use implicit rules to make the
  46. # makefiles simpler and more portable between systems. When you install
  47. # the files to a local bin directory, you will probably want to remove
  48. # the .x extension.
  49. L := .a # Libraries
  50. E := .x # Executables
  51. O := .o # Objects
  52. A := .asm # Assembler sources
  53. S := .s # GNU assembler sources
  54. P := .cpp # C++ sources
  55. # File prefix/suffix definitions. The following prefixes are defined, and are
  56. # used primarily to abstract between the Unix style libXX.a naming convention
  57. # and the DOS/Windows/OS2 naming convention of XX.lib.
  58. LP := lib # LP - Library file prefix (name of file on disk)
  59. LL := -l # Library link prefix (name of library on link command line)
  60. LE := # Library link suffix (extension of library on link command line)
  61. # We use the Unix shell at all times
  62. SHELLFLAGS := -c
  63. # Definition of $(MAKE) macro for recursive makes.
  64. MAKE = $(MAKECMD) $(MFLAGS)
  65. # Macro to install a library file
  66. INSTALL := cp
  67. # DMAKE uses this recipe to remove intermediate targets
  68. .REMOVE :; $(RM) -f $<
  69. # Turn warnings back to previous setting.
  70. .SILENT := $(__.SILENT)
  71. # We dont use TABS in our makefiles
  72. .NOTABS := yes
  73. # Define that we are compiling for BeOS
  74. USE_BEOS := 1
  75. # Default commands for compiling, assembling linking and archiving.
  76. CC := gcc
  77. CFLAGS := -Wall -I. -Iinclude $(INCLUDE)
  78. CXX := g++
  79. AS := nasm
  80. ASFLAGS := -f elf -d__FLAT__ -iinclude -i$(SCITECH)/include -d__NOU__
  81. LD := gcc
  82. LDFLAGS := -L.
  83. LIB := ar
  84. LIBFLAGS := rcs
  85. # Link to static libraries if requested
  86. .IF $(STATIC_LIBS)
  87. LDFLAGS += -static
  88. .ENDIF
  89. # Optionally turn on debugging information
  90. .IF $(DBG)
  91. CFLAGS += -g
  92. .ELSE
  93. # NASM does not support debugging information yet
  94. ASFLAGS +=
  95. .ENDIF
  96. # Optionally turn on optimisations
  97. .IF $(OPT_MAX)
  98. CFLAGS += -O6
  99. .ELIF $(OPT)
  100. CFLAGS += -O2
  101. .ELIF $(OPT_SIZE)
  102. CFLAGS += -O1
  103. .ENDIF
  104. # Optionally turn on direct i387 FPU instructions
  105. .IF $(FPU)
  106. CFLAGS += -DFPU387
  107. ASFLAGS += -dFPU387
  108. .END
  109. # Optionally compile a beta release version of a product
  110. .IF $(BETA)
  111. CFLAGS += -DBETA
  112. ASFLAGS += -dBETA
  113. .ENDIF
  114. # Disable standard C runtime library
  115. .IF $(NO_RUNTIME)
  116. CFLAGS += -fno-builtin -nostdinc
  117. .ENDIF
  118. # Target environment dependant flags
  119. CFLAGS += -D__BEOS__
  120. ASFLAGS += -d__BEOS__ -d__UNIX__
  121. # Define the base directory for library files
  122. .IF $(CHECKED)
  123. LIB_BASE_DIR := $(SCITECH_LIB)/lib/debug
  124. CFLAGS += -DCHECKED=1
  125. .ELSE
  126. LIB_BASE_DIR := $(SCITECH_LIB)/lib/release
  127. .ENDIF
  128. # Define where to install library files
  129. LIB_DEST := $(LIB_BASE_DIR)/beos/gcc
  130. LDFLAGS += -L$(LIB_DEST)
  131. # Place to look for PMODE library files
  132. PMLIB := -lpm
  133. # Define which file contains our rules
  134. RULES_MAK := gcc_beos.mk