Clone of mesa.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Makefile.DJ 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. # Mesa 3-D graphics library
  2. # Version: 5.1
  3. #
  4. # Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
  5. #
  6. # Permission is hereby granted, free of charge, to any person obtaining a
  7. # copy of this software and associated documentation files (the "Software"),
  8. # to deal in the Software without restriction, including without limitation
  9. # the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. # and/or sell copies of the Software, and to permit persons to whom the
  11. # Software is furnished to do so, subject to the following conditions:
  12. #
  13. # The above copyright notice and this permission notice shall be included
  14. # in all copies or substantial portions of the Software.
  15. #
  16. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  17. # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  19. # BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  20. # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22. # DOS/DJGPP core makefile v1.7 for Mesa
  23. #
  24. # Copyright (C) 2002 - Daniel Borca
  25. # Email : dborca@users.sourceforge.net
  26. # Web : http://www.geocities.com/dborca
  27. #
  28. # Available options:
  29. #
  30. # Environment variables:
  31. # CFLAGS
  32. #
  33. # GLIDE path to Glide3 SDK; used with FX.
  34. # default = $(TOP)/glide3
  35. # FX=1 build for 3dfx Glide3. Note that this disables
  36. # compilation of most DMesa code and requires fxMesa.
  37. # As a consequence, you'll need the DJGPP Glide3
  38. # library to build any application.
  39. # default = no
  40. # X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
  41. # default = no
  42. #
  43. # Targets:
  44. # all: build GL
  45. # clean: remove object files
  46. #
  47. .PHONY: all clean
  48. .INTERMEDIATE: x86/gen_matypes.exe
  49. TOP = ../..
  50. GLIDE ?= $(TOP)/glide3
  51. LIBDIR = $(TOP)/lib
  52. GL_LIB = libgl.a
  53. GL_DXE = gl.dxe
  54. GL_IMP = libigl.a
  55. export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib
  56. CC = gcc
  57. CFLAGS += $(INCLUDE_DIRS)
  58. CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
  59. ifeq ($(FX),1)
  60. CFLAGS += -D__DOS__
  61. CFLAGS += -I$(GLIDE)/include -DFX
  62. LIBNAME = "Mesa/FX DJGPP"
  63. else
  64. LIBNAME = "Mesa DJGPP"
  65. endif
  66. AR = ar
  67. ARFLAGS = crus
  68. HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe)
  69. ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
  70. UNLINK = del $(subst /,\,$(1))
  71. else
  72. UNLINK = $(RM) $(1)
  73. endif
  74. include sources
  75. ifeq ($(X86),1)
  76. CFLAGS += -DUSE_X86_ASM
  77. CFLAGS += -DUSE_MMX_ASM
  78. CFLAGS += -DUSE_SSE_ASM
  79. CFLAGS += -DUSE_3DNOW_ASM
  80. X86_SOURCES += $(X86_API)
  81. else
  82. X86_SOURCES =
  83. endif
  84. DRIVER_SOURCES = \
  85. drivers/dos/dmesa.c
  86. ifeq ($(FX),1)
  87. DRIVER_SOURCES += \
  88. $(GLIDE_DRIVER_SOURCES)
  89. else
  90. DRIVER_SOURCES += \
  91. $(OSMESA_DRIVER_SOURCES) \
  92. drivers/dos/video.c \
  93. drivers/dos/vesa.c \
  94. drivers/dos/blit.S \
  95. drivers/dos/vga.c \
  96. drivers/dos/null.c \
  97. drivers/dos/dpmi.c
  98. endif
  99. SOURCES = $(CORE_SOURCES) $(X86_SOURCES) $(COMMON_DRIVER_SOURCES) $(DRIVER_SOURCES)
  100. OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
  101. X86_OBJECTS = $(addsuffix .o,$(basename $(X86_SOURCES)))
  102. .c.o:
  103. $(CC) -o $@ $(CFLAGS) -c $<
  104. .S.o:
  105. $(CC) -o $@ $(CFLAGS) -c $<
  106. .s.o:
  107. $(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $<
  108. all: $(LIBDIR)/$(GL_LIB) $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP)
  109. $(LIBDIR)/$(GL_LIB): $(OBJECTS)
  110. $(AR) $(ARFLAGS) $@ $^
  111. $(LIBDIR)/$(GL_DXE) $(LIBDIR)/$(GL_IMP): $(OBJECTS)
  112. ifeq ($(HAVEDXE3),)
  113. $(warning Missing DXE3 package... Skipping $(GL_DXE))
  114. else
  115. ifeq ($(FX),1)
  116. -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -P glide3x.dxe -U $^
  117. else
  118. -dxe3gen -o $(LIBDIR)/$(GL_DXE) -Y $(LIBDIR)/$(GL_IMP) -D $(LIBNAME) -E _gl -E _DMesa -U $^
  119. endif
  120. endif
  121. $(X86_OBJECTS): x86/matypes.h
  122. x86/matypes.h: x86/gen_matypes.exe
  123. $< > $@
  124. x86/gen_matypes.exe: x86/gen_matypes.c
  125. $(CC) -o $@ $(CFLAGS) -s $<
  126. clean:
  127. -$(call UNLINK,array_cache/*.o)
  128. -$(call UNLINK,glapi/*.o)
  129. -$(call UNLINK,main/*.o)
  130. -$(call UNLINK,math/*.o)
  131. -$(call UNLINK,shader/*.o)
  132. -$(call UNLINK,sparc/*.o)
  133. -$(call UNLINK,ppc/*.o)
  134. -$(call UNLINK,swrast/*.o)
  135. -$(call UNLINK,swrast_setup/*.o)
  136. -$(call UNLINK,tnl/*.o)
  137. -$(call UNLINK,x86/*.o)
  138. -$(call UNLINK,drivers/common/*.o)
  139. -$(call UNLINK,drivers/dos/*.o)
  140. -$(call UNLINK,drivers/glide/*.o)