Commit f1efacb9 authored by Dan Nicholson's avatar Dan Nicholson

Make osdemos linking like other programs

Most of the programs list their dependencies on the Mesa libraries in
their Makefiles. This works with the default configuration where
APP_LIB_DEPS only lists external libraries. This changes the
linux-osmesa configs and the osdemos Makefile to follow that convention.

Some cleanup of the Makefile is also added to refer to the GL libraries
through the existing variables rather than hardcoding their names.
parent 6aaf9bdd
...@@ -25,4 +25,4 @@ PROGRAM_DIRS = osdemos ...@@ -25,4 +25,4 @@ PROGRAM_DIRS = osdemos
# Dependencies # Dependencies
OSMESA_LIB_DEPS = -lm -lpthread OSMESA_LIB_DEPS = -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa -lGLU APP_LIB_DEPS = -lm -lpthread
...@@ -28,4 +28,4 @@ PROGRAM_DIRS = ...@@ -28,4 +28,4 @@ PROGRAM_DIRS =
# Dependencies # Dependencies
OSMESA_LIB_DEPS = -lm -lpthread OSMESA_LIB_DEPS = -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa16 APP_LIB_DEPS = -lm -lpthread
...@@ -29,4 +29,4 @@ PROGRAM_DIRS = ...@@ -29,4 +29,4 @@ PROGRAM_DIRS =
# Dependencies # Dependencies
OSMESA_LIB_DEPS = -lm -lpthread OSMESA_LIB_DEPS = -lm -lpthread
APP_LIB_DEPS = -lOSMesa16 APP_LIB_DEPS = -lm -lpthread
...@@ -28,4 +28,4 @@ PROGRAM_DIRS = ...@@ -28,4 +28,4 @@ PROGRAM_DIRS =
# Dependencies # Dependencies
OSMESA_LIB_DEPS = -lm -lpthread OSMESA_LIB_DEPS = -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB) GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(OSMESA_LIB)
APP_LIB_DEPS = -lOSMesa32 APP_LIB_DEPS = -lm -lpthread
...@@ -5,15 +5,19 @@ include $(TOP)/configs/current ...@@ -5,15 +5,19 @@ include $(TOP)/configs/current
INCDIR = $(TOP)/include INCDIR = $(TOP)/include
OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -lOSMesa $(APP_LIB_DEPS) OSMESA_LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(OSMESA_LIB) $(APP_LIB_DEPS)
OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS) OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -lOSMesa16 -l$(GLU_LIB) \
-l$(GL_LIB) $(APP_LIB_DEPS)
OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS) OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -lOSMesa32 -l$(GLU_LIB) \
-l$(GL_LIB) $(APP_LIB_DEPS)
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME) LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
$(APP_LIB_DEPS)
PROGS = \ PROGS = \
osdemo \ osdemo \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment