1c041511dScube# Mesa 3-D graphics library 2c041511dScube# Version: 5.1 3c041511dScube# 4c041511dScube# Copyright (C) 1999-2003 Brian Paul All Rights Reserved. 5c041511dScube# 6c041511dScube# Permission is hereby granted, free of charge, to any person obtaining a 7c041511dScube# copy of this software and associated documentation files (the "Software"), 8c041511dScube# to deal in the Software without restriction, including without limitation 9c041511dScube# the rights to use, copy, modify, merge, publish, distribute, sublicense, 10c041511dScube# and/or sell copies of the Software, and to permit persons to whom the 11c041511dScube# Software is furnished to do so, subject to the following conditions: 12c041511dScube# 13c041511dScube# The above copyright notice and this permission notice shall be included 14c041511dScube# in all copies or substantial portions of the Software. 15c041511dScube# 16c041511dScube# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17c041511dScube# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18c041511dScube# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19c041511dScube# BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 20c041511dScube# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21c041511dScube# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22c041511dScube 23c041511dScube# MinGW core makefile v1.4 for Mesa 24c041511dScube# 25c041511dScube# Copyright (C) 2002 - Daniel Borca 26c041511dScube# Email : dborca@users.sourceforge.net 27c041511dScube# Web : http://www.geocities.com/dborca 28c041511dScube 29c041511dScube# MinGW core-glut makefile updated for Mesa 7.0 30c041511dScube# 31c041511dScube# Updated : by Heromyth, on 2007-7-21 32c041511dScube# Email : zxpmyth@yahoo.com.cn 33c041511dScube# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work. 34c041511dScube# The others havn't been tested yet. 35c041511dScube# 2) The generated DLLs are *not* compatible with the ones built 36c041511dScube# with the other compilers like VC8, especially for GLUT. 37c041511dScube# 3) Although more tests are needed, it can be used individually! 38c041511dScube 39c041511dScube 40c041511dScube# 41c041511dScube# Available options: 42c041511dScube# 43c041511dScube# Environment variables: 44c041511dScube# CFLAGS 45c041511dScube# 46c041511dScube# GLIDE path to Glide3 SDK; used with FX. 47c041511dScube# default = $(TOP)/glide3 48c041511dScube# FX=1 build for 3dfx Glide3. Note that this disables 49c041511dScube# compilation of most WMesa code and requires fxMesa. 50c041511dScube# As a consequence, you'll need the Win32 Glide3 51c041511dScube# library to build any application. 52c041511dScube# default = no 53c041511dScube# ICD=1 build the installable client driver interface 54c041511dScube# (windows opengl driver interface) 55c041511dScube# default = no 56c041511dScube# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow). 57c041511dScube# default = no 58c041511dScube# 59c041511dScube# Targets: 60c041511dScube# all: build GL 61c041511dScube# clean: remove object files 62c041511dScube# 63c041511dScube 64c041511dScube 65c041511dScube 66c041511dScube.PHONY: all clean 67c041511dScube.INTERMEDIATE: x86/gen_matypes.exe 68c041511dScube.SUFFIXES: .rc .res 69c041511dScube 70c041511dScube# Set this to the prefix of your build tools, i.e. mingw32- 71c041511dScubeTOOLS_PREFIX = mingw32- 72c041511dScube 73c041511dScubeTOP = ../../.. 74c041511dScube 75c041511dScubeLIBDIR = $(TOP)/lib 76c041511dScube 77c041511dScubeLIB_NAME = glut32 78c041511dScube 79c041511dScubeDLL_EXT = .dll 80c041511dScubeIMP_EXT = .a 81c041511dScubeLIB_PRE = lib 82c041511dScubeSTRIP = -s 83c041511dScube 84c041511dScubeAR = ar 85c041511dScubeARFLAGS = crus 86c041511dScubeDLLTOOL = dlltool 87c041511dScube 88c041511dScubeGLUT_DLL = $(LIB_NAME)$(DLL_EXT) 89c041511dScubeGLUT_IMP = $(LIB_PRE)$(LIB_NAME)$(IMP_EXT) 90c041511dScubeGLUT_DEF = $(LIB_NAME).def 91c041511dScube 92c041511dScubeLDLIBS = -L$(LIBDIR) -lwinmm -lgdi32 -luser32 -lopengl32 -lglu32 93c041511dScubeLDFLAGS = $(STRIP) -shared -fPIC -Wl,--kill-at 94c041511dScube 95c041511dScubeCFLAGS += -DBUILD_GLUT32 -DGLUT_BUILDING_LIB -DMESA -D_DLL 96c041511dScubeCFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include 97c041511dScube 98c041511dScubeCC = $(TOOLS_PREFIX)gcc 99c041511dScubeCXX = $(TOOLS_PREFIX)g++ 100c041511dScubeCXXFLAGS = $(CFLAGS) 101c041511dScube 102c041511dScubeAR = ar 103c041511dScubeARFLAGS = crus 104c041511dScube 105c041511dScubeUNLINK = del $(subst /,\,$(1)) 106c041511dScubeifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),) 107c041511dScubeUNLINK = $(RM) $(1) 108c041511dScubeendif 109c041511dScubeifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),) 110c041511dScubeUNLINK = $(RM) $(1) 111c041511dScubeendif 112c041511dScube 113c041511dScubeHDRS = glutint.h glutstroke.h glutbitmap.h glutwin32.h stroke.h win32_glx.h win32_x11.h 114c041511dScube 115c041511dScubeSRCS = \ 116c041511dScube glut_bitmap.c \ 117c041511dScube glut_bwidth.c \ 118c041511dScube glut_cindex.c \ 119c041511dScube glut_cmap.c \ 120c041511dScube glut_cursor.c \ 121c041511dScube glut_dials.c \ 122c041511dScube glut_dstr.c \ 123c041511dScube glut_event.c \ 124c041511dScube glut_ext.c \ 125b3dfa806Smrg glut_fcb.c \ 126c041511dScube glut_fullscrn.c \ 127c041511dScube glut_gamemode.c \ 128c041511dScube glut_get.c \ 129c041511dScube glut_init.c \ 130c041511dScube glut_input.c \ 131c041511dScube glut_joy.c \ 132c041511dScube glut_key.c \ 133c041511dScube glut_keyctrl.c \ 134c041511dScube glut_keyup.c \ 135c041511dScube glut_mesa.c \ 136c041511dScube glut_modifier.c \ 137c041511dScube glut_overlay.c \ 138c041511dScube glut_shapes.c \ 139c041511dScube glut_space.c \ 140c041511dScube glut_stroke.c \ 141c041511dScube glut_swap.c \ 142c041511dScube glut_swidth.c \ 143c041511dScube glut_tablet.c \ 144c041511dScube glut_teapot.c \ 145c041511dScube glut_util.c \ 146c041511dScube glut_vidresize.c \ 147c041511dScube glut_warp.c \ 148c041511dScube glut_win.c \ 149c041511dScube glut_winmisc.c \ 150c041511dScube win32_glx.c \ 151c041511dScube win32_menu.c \ 152c041511dScube win32_util.c \ 153c041511dScube win32_winproc.c \ 154c041511dScube win32_x11.c 155c041511dScube 156c041511dScube 157c041511dScubeSRCSSEMIGENS = \ 158c041511dScube glut_8x13.c \ 159c041511dScube glut_9x15.c \ 160c041511dScube glut_hel10.c \ 161c041511dScube glut_hel12.c \ 162c041511dScube glut_hel18.c \ 163c041511dScube glut_mroman.c \ 164c041511dScube glut_roman.c \ 165c041511dScube glut_tr10.c \ 166c041511dScube glut_tr24.c 167c041511dScube 168c041511dScube 169c041511dScube 170c041511dScubeSOURCES = $(SRCS) $(SRCSSEMIGENS) 171c041511dScube 172c041511dScubeOBJECTS = $(addsuffix .o,$(basename $(SOURCES))) 173c041511dScube 174c041511dScube.c.o: 175c041511dScube $(CC) -o $@ $(CFLAGS) -c $< 176c041511dScube.cc.o: 177c041511dScube $(CXX) -o $@ $(CXXFLAGS) -c $< 178c041511dScube 179c041511dScube 180c041511dScubeall: $(LIBDIR) $(LIBDIR)/$(GLUT_DLL) $(LIBDIR)/$(GLUT_IMP) 181c041511dScube 182c041511dScube$(LIBDIR): 183c041511dScube mkdir -p $(LIBDIR) 184c041511dScube 185c041511dScube$(LIBDIR)/$(GLUT_DLL) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS) 186c041511dScube $(CXX) $(LDFLAGS) -o $(LIBDIR)/$(GLUT_DLL) $^ $(LDLIBS) 187c041511dScube $(DLLTOOL) --as=as --dllname $(LIB_NAME) --output-def $(LIBDIR)/$(GLUT_DEF) $^ 188c041511dScube $(DLLTOOL) --as=as -k --dllname $(LIB_NAME) --output-lib $(LIBDIR)/$(GLUT_IMP) --def $(LIBDIR)/$(GLUT_DEF) 189c041511dScube 190c041511dScubeclean: 191c041511dScube -$(call UNLINK,*.o)