summaryrefslogtreecommitdiff
path: root/user/torcs/torcs-1.3.6-as-needed.patch
blob: d848538c07ea2ec0f88bcf93630b91d6c0037317 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
--- torcs-1.3.6.orig/Make-default.mk
+++ torcs-1.3.6/Make-default.mk
@@ -402,7 +402,7 @@
 ifdef PROGRAM
 
 ${PROGRAM}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
-	${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${SOLIBS} ${EXT_LIBS} -o $@
+	${CXX} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
 
 installprogram: ${PROGRAM}
 	@ createdir="${INSTLIBBASE}" ; \
@@ -420,14 +420,14 @@
 ifdef LOCALTOOLS
 
 ${LOCALTOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
-	${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
+	${CXX} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
 
 endif
 
 ifdef TOOLS
 
 ${TOOLS}: ${OBJECTS} $(subst -l,${EXPORTBASE}/lib/lib, ${LIBS:=.a})
-	${CXX} ${OBJECTS} ${LDFLAGS} ${LIBS} ${EXT_LIBS} ${SOLIBS} -o $@
+	${CXX} ${LDFLAGS} -o $@ ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
 
 installtools: ${TOOLS}
 	@createdir="${INSTBINBASE}/${TOOLSDIR}" ; \
@@ -478,7 +478,7 @@
 ifdef SOLIBRARY
 
 ${SOLIBRARY}: ${OBJECTS}
-	${CXX} -shared -o ${SOLIBRARY} ${OBJECTS} ${SOLIBS} ${LDFLAGS} ${LIBSPATH} ${LIBS} ${DEBUG_LIBS}
+	${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${SOLIBRARY} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
 	@D=`pwd` ; \
 	createdir="${EXPORTBASE}/lib" ; \
 	$(mkinstalldirs) $$createdir ; \
@@ -509,7 +509,7 @@
 ifdef MODULE
 
 ${MODULE}: ${OBJECTS}
-	${CXX} -shared -o ${MODULE} ${OBJECTS} ${LDFLAGS} ${LIBSPATH} ${LIBS} 
+	${CXX} ${CXXFLAGS} ${LDFLAGS} -shared -o ${MODULE} ${OBJECTS} ${SOLIBS} ${LIBS} ${EXT_LIBS}
 	@D=`pwd` ; \
 	createdir="${EXPORTBASE}/${MODULEDIR}" ; \
 	$(mkinstalldirs) $$createdir ; \
--- torcs-1.3.6.orig/configure.in
+++ torcs-1.3.6/configure.in
@@ -123,11 +123,11 @@
 AC_CHECK_LIB(Xxf86vm, XF86VidModeSetViewPort,,AC_MSG_ERROR([Can't find libXxf86vm. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
 AC_CHECK_LIB(Xrender, XRenderSetSubpixelOrder,,AC_MSG_ERROR([Can't find libXrender. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
 AC_CHECK_LIB(Xrandr, XRRQueryVersion,,AC_MSG_ERROR([Can't find libXrandr. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
-AC_CHECK_LIB(openal, alEnable, LDFLAGS="$LDFLAGS -lopenal", AC_MSG_ERROR([Can't find AL/al.h. OpenAL can be found on http://www.openal.org/]))
+AC_CHECK_LIB(openal, alEnable, LIBS="$LIBS -lopenal", AC_MSG_ERROR([Can't find AL/al.h. OpenAL can be found on http://www.openal.org/]))
 AC_CHECK_LIB(alut, alutLoadWAVFile,
-	LDFLAGS="$LDFLAGS -lalut",
-	LDFLAGS="$LDFLAGS")
-AC_CHECK_LIB(vorbisfile, ov_fopen, LDFLAGS="$LDFLAGS -lvorbisfile", AC_MSG_ERROR([Can't find libvorbis.]))
+	LIBS="$LIBS -lalut", )
+AC_CHECK_LIB(vorbisfile, ov_fopen, LIBS="$LIBS -lvorbisfile", AC_MSG_ERROR([Can't find libvorbis.]))
+
 
 AC_CHECK_LIB(dl, dlopen)
 AC_CHECK_FUNC(dlopen,,AC_MSG_ERROR([Can't find dlopen function. Please check config.log and if you can't solve the problem send the file to torcs-users@lists.sourceforge.net with the subject \"torcs compilation problem\"]))
--- torcs-1.3.6.orig/src/libs/Makefile
+++ torcs-1.3.6/src/libs/Makefile
@@ -23,7 +23,7 @@
 
 TOOLSUBDIRS	= txml
 
-SUBDIRS		= confscreens racescreens robottools txml tgf tgfclient client raceengineclient learning \
+SUBDIRS		= confscreens racescreens robottools txml tgf tgfclient raceengineclient client learning \
 			  portability math musicplayer
 
 PKGSUBDIRS	= $(SUBDIRS)
--- torcs-1.3.6.orig/src/libs/client/Makefile
+++ torcs-1.3.6/src/libs/client/Makefile
@@ -23,6 +23,8 @@
 SOURCES   = entry.cpp mainmenu.cpp splash.cpp exitmenu.cpp \
 	    optionmenu.cpp
 
+SOLIBS    = -lconfscreens -lraceengine
+
 LIBS      =  -lplibssg -lplibsg -lplibul
 
 EXPDIR    = include
--- torcs-1.3.6.orig/src/libs/tgf/Makefile
+++ torcs-1.3.6/src/libs/tgf/Makefile
@@ -29,6 +29,7 @@
 		profiler.cpp \
 		hash.cpp
 
+SOLIBS  = -ltxml
 
 EXPDIR  = include