1 # Mesa 3-D graphics library
4 # Copyright (C) 1999 Brian Paul All Rights Reserved.
6 # Permission is hereby granted, free of charge, to any person obtaining a
7 # copy of this software and associated documentation files (the "Software"),
8 # to deal in the Software without restriction, including without limitation
9 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 # and/or sell copies of the Software, and to permit persons to whom the
11 # Software is furnished to do so, subject to the following conditions:
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 # BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 # DOS/DJGPP glut makefile v1.1 for Mesa 4.0
25 # Copyright (C) 2002 - Borca Daniel
26 # Email : dborca@yahoo.com
27 # Web : http://www.geocities.com/dborca
33 # Environment variables:
36 # GLIDE absolute path to Glide SDK; used with FX.
37 # default = $(TOP)/include/glide3
38 # FX=1 build for 3dfx Glide3; use it if you have the glide
39 # SDK (designed for your platform), and, of course, a
40 # 3dfx card... Note that this disables compilation of
41 # actual DMesa code, as Glide does all the stuff!
43 # MARK absolute path to original GLUT.
44 # default = $(TOP)/src-glut
48 # clean: remove object files
56 GLIDE ?= $(TOP)/include/glide3
57 MARK ?= $(TOP)/src-glut
64 CFLAGS += -I$(TOP)/include -I$(MARK)
66 CFLAGS += -D__DOS__ -I$(GLIDE) -DFX -DFX_GLIDE3 -DFXMESA_USE_ARGB
72 ifneq ($(wildcard $(DJDIR)/lib/dxe2.ld),)
73 DXE2GEN = $(wildcard $(addsuffix /dxe2gen.exe,$(subst ;, ,$(PATH))))
100 $(MARK)/glut_9x15.c \
101 $(MARK)/glut_hel10.c \
102 $(MARK)/glut_hel12.c \
103 $(MARK)/glut_hel18.c \
104 $(MARK)/glut_tr10.c \
107 SOURCES = $(CORE_SOURCES) $(PC_HW_SOURCES) $(MARK_SOURCES)
109 OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
112 $(CC) -o $@ -c $(CFLAGS) $<
114 $(CC) -o $@ -c $(CFLAGS) $<
116 $(CC) -o $@ -c $(CFLAGS) -x assembler-with-cpp $<
118 all: $(LIBDIR)/$(GLUT_LIB) $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP)
120 $(LIBDIR)/$(GLUT_LIB): $(OBJECTS)
121 $(AR) $(ARFLAGS) $(LIBDIR)/$(GLUT_LIB) $(OBJECTS)
123 $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS)
125 $(warning Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN)
126 $(warning somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.)
128 -dxe2gen -o $(LIBDIR)/$(GLUT_DXE) -I $(LIBDIR)/$(GLUT_IMP) $(OBJECTS) -E djgpp_ -E glut -D "Mesa DJGPP GLUT" -U
132 -$(RM) $(subst /,\,*.o)
133 -$(RM) $(subst /,\,PC_HW/*.o)
134 -$(RM) $(subst /,\,$(MARK)/*.o)