# $Id: Makefile.DJ,v 1.7 2000/04/07 16:28:37 brianp Exp $

# Mesa 3-D graphics library
# Version:  3.3
# Copyright (C) 1995-1998  Brian Paul
#
# 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 core library for MS-DOS using djgpp




##### MACROS #####

VPATH = RCS

INCDIR = ..\include
LIBDIR = ..\lib

# Want UniVBE (Display Doctor) Support, Scitech Software www.scitechsoft.com
# Set -I to point to scitech include files.
# Haven`t finished doing univbe version for djgpp
#CFLAGS += -DUNIVBE -D__DOS__ -D__MSDOS32__ -IC:\scitech\include
CFLAGS +=  -D__DOS__ -D__MSDOS32__

CORE_SOURCES = \
	aatriangle.c \
	accum.c \
	alpha.c \
	alphabuf.c \
	attrib.c \
	bbox.c \
	bitmap.c \
	blend.c \
	buffers.c \
	clip.c \
	colortab.c \
	config.c \
	context.c \
	copypix.c \
	cva.c \
	debug_xform.c \
	depth.c \
	dispatch.c \
	dlist.c \
	drawpix.c \
	enable.c \
	enums.c \
	eval.c \
	extensions.c \
	feedback.c \
	fog.c \
	get.c \
	glapi.c \
	glapinoop.c \
	glthread.c \
	hash.c \
	hint.c \
	image.c \
	imaging.c \
	light.c \
	lines.c \
	logic.c \
	masking.c \
	matrix.c \
	mem.c \
	mmath.c \
	pb.c \
	pixel.c \
	pixeltex.c \
	pipeline.c \
	points.c \
	polygon.c \
	quads.c \
	rastpos.c \
	readpix.c \
	rect.c \
	scissor.c \
	shade.c \
	span.c \
	stages.c \
	state.c \
	stencil.c \
	teximage.c \
	texobj.c \
	texstate.c \
	texture.c \
	texutil.c \
	translate.c \
	triangle.c \
	varray.c \
	vb.c \
	vbcull.c \
	vbfill.c \
	vbindirect.c \
	vbrender.c \
	vbxform.c \
	vector.c \
	vertices.c \
	winpos.c \
	xform.c \
	zoom.c


DRIVER_SOURCES = DOS\dosmesa.c

SOURCES = $(CORE_SOURCES) $(DRIVER_SOURCES)

OBJECTS = $(SOURCES:.c=.o)

#CFLAGS += -g

##### RULES #####

.c.o:
	gcc -c -DDOSVGA -I$(INCDIR) $(CFLAGS) $<

##### TARGETS #####

GL_LIB = dosmesa.a

default: $(LIBDIR)/$(GL_LIB)

clean:
	-del *.o

MAKELIB = AR ruv
RANLIB = ls

# Make the library
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
	$(MAKELIB) $(GL_LIB) $(OBJECTS)
	copy $(GL_LIB) $(LIBDIR)\$(GL_LIB)

include depend.dos
#

# Run 'make depend' to update the dependencies if you change what's included
# by any source file.
#
dep: $(SOURCES)
	makedep -fdepend -Y -I../include $(SOURCES)

