summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Nicholson <[email protected]>2007-10-29 09:03:01 -0600
committerBrian <[email protected]>2007-10-29 09:03:01 -0600
commitc05aa5ec4cc29f949eff350582cb6f6c03dce3c6 (patch)
tree7fbd2ddd53a5eabacd35e12b407e203a7d2b2853
parentb59dbd822f353cbf0db404f14c2721c79cde79fc (diff)
specify app lib dependencies in Makefiles (patch 1/3)
-rw-r--r--progs/beos/Makefile10
-rw-r--r--progs/demos/Makefile16
-rw-r--r--progs/directfb/Makefile4
-rw-r--r--progs/fbdev/Makefile3
-rw-r--r--progs/fp/Makefile2
-rw-r--r--progs/glsl/Makefile6
-rw-r--r--progs/miniglx/Makefile4
-rw-r--r--progs/osdemos/Makefile4
-rw-r--r--progs/redbook/Makefile4
-rw-r--r--progs/samples/Makefile6
-rw-r--r--progs/slang/Makefile8
-rw-r--r--progs/tests/Makefile2
-rw-r--r--progs/trivial/Makefile2
-rw-r--r--progs/vp/Makefile2
-rw-r--r--progs/xdemos/Makefile16
15 files changed, 55 insertions, 34 deletions
diff --git a/progs/beos/Makefile b/progs/beos/Makefile
index 45782fb3cf7..491e8e442d1 100644
--- a/progs/beos/Makefile
+++ b/progs/beos/Makefile
@@ -10,7 +10,9 @@ include $(TOP)/configs/current
#
# Modified by Philippe Houdoin
-LDFLAGS += -soname=_APP_ $(APP_LIB_DEPS)
+LDFLAGS += -soname=_APP_
+
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
INCLUDES = -I. -I- -I../../include
@@ -21,13 +23,13 @@ clean:
rm -f *.o
demo: demo.o
- $(LD) demo.o $(LDFLAGS) -o $@
+ $(LD) demo.o $(LDFLAGS) $(LIBS) -o $@
sample: sample.o
- $(LD) sample.o $(LDFLAGS) -o $@
+ $(LD) sample.o $(LDFLAGS) $(LIBS) -o $@
GTLInfo: GLInfo.o
- $(LD) GLInfo.o $(INCLUDES) $(LDFLAGS) -o $@
+ $(LD) GLInfo.o $(INCLUDES) $(LDFLAGS) $(LIBS) -o $@
.cpp.o:
$(CC) -c $< $(INCLUDES) $(CFLAGS) -o $@
diff --git a/progs/demos/Makefile b/progs/demos/Makefile
index 4d9eb30b684..57e56f52a33 100644
--- a/progs/demos/Makefile
+++ b/progs/demos/Makefile
@@ -13,6 +13,8 @@ OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
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)
+
PROGS = \
arbfplight \
arbfslight \
@@ -75,7 +77,7 @@ PROGS = \
# make executable from .c file:
.c: $(LIB_DEP) readtex.o
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< readtex.o $(LIBS) -o $@
##### TARGETS #####
@@ -119,35 +121,35 @@ extfuncs.h: $(TOP)/progs/util/extfuncs.h
reflect: reflect.o showbuffer.o readtex.o
- $(CC) $(LDFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) reflect.o showbuffer.o readtex.o $(LIBS) -o $@
reflect.o: reflect.c showbuffer.h
$(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
shadowtex: shadowtex.o showbuffer.o
- $(CC) $(LDFLAGS) shadowtex.o showbuffer.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) shadowtex.o showbuffer.o $(LIBS) -o $@
shadowtex.o: shadowtex.c showbuffer.h
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
gloss: gloss.o trackball.o readtex.o
- $(CC) $(LDFLAGS) gloss.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) gloss.o trackball.o readtex.o $(LIBS) -o $@
gloss.o: gloss.c trackball.h
$(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
engine: engine.o trackball.o readtex.o
- $(CC) $(LDFLAGS) engine.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) engine.o trackball.o readtex.o $(LIBS) -o $@
engine.o: engine.c trackball.h
$(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
fslight: fslight.o
- $(CC) $(LDFLAGS) fslight.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) fslight.o $(LIBS) -o $@
fslight.o: fslight.c extfuncs.h
$(CC) -c -I$(INCDIR) $(CFLAGS) fslight.c
@@ -155,7 +157,7 @@ fslight.o: fslight.c extfuncs.h
viewdds: viewdds.c
- $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -L. -lgltc -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(LIBS) -L. -lgltc -o $@
clean:
diff --git a/progs/directfb/Makefile b/progs/directfb/Makefile
index e03680e5164..93c2a7df14b 100644
--- a/progs/directfb/Makefile
+++ b/progs/directfb/Makefile
@@ -11,6 +11,8 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
CFLAGS += $(shell pkg-config --cflags directfb)
APP_LIB_DEPS += $(shell pkg-config --libs directfb)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+
PROGS = df_gears \
df_reflect \
df_morph3d \
@@ -22,7 +24,7 @@ PROGS = df_gears \
.SUFFIXES: .c
.c: $(LIB_DEP)
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
##### TARGETS #####
diff --git a/progs/fbdev/Makefile b/progs/fbdev/Makefile
index 92bfd043c13..56daf56f8a7 100644
--- a/progs/fbdev/Makefile
+++ b/progs/fbdev/Makefile
@@ -15,6 +15,7 @@ INCLUDES = \
-I. \
-I$(TOP)/include
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
##### RULES #####
@@ -22,7 +23,7 @@ INCLUDES = \
.SUFFIXES: .c
.c:
- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
+ $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
diff --git a/progs/fp/Makefile b/progs/fp/Makefile
index d979be83d34..a395b734ef6 100644
--- a/progs/fp/Makefile
+++ b/progs/fp/Makefile
@@ -8,7 +8,7 @@ TOP = ../..
include $(TOP)/configs/current
-LIBS = $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
SOURCES = \
tri-abs.c \
diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile
index 8b44239b43e..fe2943d88dd 100644
--- a/progs/glsl/Makefile
+++ b/progs/glsl/Makefile
@@ -7,6 +7,8 @@ INCDIR = $(TOP)/include
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)
+
PROGS = \
bitmap \
brick \
@@ -28,7 +30,7 @@ PROGS = \
# make executable from .c file:
.c: $(LIB_DEP)
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
##### TARGETS #####
@@ -64,7 +66,7 @@ points.c: extfuncs.h
toyball.c: extfuncs.h
texdemo1: texdemo1.o readtex.o
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o $(LIBS) -o $@
texdemo1.o: texdemo1.c readtex.h extfuncs.h
$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
diff --git a/progs/miniglx/Makefile b/progs/miniglx/Makefile
index 56cecf40813..5d0c8eae64f 100644
--- a/progs/miniglx/Makefile
+++ b/progs/miniglx/Makefile
@@ -20,6 +20,8 @@ INCLUDES = \
-I. \
-I$(TOP)/include
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+
##### RULES #####
@@ -27,7 +29,7 @@ INCLUDES = \
.SUFFIXES: .c
.c:
- $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
+ $(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
diff --git a/progs/osdemos/Makefile b/progs/osdemos/Makefile
index 7e657744e36..148d603b353 100644
--- a/progs/osdemos/Makefile
+++ b/progs/osdemos/Makefile
@@ -13,6 +13,8 @@ OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
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)
+
PROGS = \
osdemo \
ostest1
@@ -26,7 +28,7 @@ PROGS = \
# make executable from .c file:
.c: $(LIB_DEP) readtex.o
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< readtex.o $(LIBS) -o $@
##### TARGETS #####
diff --git a/progs/redbook/Makefile b/progs/redbook/Makefile
index 078f19125a8..7ba676c265b 100644
--- a/progs/redbook/Makefile
+++ b/progs/redbook/Makefile
@@ -7,6 +7,8 @@ INCDIR = $(TOP)/include
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)
+
PROGS = aaindex aapoly aargb accanti accpersp alpha alpha3D anti \
bezcurve bezmesh checker clip colormat cube depthcue dof \
double drawf feedback fog fogindex font hello image light \
@@ -24,7 +26,7 @@ PROGS = aaindex aapoly aargb accanti accpersp alpha alpha3D anti \
.SUFFIXES: .c
.c: $(LIB_DEP)
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
diff --git a/progs/samples/Makefile b/progs/samples/Makefile
index 8c99e8df250..6509a559a50 100644
--- a/progs/samples/Makefile
+++ b/progs/samples/Makefile
@@ -7,6 +7,8 @@ INCDIR = $(TOP)/include
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)
+
PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
font line logo nurb olympic overlay point prim quad select \
shape sphere star stencil stretch texture tri wave
@@ -18,7 +20,7 @@ PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
.SUFFIXES: .c
.c: $(LIB_DEP)
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
##### TARGETS #####
@@ -27,7 +29,7 @@ default: $(PROGS)
sphere: sphere.o readtex.o
- $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) sphere.o readtex.o $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) sphere.o readtex.o $(LIBS) -o $@
sphere.o: sphere.c readtex.h
$(CC) -c -I$(INCDIR) $(CFLAGS) sphere.c
diff --git a/progs/slang/Makefile b/progs/slang/Makefile
index 61db26d0807..ea1e9b6afdd 100644
--- a/progs/slang/Makefile
+++ b/progs/slang/Makefile
@@ -8,6 +8,8 @@ INCDIR = $(TOP)/include
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+
#
# targets
#
@@ -29,13 +31,13 @@ clean:
#
cltest: cltest.o framework.o $(LIB_DEP)
- $(CC) $(LDFLAGS) cltest.o framework.o $(APP_LIB_DEPS) -o cltest
+ $(CC) $(LDFLAGS) cltest.o framework.o $(LIBS) -o cltest
sotest: sotest.o framework.o $(LIB_DEP)
- $(CC) $(LDFLAGS) sotest.o framework.o $(APP_LIB_DEPS) -o sotest
+ $(CC) $(LDFLAGS) sotest.o framework.o $(LIBS) -o sotest
vstest: vstest.o framework.o $(LIB_DEP)
- $(CC) $(LDFLAGS) vstest.o framework.o $(APP_LIB_DEPS) -o vstest
+ $(CC) $(LDFLAGS) vstest.o framework.o $(LIBS) -o vstest
#
# objects
diff --git a/progs/tests/Makefile b/progs/tests/Makefile
index e8d0edda3a3..454b0adf9c1 100644
--- a/progs/tests/Makefile
+++ b/progs/tests/Makefile
@@ -8,7 +8,7 @@ TOP = ../..
include $(TOP)/configs/current
-LIBS = $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
SOURCES = \
afsmultiarb.c \
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile
index 259e20aa57d..7610a5df08c 100644
--- a/progs/trivial/Makefile
+++ b/progs/trivial/Makefile
@@ -8,7 +8,7 @@ TOP = ../..
include $(TOP)/configs/current
-LIBS = $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
SOURCES = \
clear.c \
diff --git a/progs/vp/Makefile b/progs/vp/Makefile
index 4952a52fc98..3349fd53428 100644
--- a/progs/vp/Makefile
+++ b/progs/vp/Makefile
@@ -8,7 +8,7 @@ TOP = ../..
include $(TOP)/configs/current
-LIBS = $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
SOURCES = \
vp-tris.c
diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile
index a7ba9afcac7..d49b3d2f5c2 100644
--- a/progs/xdemos/Makefile
+++ b/progs/xdemos/Makefile
@@ -8,6 +8,8 @@ INCDIR = $(TOP)/include
LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+
PROGS = \
corender \
glthreads \
@@ -41,7 +43,7 @@ PROGS = \
.SUFFIXES: .c
.c: $(LIB_DEP)
- $(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
+ $(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
##### TARGETS #####
@@ -56,10 +58,10 @@ clean:
# special cases
pbinfo: pbinfo.o pbutil.o
- $(CC) $(LDFLAGS) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) pbinfo.o pbutil.o $(LIBS) -o $@
pbdemo: pbdemo.o pbutil.o
- $(CC) $(LDFLAGS) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) pbdemo.o pbutil.o $(LIBS) -o $@
pbinfo.o: pbinfo.c pbutil.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
@@ -71,13 +73,13 @@ pbutil.o: pbutil.c pbutil.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbutil.c
glxgears_fbconfig: glxgears_fbconfig.o pbutil.o
- $(CC) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(LIBS) -o $@
glxgears_fbconfig.o: glxgears_fbconfig.c pbutil.h
$(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) -c -I. $(CFLAGS) glxgears_fbconfig.c
xrotfontdemo: xrotfontdemo.o xuserotfont.o
- $(CC) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(LIBS) -o $@
xuserotfont.o: xuserotfont.c xuserotfont.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
@@ -86,10 +88,10 @@ xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
corender: corender.o ipc.o
- $(CC) $(CFLAGS) corender.o ipc.o $(APP_LIB_DEPS) -o $@
+ $(CC) $(CFLAGS) corender.o ipc.o $(LIBS) -o $@
corender.o: corender.c ipc.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c
ipc.o: ipc.c ipc.h
- $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) ipc.c \ No newline at end of file
+ $(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) ipc.c