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

  1. # SMakefile for sample programs
  2. # Mesa 3-D graphics library
  3. # Version:  1.2
  4. # Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  5. #
  6. # This library is free software; you can redistribute it and/or
  7. # modify it under the terms of the GNU Library General Public
  8. # License as published by the Free Software Foundation; either
  9. # version 2 of the License, or (at your option) any later version.
  10. #
  11. # This library is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14. # Library General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Library General Public
  17. # License along with this library; if not, write to the Free
  18. # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.  
  21. ##### MACROS #####
  22.  
  23. INCDIR = /include
  24. GL_LIB = MesaGL.LIB
  25. GLU_LIB = MesaGLU.LIB
  26. TK_LIB = Mesatk.LIB
  27. AUX_LIB = Mesaaux.LIB
  28.  
  29. TMP_FILE = T:MesaTMP_SCOPTS
  30.  
  31. # Only for AMIWIN
  32. XLIBS = X11.LIB
  33. XDIR = x11:sasc
  34. NET_INC = netinclude:
  35. NET_LIB = netinclude:/netlib/net.lib
  36.  
  37. AMIWINGL_LIBS = lib lib:sc.lib+lib:scm881.lib+$(NET_LIB)+$(XDIR)/lib/$(XLIBS)+/lib/$(AUX_LIB)+/lib/$(TK_LIB)+/lib/$(GLU_LIB)+/lib/$(GL_LIB)
  38. AMIGAGL_LIBS = lib lib:sc.lib+lib:scmieee.lib+/lib/$(AUX_LIB)+/lib/$(TK_LIB)+/lib/$(GLU_LIB)
  39.  
  40.  
  41.  
  42. PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth \
  43.     eval fog font line logo nurb oglinfo olympic \
  44.     overlay point prim quad select shape \
  45.     speed sphere star stencil stretch texture \
  46.     tri wave
  47.  
  48. #Not yet in amiga version:blendxor,olginfo,olympic
  49. AMIGAPROGS = accum bitmap1 bitmap2 blendeq copy cursor depth \
  50.     eval fog font line logo nurb \
  51.     overlay point prim quad select shape \
  52.     speed sphere star stencil stretch texture \
  53.     tri wave
  54.  
  55.  
  56.  
  57. CC = sc
  58. AMIWINSCFLAGS = idir=$(NET_INC) idir=$(INCDIR) idir=$(XDIR)/include data=far idlen=63 \
  59.           nostkchk ignore=a math=68882 cpu=68040 optimize define=AMIWIN
  60.  
  61. AMIGASCFLAGS = idir=$(INCDIR) data=far idlen=63 with=/amiga/SCOPTIONS\
  62.           ignore=a define=AMIGA
  63.  
  64. ##### TARGETS #####
  65.  
  66. default:
  67.     @echo "specify: smake <target>"
  68.     @echo "Where <targets> is one of"
  69.     @echo "       amiga   - Compiles using link library"
  70.     @echo "       library - Compiles using standard library (still beta)"
  71.     @echo "       targets - Compilations for AMIWIN"
  72.  
  73. clean:
  74.     -delete *.o *.lnk *.info
  75.  
  76. realclean:
  77.     -delete $(PROGS)
  78.     -delete *.o *.lnk *.info
  79.  
  80. amiga: AmigaLIB $(AMIGAPROGS) DeleteTMP
  81.  
  82. library: AmigaLibrary $(AMIGAPROGS) DeleteTMP
  83.  
  84. targets: AMIWIN $(PROGS) DeleteTMP
  85.  
  86.  
  87. AmigaLIB:
  88.     echo >$(TMP_FILE) "$(AMIGASCFLAGS) define=AMIGALIB $(AMIGAGL_LIBS)+/lib/$(GL_LIB)"
  89.  
  90. AmigaLibrary:
  91.     echo >$(TMP_FILE) "$(AMIGASCFLAGS) $(AMIGAGL_LIBS)"
  92.  
  93. AMIWIN:
  94.     echo >$(TMP_FILE) "$(AMIWINSCFLAGS) $(AMIWINGL_LIBS)"
  95.  
  96. DeleteTMP:
  97.     delete $(TMP_FILE)
  98.  
  99. $(PROGS):
  100.     $(CC) WITH=$(TMP_File) link $>.c
  101.  
  102.  
  103.