# Makefile for core library

# Mesa 3-D graphics library
# Version:  1.2.6
# Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


# makefile for SAS/C AmiWin port by Victor Ng-Thow-Hing


##### MACROS #####

INCDIR = /include
LIBDIR = /lib
XDIR = x11:sasc


SOURCES = accum.c alpha.c attrib.c bitmap.c blend.c bresenhm.c clip.c \
	context.c copypix.c dd.c depth.c draw.c drawpix.c enable.c \
	eval2.c fog.c feedback.c fortran.c gamma.c get.c glx.c interp.c \
	light.c lines.c list.c logic.c masking.c misc.c osmesa.c pb.c \
	pixel.c points.c polygons.c readpix.c scissor.c span.c stencil.c \
	texture.c vb.c vertex.c xfonts.c xform.c xmesa1.c xmesa2.c xmesa3.c

OBJECTS = accum.o alpha.o attrib.o bitmap.o blend.o bresenhm.o clip.o \
	context.o copypix.o dd.o depth.o draw.o drawpix.o enable.o \
	eval2.o fog.o feedback.o fortran.o gamma.o get.o glx.o interp.o \
	light.o lines.o list.o logic.o masking.o misc.o osmesa.o pb.o \
	pixel.o points.o polygons.o readpix.o scissor.o span.o stencil.o \
	texture.o vb.o vertex.o xfonts.o xform.o xmesa1.o xmesa2.o xmesa3.o



SCFLAGS = idir=$(INCDIR) idir=$(XDIR)/include data=far idlen=63 \
          nostkchk ignore=a optimize math=68882 cpu=68040 define=AMIWIN

MAKELIB = oml -n
GL_LIB = MesaGL.LIB

CC = sc

##### RULES #####
.c.o:
	$(CC) $(SCFLAGS) $*.c

##### TARGETS #####

default:
	@echo "Specify a target configuration"

clean:
	-delete *.o $(GL_LIB)

targets: $(LIBDIR)/$(GL_LIB)

# Make the library
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
	$(MAKELIB) $@ R $(OBJECTS)
