home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / mesa-1.2.8 / src / smakefile < prev    next >
Makefile  |  1996-05-27  |  4KB  |  131 lines

  1. # sMakefile for core library for Amiga opengl.lib
  2.  
  3. # Mesa 3-D graphics library
  4. # Version:  39.02
  5. # Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  6. #
  7. # This library is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU Library General Public
  9. # License as published by the Free Software Foundation; either
  10. # version 2 of the License, or (at your option) any later version.
  11. #
  12. # This library 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. # Library General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Library General Public
  18. # License along with this library; if not, write to the Free
  19. # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. #
  21. ##### MACROS #####
  22.  
  23. INCDIR = /include
  24. LIBDIR = /lib
  25. LIBDIR = /lib
  26. XDIR = x11:sasc
  27.  
  28. TMP_FILE = T:MesaTMP_SCOPTS
  29.  
  30.  
  31. COMSOURCES = accum.c alpha.c alphabuf.c attrib.c bitmap.c blend.c bresenhm.c clip.c \
  32.     context.c copypix.c dd.c depth.c draw.c drawpix.c enable.c \
  33.     eval2.c fog.c feedback.c fortran.c get.c interp.c \
  34.     light.c lines.c list.c logic.c masking.c misc.c pb.c \
  35.     pixel.c points.c polygons.c readpix.c scissor.c span.c stencil.c \
  36.     texture.c varray.c vb.c vertex.c xform.c 
  37. AMIGASOURCES = Amigamesa.c osmesa.c
  38. LIBRARYSOURCES = Amigamesa.c
  39. AMIWINSOURCES = glx.c xfonts.c xmesa1.c xmesa2.c xmesa3.c osmesa.c
  40.  
  41. COMOBJECTS = accum.o alpha.o alphabuf.o attrib.o bitmap.o blend.o bresenhm.o clip.o \
  42.     context.o copypix.o dd.o depth.o draw.o drawpix.o enable.o \
  43.     eval2.o fog.o feedback.o fortran.o get.o interp.o \
  44.     light.o lines.o list.o logic.o masking.o misc.o pb.o \
  45.     pixel.o points.o polygons.o readpix.o scissor.o span.o stencil.o \
  46.     texture.o varray.o vb.o vertex.o xform.o 
  47. AMIGAOBJECTS = Amigamesa.o osmesa.o
  48. LIBRARYOBJECTS = Amigamesa.o
  49. AMIWINOBJECTS = glx.o xfonts.o xmesa1.o xmesa2.o xmesa3.o osmesa.o
  50.  
  51.  
  52. AMIGASCFLAGS = idir=$(INCDIR) data=far idlen=63 with=/amiga/SCOPTIONS\
  53.           nolink ignore=a define=AMIGA define=AMIGALIB
  54.  
  55. LIBRARYSCFLAGS = idir=$(INCDIR) data=far idlen=63 with=/amiga/scoptions\
  56.           LIBCODE nolink ignore=a define=AMIGA define=AMIGALIB
  57.  
  58. AMIWINSCFLAGS = verbose idir=$(INCDIR) idir=$(XDIR)/include data=far idlen=63 \
  59.           nostkchk ignore=a optimize math=68882 cpu=68040 define=AMIWIN
  60.  
  61. # Fetures to make and link a shared library for amiga
  62. VERSION = 39
  63. REV = 2
  64. LIBRARYFD = gl.fd
  65. GL_LIBRARY = libs:gl.library
  66. MAKELIBRARY = slink lib lib:sc.lib+lib:amiga.lib+lib:scmieee.lib LIBRARYFD $(LIBFD) TO $(GL_LIB) FROM lib:libent.o lib:libinitr.o NOICONS  LIBVERSION $(VERSION) LIBREVISION $(REV)
  67.  
  68. MAKELIB = oml -n
  69. GL_LIB = MesaGL.LIB
  70. GL_AMIGA_LIB = AMesaGL.LIB
  71.  
  72. CC = sc
  73.  
  74. ##### RULES #####
  75. .c.o:
  76.     $(CC) WITH=$(TMP_File) $*.c
  77.  
  78. ##### TARGETS #####
  79.  
  80. default:
  81.     @echo "specify: smake <target>"
  82.     @echo "Where <targets> is one of"
  83.     @echo "       amiga   - Compiles a link library"
  84.     @echo "       library - A standard library (still beta)"
  85.     @echo "       targets - Compilations for AMIWIN"
  86.  
  87. clean:
  88.     -delete *.o $(GL_LIB)
  89.  
  90.  
  91. amiga: $(LIBDIR)/$(GL_AMIGA_LIB)
  92.     @echo "------- FINISHID ------"
  93.  
  94. library: $(GL_LIBRARY)
  95.     @echo "------- FINISHID ------"
  96.  
  97. targets: $(LIBDIR)/$(GL_LIB)
  98.     @echo "------- FINISHID ------"
  99.  
  100. # Make the library 
  101. $(LIBDIR)/$(GL_AMIGA_LIB): AmigaLIB $(COMOBJECTS) $(AMIGAOBJECTS) DeleteTMP
  102.     @echo "------ Making LIB Amiga -----"
  103.     $(MAKELIB) $@ R $(COMOBJECTS) $(AMIGAOBJECTS)
  104.     copy $@ $(LIBDIR)/$(GL_LIB)
  105.     delete $@
  106.  
  107. $(GL_LIBRARY): AmigaLibrary $(COMOBJECTS) $(LIBRARYOBJECTS) DeleteTMP
  108.     @echo "------ Making Library -----"
  109.     $(MAKELIBRARY) $(COMOBJECTS) $(LIBRARYOBJECTS)
  110.     
  111.     
  112. $(LIBDIR)/$(GL_LIB):    AMIWIN $(COMOBJECTS) $(AMIWINOBJECTS) DeleteTMP
  113.     @echo "------ Making LIB AMIWIN -----"
  114.     $(MAKELIB) $@ R $(COMOBJECTS) $(AMIWINOBJECTS)
  115.     
  116.  
  117.  
  118. # Makes temporary scoptions to use in global .c.o    
  119. AmigaLIB:
  120.     @echo >$(TMP_FILE) "$(AMIGASCFLAGS)"
  121.  
  122. AmigaLibrary:
  123.     @echo >$(TMP_FILE) "$(LIBRARYSCFLAGS)"
  124.  
  125. AMIWIN:
  126.     @echo >$(TMP_FILE) "$(AMIWINSCFLAGS)"
  127.  
  128. DeleteTMP:
  129.     @delete $(TMP_FILE)
  130.  
  131.