Ensure recursive makes always propagate errors
[mesa.git] / src / glu / sgi / Makefile.DJ
1 # Mesa 3-D graphics library
2 # Version: 4.0
3 #
4 # Copyright (C) 1999 Brian Paul All Rights Reserved.
5 #
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:
12 #
13 # The above copyright notice and this permission notice shall be included
14 # in all copies or substantial portions of the Software.
15 #
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.
22
23 # DOS/DJGPP glu makefile v1.5 for Mesa
24 #
25 # Copyright (C) 2002 - Daniel Borca
26 # Email : dborca@users.sourceforge.net
27 # Web : http://www.geocities.com/dborca
28
29
30 #
31 # Available options:
32 #
33 # Environment variables:
34 # CFLAGS
35 #
36 # Targets:
37 # all: build GLU
38 # clean: remove object files
39 #
40
41
42
43 .PHONY: all clean
44
45 TOP = ../../..
46 LIBDIR = $(TOP)/lib
47 GLU_LIB = libglu.a
48 GLU_DXE = glu.dxe
49 GLU_IMP = libiglu.a
50
51 export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH);$(LIBDIR);$(GLIDE)/lib
52
53 CC = gcc
54 CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude
55 CXX = gpp
56 CXXFLAGS = $(CFLAGS) -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
57
58 AR = ar
59 ARFLAGS = crus
60
61 HAVEDXE3 = $(wildcard $(DJDIR)/bin/dxe3gen.exe)
62
63 ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
64 UNLINK = del $(subst /,\,$(1))
65 else
66 UNLINK = $(RM) $(1)
67 endif
68
69 C_SOURCES = \
70 libutil/error.c \
71 libutil/glue.c \
72 libutil/mipmap.c \
73 libutil/project.c \
74 libutil/quad.c \
75 libutil/registry.c \
76 libtess/dict.c \
77 libtess/geom.c \
78 libtess/memalloc.c \
79 libtess/mesh.c \
80 libtess/normal.c \
81 libtess/priorityq.c \
82 libtess/render.c \
83 libtess/sweep.c \
84 libtess/tess.c \
85 libtess/tessmono.c
86
87 CC_SOURCES = \
88 libnurbs/interface/bezierEval.cc \
89 libnurbs/interface/bezierPatch.cc \
90 libnurbs/interface/bezierPatchMesh.cc \
91 libnurbs/interface/glcurveval.cc \
92 libnurbs/interface/glinterface.cc \
93 libnurbs/interface/glrenderer.cc \
94 libnurbs/interface/glsurfeval.cc \
95 libnurbs/interface/incurveeval.cc \
96 libnurbs/interface/insurfeval.cc \
97 libnurbs/internals/arc.cc \
98 libnurbs/internals/arcsorter.cc \
99 libnurbs/internals/arctess.cc \
100 libnurbs/internals/backend.cc \
101 libnurbs/internals/basiccrveval.cc \
102 libnurbs/internals/basicsurfeval.cc \
103 libnurbs/internals/bin.cc \
104 libnurbs/internals/bufpool.cc \
105 libnurbs/internals/cachingeval.cc \
106 libnurbs/internals/ccw.cc \
107 libnurbs/internals/coveandtiler.cc \
108 libnurbs/internals/curve.cc \
109 libnurbs/internals/curvelist.cc \
110 libnurbs/internals/curvesub.cc \
111 libnurbs/internals/dataTransform.cc \
112 libnurbs/internals/displaylist.cc \
113 libnurbs/internals/flist.cc \
114 libnurbs/internals/flistsorter.cc \
115 libnurbs/internals/hull.cc \
116 libnurbs/internals/intersect.cc \
117 libnurbs/internals/knotvector.cc \
118 libnurbs/internals/mapdesc.cc \
119 libnurbs/internals/mapdescv.cc \
120 libnurbs/internals/maplist.cc \
121 libnurbs/internals/mesher.cc \
122 libnurbs/internals/monoTriangulationBackend.cc \
123 libnurbs/internals/monotonizer.cc \
124 libnurbs/internals/mycode.cc \
125 libnurbs/internals/nurbsinterfac.cc \
126 libnurbs/internals/nurbstess.cc \
127 libnurbs/internals/patch.cc \
128 libnurbs/internals/patchlist.cc \
129 libnurbs/internals/quilt.cc \
130 libnurbs/internals/reader.cc \
131 libnurbs/internals/renderhints.cc \
132 libnurbs/internals/slicer.cc \
133 libnurbs/internals/sorter.cc \
134 libnurbs/internals/splitarcs.cc \
135 libnurbs/internals/subdivider.cc \
136 libnurbs/internals/tobezier.cc \
137 libnurbs/internals/trimline.cc \
138 libnurbs/internals/trimregion.cc \
139 libnurbs/internals/trimvertpool.cc \
140 libnurbs/internals/uarray.cc \
141 libnurbs/internals/varray.cc \
142 libnurbs/nurbtess/directedLine.cc \
143 libnurbs/nurbtess/gridWrap.cc \
144 libnurbs/nurbtess/monoChain.cc \
145 libnurbs/nurbtess/monoPolyPart.cc \
146 libnurbs/nurbtess/monoTriangulation.cc \
147 libnurbs/nurbtess/partitionX.cc \
148 libnurbs/nurbtess/partitionY.cc \
149 libnurbs/nurbtess/polyDBG.cc \
150 libnurbs/nurbtess/polyUtil.cc \
151 libnurbs/nurbtess/primitiveStream.cc \
152 libnurbs/nurbtess/quicksort.cc \
153 libnurbs/nurbtess/rectBlock.cc \
154 libnurbs/nurbtess/sampleComp.cc \
155 libnurbs/nurbtess/sampleCompBot.cc \
156 libnurbs/nurbtess/sampleCompRight.cc \
157 libnurbs/nurbtess/sampleCompTop.cc \
158 libnurbs/nurbtess/sampleMonoPoly.cc \
159 libnurbs/nurbtess/sampledLine.cc \
160 libnurbs/nurbtess/searchTree.cc
161
162 SOURCES = $(C_SOURCES) $(CC_SOURCES)
163
164 OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
165
166 .c.o:
167 $(CC) -o $@ $(CFLAGS) -c $<
168 .cc.o:
169 $(CXX) -o $@ $(CXXFLAGS) -c $<
170
171 all: $(LIBDIR)/$(GLU_LIB) $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP)
172
173 $(LIBDIR)/$(GLU_LIB): $(OBJECTS)
174 $(AR) $(ARFLAGS) $@ $^
175
176 $(LIBDIR)/$(GLU_DXE) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)
177 ifeq ($(HAVEDXE3),)
178 $(warning Missing DXE3 package... Skipping $(GLU_DXE))
179 else
180 -dxe3gen -o $(LIBDIR)/$(GLU_DXE) -Y $(LIBDIR)/$(GLU_IMP) -D "MesaGLU/SGI DJGPP" -E _glu -P gl.dxe -U $^
181 endif
182
183 clean:
184 -$(call UNLINK,libutil/*.o)
185 -$(call UNLINK,libtess/*.o)
186 -$(call UNLINK,libnurbs/interface/*.o)
187 -$(call UNLINK,libnurbs/internals/*.o)
188 -$(call UNLINK,libnurbs/nurbtess/*.o)