1 # DOS/DJGPP Mesa Utility Toolkit
4 # Copyright (C) 2005 Daniel Borca 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 # DANIEL BORCA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 # IN 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.
27 # Environment variables:
30 # GLIDE path to Glide3 SDK; used to resolve DXEs.
31 # default = $(TOP)/glide3
35 # clean: remove object files
43 GLIDE ?= $(TOP)/glide3
49 export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib
52 CFLAGS += -I$(TOP)/include -I. -IPC_HW
53 CFLAGS += -DGLUT_IMPORT_LIB
58 HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe)
60 ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
61 UNLINK = del $(subst /,\,$(1))
99 SOURCES = $(CORE_SOURCES) $(PC_HW_SOURCES)
101 OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
104 $(CC) -o $@ $(CFLAGS) -c $<
106 $(CC) -o $@ $(CFLAGS) -c $<
108 $(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $<
110 all: $(LIBDIR)/$(GLUT_LIB) $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP)
112 $(LIBDIR)/$(GLUT_LIB): $(OBJECTS)
113 $(AR) $(ARFLAGS) $@ $^
115 $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS)
117 $(warning Missing DXE3 package... Skipping $(GLUT_DXE))
119 -dxe3gen -o $(LIBDIR)/$(GLUT_DXE) -Y $(LIBDIR)/$(GLUT_IMP) -D "MesaGLUT DJGPP" -E _glut -P gl.dxe -U $^
124 -$(call UNLINK,PC_HW/*.o)