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

  1. # SMakefile for demo programs
  2.  
  3. # Mesa 3-D graphics library
  4. # Version:  1.2
  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.  
  22.  
  23.  
  24. ##### MACROS #####
  25.  
  26. INCDIR = /include
  27. GL_LIB = MesaGL.LIB
  28. GLU_LIB = MesaGLU.LIB
  29. TK_LIB = Mesatk.LIB
  30. AUX_LIB = Mesaaux.LIB
  31.  
  32. TMP_FILE = T:MesaTMP_SCOPTS
  33.  
  34.  
  35. #AMIWIN 
  36. XLIBS = X11.LIB
  37. XDIR = x11:sasc
  38. NET_INC = netinclude:
  39. NET_LIB = netinclude:/netlib/net.lib
  40.  
  41. 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)
  42. AMIGAGL_LIBS =  lib lib:sc.lib+lib:scmieee.lib+/lib/$(AUX_LIB)+/lib/$(TK_LIB)+/lib/$(GLU_LIB)
  43.  
  44.  
  45. PROGS = bounce gamma gears glxdemo glxpixmap isosurf offset osdemo shadow \
  46.     spin test0 wave xdemo
  47.     
  48. # Missing in Amiga version is :glxdemo,glxpixmap,xdemo, offset    
  49. AMIGAPROGS = bounce gamma gears isosurf osdemo shadow spin test0 wave 
  50.  
  51. CC = sc
  52.  
  53. AMIWINSCFLAGS = idir=$(NET_INC) idir=$(INCDIR) idir=$(XDIR)/include data=far idlen=63 \
  54.           nostkchk ignore=a math=68882 cpu=68040 optimize define=AMIWIN
  55.  
  56. AMIGASCFLAGS = idir=$(INCDIR) data=far idlen=63 with=/amiga/SCOPTIONS\
  57.           ignore=a define=AMIGA
  58.  
  59.  
  60. ##### TARGETS #####
  61.  
  62. default:
  63.     @echo "specify: smake <target>"
  64.     @echo "Where <targets> is one of"
  65.     @echo "       amiga   - Compiles using link library"
  66.     @echo "       library - Compiles using standard library (still beta)"
  67.     @echo "       targets - Compilations for AMIWIN"
  68.  
  69. clean:
  70.     -delete *.o *.lnk *.info
  71.  
  72. realclean: 
  73.     -delete $(PROGS)
  74.     -delete *.o *.lnk *.info
  75.  
  76. amiga: AmigaLIB $(AMIGAPROGS) DeleteTMP
  77.  
  78. library: AmigaLibrary $(AMIGAPROGS) DeleteTMP
  79.  
  80. targets: AMIWIN $(PROGS) DeleteTMP
  81.  
  82.  
  83. AmigaLIB:
  84.     echo >$(TMP_FILE) "$(AMIGASCFLAGS) define=AMIGALIB $(AMIGAGL_LIBS)+/lib/$(GL_LIB)"
  85.  
  86. AmigaLibrary:
  87.     echo >$(TMP_FILE) "$(AMIGASCFLAGS) $(AMIGAGL_LIBS)"
  88.  
  89. AMIWIN:
  90.     echo >$(TMP_FILE) "$(AMIWINSCFLAGS) $(AMIWINGL_LIBS)"
  91.  
  92. DeleteTMP:
  93.     delete $(TMP_FILE)
  94.  
  95. $(PROGS):
  96.     $(CC) WITH=$(TMP_File) link $>.c
  97.