From 573dd2206b1f3653fd10796e1de13c058d878e32 Mon Sep 17 00:00:00 2001 From: Karl Schultz Date: Tue, 18 Sep 2001 20:47:23 +0000 Subject: clean up makefiles some more for Windows --- src/mesa/drivers/osmesa/Makefile.win | 21 ++++++++++----------- src/mesa/main/Makefile.win | 10 +++++++--- 2 files changed, 17 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/osmesa/Makefile.win b/src/mesa/drivers/osmesa/Makefile.win index a9597c2714..c754782b52 100644 --- a/src/mesa/drivers/osmesa/Makefile.win +++ b/src/mesa/drivers/osmesa/Makefile.win @@ -6,32 +6,31 @@ TOP = ..\.. OSMESA_SRCS = osmesa.c OSMESA_OBJS = osmesa.obj -OSMESALIB = OSmesa.lib ASM_SRCS = -CORE_SRCS = $(OSMESA_SRCS) -DRIVER_SRCS = +CORE_SRCS = +DRIVER_SRCS = $(OSMESA_SRCS) SRCS = $(OSMESA_SRCS) -all : osmesalib install +all : osmesalib !include "$(TOP)/mesawin32.mak" -osmesalib : $(OSMESALIB) +osmesalib: $(OSMESALIB) -CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -I$(TOP)/src +# Undefine _DLL because osmesa is a LIB, not a DLL +CFLAGS = $(cvarsdll) $(CFLAGS) -U_DLL -D_OPENGL32_ -I$(TOP)/src LFLAGS = /LIB OBJS = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj) -LIBS = $(TOP)/lib/OpenGL32.lib $(TOP)/src/opengl32.exp +LIBS = $(TOP)/lib/$(MESALIB) $(OSMESALIB) : $(OBJS) $(link) $(LFLAGS) -out:$(OSMESALIB) $(OBJS) $(LIBS) - -install : $(OSMESALIB) @echo "copying OSMesa library to library directory..." -copy $(OSMESALIB) $(TOP)\lib -clean :: - @del /f osmesa.obj +install : $(OSMESALIB) + @echo "copying OSMesa library to system library directory..." + -copy $(OSMESALIB) $(LIBINSTALL) diff --git a/src/mesa/main/Makefile.win b/src/mesa/main/Makefile.win index 3b78249ea9..65b6ed809e 100644 --- a/src/mesa/main/Makefile.win +++ b/src/mesa/main/Makefile.win @@ -1,6 +1,6 @@ # Makefile for Win32 # -# NOTE: the install target may overwrite important files in the system dir +# NOTE: the install target may overwrite important files in the system dirs # Sept 12, 2001 # Windows driver not working. OSMesa driver works. # @@ -157,7 +157,7 @@ CFLAGS = $(cvarsdll) $(CFLAGS) -D_OPENGL32_ -DBUILD_GL32 -DNO_PARALLEL -DNO_STER LFLAGS = $(dlllflags) $(LFLAGS) OBJS = $(ASM_SRCS:.S=.obj) $(CORE_SRCS:.c=.obj) $(DRIVER_SRCS:.c=.obj) -LIBS = $(GLU) winmm.lib $(guilibsdll) +LIBS = winmm.lib $(guilibsdll) $(MESADLL) : $(OBJS) mesa.def $(link) $(LFLAGS) -out:$(MESADLL) -def:mesa.def $(OBJS) $(LIBS) @@ -174,6 +174,7 @@ $(SUBDIRS) : @cd .. install : $(MESADLL) + @echo. @echo "copying Mesa dynamic link library to system directory..." -copy $(MESADLL) $(DLLINSTALL) @echo "copying Mesa header files to include directory..." @@ -192,7 +193,10 @@ clean :: @del /f osmesa\*.obj @del /f Windows\*.obj +clobber :: + @del /f OSmesa\*.lib + # override default inference rule with one that writes the object to -# the correct subdir +# the same subdir that the c file is in. .c.obj : $(cc) $(CFLAGS) -I. $< /Fo$*.obj -- cgit v1.2.3