summaryrefslogtreecommitdiff
path: root/package/tinyxml/patches/patch-Makefile
blob: bfe7abb95b1fdbd7cd1de6837fbba1ed11917be3 (plain)
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
--- tinyxml.orig/Makefile	2013-07-30 15:47:47.000000000 +0200
+++ tinyxml/Makefile	2013-07-30 15:47:46.000000000 +0200
@@ -15,13 +15,13 @@ PROFILE        := NO
 
 # TINYXML_USE_STL can be used to turn on STL support. NO, then STL
 # will not be used. YES will include the STL files.
-TINYXML_USE_STL := NO
+TINYXML_USE_STL := YES
 
 #****************************************************************************
 
-CC     := gcc
-CXX    := g++
-LD     := g++
+CC     ?= gcc
+CXX    ?= g++
+LD     := $(CXX)
 AR     := ar rc
 RANLIB := ranlib
 
@@ -41,9 +41,9 @@ ifeq (YES, ${DEBUG})
    CXXFLAGS     := ${DEBUG_CXXFLAGS}
    LDFLAGS      := ${DEBUG_LDFLAGS}
 else
-   CFLAGS       := ${RELEASE_CFLAGS}
-   CXXFLAGS     := ${RELEASE_CXXFLAGS}
-   LDFLAGS      := ${RELEASE_LDFLAGS}
+   CFLAGS       ?= ${RELEASE_CFLAGS}
+   CXXFLAGS     ?= ${RELEASE_CXXFLAGS}
+   LDFLAGS      ?= ${RELEASE_LDFLAGS}
 endif
 
 ifeq (YES, ${PROFILE})
@@ -81,7 +81,7 @@ CXXFLAGS := ${CXXFLAGS} ${DEFS}
 # Targets of the build
 #****************************************************************************
 
-OUTPUT := xmltest
+OUTPUT := libtinyxml.so.2.6.2
 
 all: ${OUTPUT}
 
@@ -90,7 +90,7 @@ all: ${OUTPUT}
 # Source files
 #****************************************************************************
 
-SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp tinystr.cpp
+SRCS := tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp
 
 # Add on the sources for libraries
 SRCS := ${SRCS}
@@ -102,7 +102,8 @@ OBJS := $(addsuffix .o,$(basename ${SRCS
 #****************************************************************************
 
 ${OUTPUT}: ${OBJS}
-	${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
+	${CXX} -shared -Wl,-soname,libtinyxml.so.2.6.2 -o $@ ${OBJS} ${LDFLAGS} ${LIBS} ${EXTRA_LIBS}
+	ln -sf libtinyxml.so.2.6.2 libtinyxml.so
 
 #****************************************************************************
 # common rules