summaryrefslogtreecommitdiffstats
path: root/src/glut/dos/Makefile.DJ
diff options
context:
space:
mode:
Diffstat (limited to 'src/glut/dos/Makefile.DJ')
-rw-r--r--src/glut/dos/Makefile.DJ20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/glut/dos/Makefile.DJ b/src/glut/dos/Makefile.DJ
index 7cacd8d0090..7a26eb2d0c9 100644
--- a/src/glut/dos/Makefile.DJ
+++ b/src/glut/dos/Makefile.DJ
@@ -20,7 +20,7 @@
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-# DOS/DJGPP glut makefile v0.2 for Mesa 4.0
+# DOS/DJGPP glut makefile v0.4 for Mesa 4.0
#
# Copyright (C) 2002 - Borca Daniel
# Email : [email protected]
@@ -36,7 +36,15 @@ AR = ar
ARFLAGS = ruv
LIBDIR = $(TOP)/lib
+ifeq ($(wildcard $(DJDIR)/lib/dxe2.ld),)
+DXE2GEN =
+else
+DXE2GEN = $(wildcard $(addsuffix /dxe2gen.exe,$(subst ;, ,$(PATH))))
+endif
+
GLUT_LIB = libglut.a
+GLUT_DXE = glut.dxe
+GLUT_IMP = libiglut.a
CORE_SOURCES = \
callback.c \
@@ -69,11 +77,19 @@ OBJECTS = $(SOURCES:.c=.o) $(PC_HW_OBJECTS)
.c.o:
gcc -o $@ -c $(CFLAGS) $<
-all: $(LIBDIR)/$(GLUT_LIB)
+all: $(LIBDIR)/$(GLUT_LIB) $(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP)
$(LIBDIR)/$(GLUT_LIB): $(OBJECTS)
$(AR) $(ARFLAGS) $(LIBDIR)/$(GLUT_LIB) $(OBJECTS)
+$(LIBDIR)/$(GLUT_DXE) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS)
+ifeq ($(DXE2GEN),)
+ @echo Missing DXE2GEN and/or DXE2.LD! You must have DXE2GEN
+ @echo somewhere in PATH, and DXE2.LD in DJGPP/LIB directory.
+else
+ dxe2gen -o $(LIBDIR)/$(GLUT_DXE) -I $(LIBDIR)/$(GLUT_IMP) $(OBJECTS) -D "DOS Glut" -U
+endif
+
clean:
-$(RM) *.o
-$(RM) PC_HW\*.o