Commit 2a3e3386 authored by Dan Nicholson's avatar Dan Nicholson Committed by Brian

add support for LDFLAGS env var

parent e776e7a9
......@@ -34,6 +34,7 @@ MINOR=0
PATCH=""
DEPS=""
LINK=""
LDFLAGS=""
CPLUSPLUS=0
STATIC=0
DLOPEN=0
......@@ -63,6 +64,7 @@ do
echo ' -LDIR search in DIR for library dependencies'
echo ' -linker L explicity specify the linker program to use (eg: gcc, g++)'
echo ' Not observed on all systems at this time.'
echo ' -ldflags OPT specify any additional linker flags in OPT'
echo ' -cplusplus link with C++ runtime'
echo ' -static make a static library (default is dynamic/shared)'
echo ' -dlopen make a shared library suitable for dynamic loading'
......@@ -94,6 +96,10 @@ do
shift 1;
LINK=$1
;;
'-ldflags')
shift 1;
LDFLAGS=$1
;;
-l*)
DEPS="$DEPS $1"
;;
......@@ -215,7 +221,7 @@ case $ARCH in
rm -f ${LIBNAME}
# make lib
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
# finish up
FINAL_LIBS="${LIBNAME}"
elif [ $STATIC = 1 ] ; then
......@@ -273,7 +279,7 @@ case $ARCH in
rm -f ${LIBNAME}.so
# make lib
${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
......@@ -345,10 +351,10 @@ case $ARCH in
#echo "mklib: linker is" ${LINK} ${OPTS}
if [ $NOPREFIX = 1 ] ; then
rm -f ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
rm -f ${LIBNAME}.${MAJOR} ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.${MAJOR} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME}.${MAJOR} ${LIBNAME}
fi
FINAL_LIBS="${LIBNAME}.${MAJOR} ${LIBNAME}"
......@@ -372,7 +378,7 @@ case $ARCH in
echo "mklib: Making FreeBSD shared library: " ${LIBNAME}
OPTS="-shared"
rm -f ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
elif [ $STATIC = 1 ] ; then
STLIB="lib${LIBNAME}.a"
......@@ -386,7 +392,7 @@ case $ARCH in
OPTS="-shared -Wl,-soname,${SHLIB}"
echo "mklib: Making FreeBSD shared library: " ${SHLIB}
rm -f ${SHLIB}
${LINK} ${OPTS} -o ${SHLIB} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${SHLIB} ${OBJECTS} ${DEPS}
ln -sf ${SHLIB} "lib${LIBNAME}.so"
FINAL_LIBS="${SHLIB} lib${LIBNAME}.so"
fi
......@@ -444,7 +450,7 @@ case $ARCH in
fi
echo "mklib: Making IRIX " ${ABI} " shared library: " ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
FINAL_LIBS=${LIBNAME}
fi
;;
......@@ -520,9 +526,9 @@ case $ARCH in
# On AIX a shared library is linked differently when
# you want to dlopen the file
if [ $DLOPEN = "1" ] ; then
cc -G ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
cc -G ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
else
cc ${OPTS} -o ${OFILE} ${OBJECTS} ${DEPS}
cc ${OPTS} ${LDFLAGS} -o ${OFILE} ${OBJECTS} ${DEPS}
ar ${X64} -r ${LIBNAME} ${OFILE}
fi
......@@ -604,7 +610,7 @@ case $ARCH in
fi
echo "mklib: Making Darwin shared library: " ${LIBNAME}
${LINK} ${OPTS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME} ${LINKNAME}
FINAL_LIBS="${LIBNAME} ${LINKNAME}"
fi
......@@ -681,7 +687,7 @@ case $ARCH in
rm -f ${LIBNAME}.so.${MAJOR}
rm -f ${LIBNAME}.so
# make lib
${LINK} ${OPTS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME}.so.${VERSION} ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}.so.${VERSION} ${LIBNAME}.so.${MAJOR}
ln -s ${LIBNAME}.so.${MAJOR} ${LIBNAME}.so
......@@ -753,7 +759,7 @@ case $ARCH in
rm -f ${LIBNAME}.a
# make lib
${LINK} ${OPTS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
${LINK} ${OPTS} ${LDFLAGS} -o ${CYGNAME}-${MAJOR}.dll ${OBJECTS} ${DEPS}
# make usual symlinks
ln -s ${LIBNAME}-${MAJOR}.dll.a ${LIBNAME}.dll.a
# finish up
......
......@@ -20,6 +20,7 @@ CC = cc
CXX = CC
CFLAGS = -O
CXXFLAGS = -O
LDFLAGS =
GLU_CFLAGS =
# Misc tools and flags
......
......@@ -75,7 +75,7 @@ PROGS = \
# make executable from .c file:
.c: $(LIB_DEP) readtex.o
$(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
##### TARGETS #####
......@@ -119,35 +119,35 @@ extfuncs.h: $(TOP)/progs/util/extfuncs.h
reflect: reflect.o showbuffer.o readtex.o
$(CC) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) reflect.o showbuffer.o readtex.o $(APP_LIB_DEPS) -o $@
reflect.o: reflect.c showbuffer.h
$(CC) -c -I$(INCDIR) $(CFLAGS) reflect.c
shadowtex: shadowtex.o showbuffer.o
$(CC) shadowtex.o showbuffer.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) shadowtex.o showbuffer.o $(APP_LIB_DEPS) -o $@
shadowtex.o: shadowtex.c showbuffer.h
$(CC) -c -I$(INCDIR) $(CFLAGS) shadowtex.c
gloss: gloss.o trackball.o readtex.o
$(CC) gloss.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) gloss.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
gloss.o: gloss.c trackball.h
$(CC) -c -I$(INCDIR) $(CFLAGS) gloss.c
engine: engine.o trackball.o readtex.o
$(CC) engine.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) engine.o trackball.o readtex.o $(APP_LIB_DEPS) -o $@
engine.o: engine.c trackball.h
$(CC) -c -I$(INCDIR) $(CFLAGS) engine.c
fslight: fslight.o
$(CC) fslight.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) fslight.o $(APP_LIB_DEPS) -o $@
fslight.o: fslight.c extfuncs.h
$(CC) -c -I$(INCDIR) $(CFLAGS) fslight.c
......
......@@ -22,7 +22,7 @@ PROGS = df_gears \
.SUFFIXES: .c
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
##### TARGETS #####
......
......@@ -25,35 +25,35 @@ default: $(PROGRAMS)
demo1: demo1.o $(TOP)/$(LIB_DIR)/libEGL.so
$(CC) $(CFLAGS) demo1.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) demo1.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
demo1.o: demo1.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo1.c
demo2: demo2.o $(TOP)/$(LIB_DIR)/libEGL.so
$(CC) $(CFLAGS) demo2.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) demo2.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
demo2.o: demo2.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo2.c
demo3: demo3.o $(TOP)/$(LIB_DIR)/libEGL.so
$(CC) $(CFLAGS) demo3.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) demo3.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
demo3.o: demo3.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include demo3.c
eglinfo: eglinfo.o $(TOP)/$(LIB_DIR)/libEGL.so
$(CC) $(CFLAGS) eglinfo.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) eglinfo.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
eglinfo.o: eglinfo.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c
eglgears: eglgears.o $(TOP)/$(LIB_DIR)/libEGL.so
$(CC) $(CFLAGS) eglgears.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) eglgears.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
eglgears.o: eglgears.c $(HEADERS)
$(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c
......
......@@ -22,7 +22,7 @@ INCLUDES = \
.SUFFIXES: .c
.c:
$(CC) $(INCLUDES) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
......
......@@ -28,7 +28,7 @@ PROGS = \
# make executable from .c file:
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
##### TARGETS #####
......@@ -64,7 +64,7 @@ points.c: extfuncs.h
toyball.c: extfuncs.h
texdemo1: texdemo1.o readtex.o
$(CC) -I$(INCDIR) $(CFLAGS) texdemo1.o readtex.o $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) texdemo1.o readtex.o $(APP_LIB_DEPS) -o $@
texdemo1.o: texdemo1.c readtex.h extfuncs.h
$(CC) -c -I$(INCDIR) $(CFLAGS) texdemo1.c
......
......@@ -27,7 +27,7 @@ INCLUDES = \
.SUFFIXES: .c
.c:
$(CC) $(INCLUDES) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $< -o $@
......
......@@ -26,7 +26,7 @@ PROGS = \
# make executable from .c file:
.c: $(LIB_DEP) readtex.o
$(CC) -I$(INCDIR) $(CFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< readtex.o $(APP_LIB_DEPS) -o $@
##### TARGETS #####
......@@ -56,19 +56,19 @@ showbuffer.o: showbuffer.c showbuffer.h
# special case: need the -lOSMesa library:
osdemo: osdemo.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) osdemo.c $(OSMESA_LIBS) -o $@
# special case: need the -lOSMesa library:
ostest1: ostest1.c
$(CC) -I$(INCDIR) $(CFLAGS) ostest1.c $(OSMESA_LIBS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) ostest1.c $(OSMESA_LIBS) -o $@
# another special case: need the -lOSMesa16 library:
osdemo16: osdemo16.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo16.c $(OSMESA16_LIBS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) osdemo16.c $(OSMESA16_LIBS) -o $@
# another special case: need the -lOSMesa32 library:
osdemo32: osdemo32.c
$(CC) -I$(INCDIR) $(CFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) osdemo32.c $(OSMESA32_LIBS) -o $@
......
......@@ -24,7 +24,7 @@ PROGS = aaindex aapoly aargb accanti accpersp alpha alpha3D anti \
.SUFFIXES: .c
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
......
......@@ -18,7 +18,7 @@ PROGS = accum bitmap1 bitmap2 blendeq blendxor copy cursor depth eval fog \
.SUFFIXES: .c
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
##### TARGETS #####
......@@ -27,7 +27,7 @@ default: $(PROGS)
sphere: sphere.o readtex.o
$(CC) -I$(INCDIR) $(CFLAGS) sphere.o readtex.o $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) sphere.o readtex.o $(APP_LIB_DEPS) -o $@
sphere.o: sphere.c readtex.h
$(CC) -c -I$(INCDIR) $(CFLAGS) sphere.c
......
......@@ -29,13 +29,13 @@ clean:
#
cltest: cltest.o framework.o $(LIB_DEP)
$(CC) cltest.o framework.o $(APP_LIB_DEPS) -o cltest
$(CC) $(LDFLAGS) cltest.o framework.o $(APP_LIB_DEPS) -o cltest
sotest: sotest.o framework.o $(LIB_DEP)
$(CC) sotest.o framework.o $(APP_LIB_DEPS) -o sotest
$(CC) $(LDFLAGS) sotest.o framework.o $(APP_LIB_DEPS) -o sotest
vstest: vstest.o framework.o $(LIB_DEP)
$(CC) vstest.o framework.o $(APP_LIB_DEPS) -o vstest
$(CC) $(LDFLAGS) vstest.o framework.o $(APP_LIB_DEPS) -o vstest
#
# objects
......
......@@ -103,7 +103,7 @@ clean:
.SUFFIXES: .c
.c:
$(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
......@@ -124,31 +124,31 @@ arraytexture.o: arraytexture.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) arraytexture.c -o $@
afsmultiarb: afsmultiarb.o readtex.o
$(CC) $(CFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) afsmultiarb.o readtex.o $(LIBS) -o $@
afsmultiarb.o: afsmultiarb.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) afsmultiarb.c -o $@
drawbuffers: drawbuffers.o
$(CC) $(CFLAGS) drawbuffers.o $(LIBS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) drawbuffers.o $(LIBS) -o $@
drawbuffers.o: drawbuffers.c extfuncs.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) drawbuffers.c -o $@
texrect: texrect.o readtex.o
$(CC) $(CFLAGS) texrect.o readtex.o $(LIBS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
texrect.o: texrect.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) texrect.c -o $@
bug_3195: bug_3195.o readtex.o
$(CC) $(CFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) bug_3195.o readtex.o $(LIBS) -o $@
bug_3195.o: bug_3195.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) bug_3195.c -o $@
invert: invert.o readtex.o
$(CC) $(CFLAGS) invert.o readtex.o $(LIBS) -o $@
$(CC) $(CFLAGS) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
invert.o: invert.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) invert.c -o $@
......
......@@ -17,7 +17,7 @@ default: $(TRACER)
$(TRACER): $(OBJECTS)
$(TOP)/bin/mklib -o $(TRACER) -noprefix -cplusplus \
$(MKLIB_OPTIONS) $(OBJECTS)
-ldflags '$(LDFLAGS)' $(MKLIB_OPTIONS) $(OBJECTS)
gltrace.cc: gltrace.py
PYTHONPATH=$(TOP)/src/mesa/glapi python gltrace.py -f $(TOP)/src/mesa/glapi/gl_API.xml > gltrace.cc
......
......@@ -88,7 +88,7 @@ UTIL_FILES = readtex.h readtex.c
.SUFFIXES: .c
.c:
$(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
......@@ -115,13 +115,13 @@ getproclist.h: $(TOP)/src/mesa/glapi/gl_API.xml getprocaddress.c getprocaddress.
texrect: texrect.o readtex.o
$(CC) texrect.o readtex.o $(LIBS) -o $@
$(CC) $(LDFLAGS) texrect.o readtex.o $(LIBS) -o $@
texrect.o: texrect.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
invert: invert.o readtex.o
$(CC) invert.o readtex.o $(LIBS) -o $@
$(CC) $(LDFLAGS) invert.o readtex.o $(LIBS) -o $@
invert.o: invert.c readtex.h
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
......
......@@ -26,7 +26,7 @@ INCLUDES = -I. -I$(TOP)/include -I../samples
.SUFFIXES: .c
.c:
$(CC) $(INCLUDES) $(CFLAGS) $< $(LIBS) -o $@
$(CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(LIBS) -o $@
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@
......
......@@ -38,7 +38,7 @@ PROGS = glthreads \
.SUFFIXES: .c
.c: $(LIB_DEP)
$(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(APP_LIB_DEPS) -o $@
$(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $(LDFLAGS) $< $(APP_LIB_DEPS) -o $@
##### TARGETS #####
......@@ -53,10 +53,10 @@ clean:
# special cases
pbinfo: pbinfo.o pbutil.o
$(CC) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) pbinfo.o pbutil.o $(APP_LIB_DEPS) -o $@
pbdemo: pbdemo.o pbutil.o
$(CC) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) pbdemo.o pbutil.o $(APP_LIB_DEPS) -o $@
pbinfo.o: pbinfo.c pbutil.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) pbinfo.c
......@@ -68,13 +68,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) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) glxgears_fbconfig.o pbutil.o $(APP_LIB_DEPS) -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) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
$(CC) $(LDFLAGS) xrotfontdemo.o xuserotfont.o $(APP_LIB_DEPS) -o $@
xuserotfont.o: xuserotfont.c xuserotfont.h
$(CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xuserotfont.c
......
......@@ -21,7 +21,7 @@ default: $(TOP)/$(LIB_DIR)/demodriver.so
$(TOP)/$(LIB_DIR)/demodriver.so: $(OBJECTS)
$(TOP)/bin/mklib -o demodriver.so -noprefix \
$(TOP)/bin/mklib -o demodriver.so -noprefix -ldflags '$(LDFLAGS)' \
-install $(TOP)/$(LIB_DIR) $(OBJECTS)
......
......@@ -42,7 +42,7 @@ default: depend library Makefile
library: $(TOP)/$(LIB_DIR)/libEGLdri.so
$(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
$(TOP)/bin/mklib -o EGLdri -major 1 -minor 0 \
$(TOP)/bin/mklib -o EGLdri -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
......
......@@ -46,7 +46,7 @@ default: depend library
library: $(TOP)/$(LIB_DIR)/libEGL.so
$(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
$(TOP)/bin/mklib -o EGL -major 1 -minor 0 \
$(TOP)/bin/mklib -o EGL -ldflags '$(LDFLAGS)' -major 1 -minor 0 \
-install $(TOP)/$(LIB_DIR) -ldl $(OBJECTS)
......
......@@ -45,7 +45,7 @@ $(TOP)/$(LIB_DIR):
# Make the library:
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
@ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' \
@ $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)
......
......@@ -136,7 +136,7 @@ $(TOP)/$(LIB_DIR):
# Make the library:
$(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
$(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' \
$(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
-cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLU_LIB_DEPS) $(OBJECTS)
......
......@@ -83,7 +83,8 @@ $(TOP)/$(LIB_DIR):
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
@$(TOP)/bin/mklib -o $(GLUT_LIB) -major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
@$(TOP)/bin/mklib -o $(GLUT_LIB) -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(GLUT_LIB_DEPS) \
$(OBJECTS)
......
......@@ -61,7 +61,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
......
......@@ -63,7 +63,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
......
......@@ -32,7 +32,7 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) \
-patch $(GLUT_TINY) $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLUT_LIB_DEPS) $(OBJECTS)
......
......@@ -91,7 +91,7 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLUT_LIB_DEPS) $(OBJECTS)
......
......@@ -55,7 +55,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
# Make the library
$(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' \
$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
$(GLUT_LIB_DEPS) -install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(OBJECTS)
......
......@@ -48,7 +48,7 @@ clean:
# Make the library
$(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
$(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' \
$(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
$(GLW_LIB_DEPS) $(OBJECTS)
......
......@@ -49,7 +49,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/miniglx.conf
# Make libGL
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS) \
$(LIBDRM_LIB) $(PCIACCESS_LIB)
......
......@@ -64,7 +64,7 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
# Make libGL
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major 1 -minor 2 $(MKLIB_OPTIONS) \
-install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
......
......@@ -65,7 +65,7 @@ linux-solo: depend subdirs libmesa.a
# Stand-alone Mesa libGL, no built-in drivers (DirectFB)
libgl-core: $(CORE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS) \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) \
$(GL_LIB_DEPS)
......@@ -78,7 +78,7 @@ directfb: depend subdirs libgl-core
# fbdev Mesa driver (libGL.so)
fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) \
......@@ -111,7 +111,7 @@ osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
# Make the GL library
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' \
@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
-install $(TOP)/$(LIB_DIR) \
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
......@@ -120,13 +120,13 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) \
-ldflags '$(LDFLAGS)' -major $(MESA_MAJOR) \
-minor $(MESA_MINOR) -patch $(MESA_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
else \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
-major $(MESA_MAJOR) \
-ldflags '$(LDFLAGS)' -major $(MESA_MAJOR) \
-minor $(MESA_MINOR) -patch $(GL_TINY) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
......
......@@ -179,7 +179,8 @@ $(TOP)/$(LIB_DIR):
mkdir $(TOP)/$(LIB_DIR)
$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
@$(TOP)/bin/mklib -o $(GL_LIB) -install $(TOP)/$(LIB_DIR) -major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
@$(TOP)/bin/mklib -o $(GL_LIB) -ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
# $(GLU_OBJECTS):
......
......@@ -70,7 +70,7 @@ default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
$(TOP)/bin/mklib -noprefix -o $@ \
$(TOP)/bin/mklib -ldflags '$(LDFLAGS)' -noprefix -o $@ \
$(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
......
......@@ -61,7 +61,8 @@ default: depend $(TOP)/$(LIB_DIR)/$(LIBNAME)
$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix -install $(TOP)/$(LIB_DIR) \
CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix \
-ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
$(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES)
......
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