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

  1. # Makefile for GLU for Unix
  2.  
  3. # Mesa 3-D graphics library
  4. # Version:  1.2.6
  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. # makefile for SAS/C AmiWin port by Victor Ng-Thow-Hing
  23. # altered to also include Amiga port by StefanZ
  24.  
  25. ##### MACROS #####
  26.  
  27. INCDIR = /include
  28. LIBDIR = /lib
  29.  
  30. TMP_FILE = T:MesaTMP_SCOPTS
  31.  
  32. SOURCES = glu.c mipmap.c nurbs.c nurbscrv.c nurbssrf.c nurbsutl.c \
  33.     project.c quadric.c tess.c tesselat.c polytest.c
  34.  
  35. OBJECTS = glu.o mipmap.o nurbs.o nurbscrv.o nurbssrf.o nurbsutl.o \
  36.     project.o quadric.o tess.o tesselat.o polytest.o
  37. CC = sc
  38.  
  39. AMIWINSCFLAGS = idir=$(INCDIR) idir=x11:sasc/include data=far idlen=63 \
  40.           nostkchk ignore=a math=68882 cpu=68040 optimize define=AMIWIN
  41.  
  42. AMIGASCFLAGS = idir=$(INCDIR) data=far idlen=63 with=/amiga/SCOPTIONS\
  43.           nolink ignore=a define=AMIGA param=both
  44.  
  45.  
  46. MAKELIB = oml
  47. GLU_LIB = MesaGLU.LIB
  48. LIB_NAME = $(LIBDIR)/$(GLU_LIB)
  49.  
  50. ##### RULES #####
  51.  
  52. .c.o:
  53.     $(CC) WITH=$(TMP_File) $*.c
  54.  
  55.  
  56. ##### TARGETS #####
  57. default:
  58.     @echo "specify: smake <target>"
  59.     @echo "Where <targets> is one of"
  60.     @echo "       amiga   - Compiles a link library (LIB-file)"
  61.     @echo "       library - Compiles a link library (LIB-file)"
  62.     @echo "                 using the shared library (still beta)"
  63.     @echo "       targets - Compilations for AMIWIN"
  64.  
  65. clean:
  66.     -delete *.o $(GLU_LIB)
  67.  
  68. targets: AMIWINLIB
  69.  
  70. amiga: CreateAmigaLIB
  71.  
  72. library: AmigaLIBsh
  73.  
  74. # Make the library
  75. CreateAmigaLIB: AmigaLIB $(OBJECTS) DeleteTMP
  76.     $(MAKELIB) $(LIB_NAME) R $(OBJECTS)
  77.  
  78. AmigaLIBsh: AmigaLibrary $(OBJECTS) DeleteTMP
  79.     $(MAKELIB) $(LIB_NAME) R $(OBJECTS)
  80.  
  81. AMIWINLIB: AMIWIN $(OBJECTS) DeleteTMP
  82.     $(MAKELIB) $(LIB_NAME) R $(OBJECTS)
  83.  
  84. # Makes temporary scoptions to use in global .c.o    
  85. AmigaLIB:
  86.     echo >$(TMP_FILE) "$(AMIGASCFLAGS) define=AMIGALIB"
  87.  
  88. AmigaLibrary:
  89.     echo >$(TMP_FILE) "$(LIBRARYSCFLAGS)"
  90.  
  91. AMIWIN:
  92.     echo >$(TMP_FILE) "$(AMIWINSCFLAGS)"
  93.  
  94. DeleteTMP:
  95.     delete $(TMP_FILE)
  96.  
  97.