head	1.1;
access;
symbols
	merge-1:1.1
	autoconf:1.1.0.4
	experimental-1:1.1.0.2
	mesa-3-1-with-kw3:1.1
	mesa-3-1-prior-to-kw3:1.1;
locks; strict;
comment	@# @;


1.1
date	99.01.01.14.33.32;	author brianp;	state Exp;
branches;
next	;


desc
@makefile for cygnus
@


1.1
log
@Initial revision
@
text
@# $Id$

# Makefile.cyg
# Stephane Rehel (rehel@@worldnet.fr) April 13 1997

# Mesa 3-D graphics library
# Version:  3.1
# 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


# $Log$



##### MACROS #####

VPATH = RCS

INCDIR = ../include
LIBDIR = ../lib

CORE_SOURCES = accum.c alpha.c alphabuf.c api1.c api2.c attrib.c bitmap.c \
	blend.c clip.c colortab.c context.c copypix.c depth.c \
	dlist.c drawpix.c enable.c eval.c feedback.c fog.c \
	get.c hash.c image.c light.c lines.c logic.c masking.c matrix.c \
	misc.c mmath.c pb.c pixel.c points.c pointers.c polygon.c \
	quads.c rastpos.c readpix.c rect.c scissor.c shade.c span.c \
	stencil.c teximage.c texobj.c texstate.c texture.c triangle.c \
	varray.c winpos.c vb.c vbfill.c vbrender.c vbxform.c xform.c \
	zoom.c

DRIVER_SOURCES = wmesa.c mesa_extend.c osmesa.c fxwgl.c

OBJECTS = $(CORE_SOURCES:.c=.o) $(DRIVER_SOURCES:.c=.o)

WING_DLL=$(WING_DIR)/bin/wing32.dll
WING_INC=$(WING_DIR)/include

##### RULES #####

.c.o:
	$(CC) -c -I$(INCDIR) -I$(WING_INC) $(CFLAGS) -DNO_PARALLEL -DNO_STEREO $<


##### TARGETS #####

default:
	@@echo "Specify a target configuration"

clean:
	-rm *.o *~

targets: $(LIBDIR)/wing32.a $(LIBDIR)/$(GL_LIB)

# build ../lib/wing32.a from /wing/bin/wing32.dll
$(LIBDIR)/wing32.a: $(WING_DLL)
	dlltool -v --dllname $(WING_DLL) --def wing32.def \
		--output-exp wing32.exp --output-lib wing32_tmp.a
	ld -e _WinGBitBlt@@32 \
	   -e _WinGCreateBitmap@@12 \
	   -e _WinGCreateDC@@0 \
	   -e _WinGCreateHalftoneBrush@@12 \
	   -e _WinGCreateHalftonePalette@@0 \
	   -e _WinGGetDIBColorTable@@16 \
	   -e _WinGGetDIBPointer@@8 \
	   -e _WinGRecommendDIBFormat@@4 \
	   -e _WinGSetDIBColorTable@@16 \
	   -e _WinGStretchBlt@@40 \
	   -o $(LIBDIR)/wing32.a wing32.exp wing32_tmp.a --dll
	-rm -f wing32_tmp.a wing32.exp

# Make the library
$(LIBDIR)/$(GL_LIB): $(OBJECTS)
	$(MAKELIB) $(GL_LIB) $(MAJOR) $(MINOR) $(OBJECTS)
	mv $(GL_LIB)* $(LIBDIR)

include ../Make-config

include depend

wmesa.o: wmesa.c xform.h vb.h matrix.h depth.h tritemp.h

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

@
