fc189bd8047031299d5616b6f6600fc91827e17c
[mesa.git] / src / glu / mesa / Makefile.ugl
1 # Mesa 3-D graphics library
2 # Version: 3.5
3 #
4 # Copyright (C) 2001 Wind River Systems, Inc
5
6 # The MIT License
7 # Permission is hereby granted, free of charge, to any person obtaining a
8 # copy of this software and associated documentation files (the "Software"),
9 # to deal in the Software without restriction, including without limitation
10 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
11 # and/or sell copies of the Software, and to permit persons to whom the
12 # Software is furnished to do so, subject to the following conditions:
13 #
14 # The above copyright notice and this permission notice shall be included
15 # in all copies or substantial portions of the Software.
16 #
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 # DEALINGS IN THE SOFTWARE.
24
25 # Makefile for GLU library
26
27 ##### MACROS #####
28 GLU_MAJOR = 1
29 GLU_MINOR = 3
30 GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
31
32 ##### RULES #####
33
34 include ../rules.windml
35
36 GLU_SOURCES = \
37 glu.c \
38 mipmap.c \
39 nurbs.c \
40 nurbscrv.c \
41 nurbssrf.c \
42 nurbsutl.c \
43 polytest.c \
44 project.c \
45 quadric.c \
46 tess.c \
47 tesselat.c \
48 ../src/windml/tornado/torMesaGLUInit.c
49
50 GLU_OBJECTS = $(GLU_SOURCES:.c=.o)
51 GLU_OBJNAME = $(MESA_LIBDIR)/objMesaGLU.o
52
53 SOURCES = $(GLU_SOURCES)
54
55 ##### TARGETS #####
56
57 all: depend.$(CPU)$(TOOL) $(GLU_OBJNAME)
58
59 # Make the GLU library
60 $(GLU_OBJNAME): $(GLU_OBJECTS)
61 # $(LD) -r $(GLU_OBJECTS) -o $(MESA_OBJNAME)
62 $(LD) -r $(GLU_OBJECTS) -o $(GLU_OBJNAME)
63 # $(AR) rus $(MESA_LIBNAME) $(GLU_OBJNAME)
64 # $(AR) rus $(VX_LIBNAME) $(GLU_OBJNAME)
65
66 depend.$(CPU)$(TOOL):
67 ifeq ($(WIND_HOST_TYPE),x86-win32)
68 @ $(RM) $@
69 @ $(ECHO) Creating depend.$(CPU)$(TOOL)
70 ifneq ($(SOURCES),)
71 @ for %f in ($(SOURCES)) do \
72 $(CC) -MM $(CFLAGS) %f >>$@
73 endif
74 else
75 Makefile
76 @ $(RM) $@
77 @ $(ECHO) "Creating depend.$(CPU)$(TOOL)"
78 ifneq ($(SOURCES),)
79 @ for FILE in $(filter-out $(NODEPENDOBJS), $(SOURCES)); \
80 do \
81 $(CC) -MM $(CFLAGS) $$FILE \
82 | $(TCL) $(BIN_DIR)/depend.tcl $(TGT_DIR) >>$@; \
83 done
84 endif
85 endif
86
87 .PHONY = clean
88
89 clean:
90 # $(AR) d $(MESA_LIBNAME) $(GLU_OBJNAME)
91 # $(AR) d $(VX_LIBNAME) $(GLU_OBJNAME)
92 $(RM) $(GLU_OBJNAME)
93 $(RM) $(GLU_OBJECTS)
94 $(RM) depend.$(CPU)$(TOOL)
95
96 include depend.$(CPU)$(TOOL)