Skip to content

Commit f379a4a

Browse files
author
kbengine
committed
git-svn-id: https://kbengine.svn.sourceforge.net/svnroot/kbengine@94 d26bdfbe-e24b-4f15-971f-8e0596e1bc08
1 parent aa6708d commit f379a4a

8 files changed

Lines changed: 208 additions & 244 deletions

File tree

‎kbe/src/build/common.mak‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ OBJS = $(addsuffix .o, $(ALL_SRC))
129129
# don't want these for a shared object - we'll use the exe's instead
130130
ifndef SO
131131
ifndef NO_EXTRA_LIBS
132-
MY_LIBS += math cstdkbe xmlplus log
132+
MY_LIBS += tinyxml math cstdkbe log
133133
endif
134134
endif
135135

@@ -139,6 +139,7 @@ KBE_INCLUDES += -I $(KBE_ROOT)/kbe/src/lib
139139
KBE_INCLUDES += -I $(KBE_ROOT)/kbe/src
140140
KBE_INCLUDES += -I $(KBE_ROOT)/kbe/src/common
141141
KBE_INCLUDES += -I $(KBE_ROOT)/kbe/src/server
142+
KBE_INCLUDES += -I $(KBE_ROOT)/kbe/src/lib/third_party/tinyxml
142143

143144
# Preprocessor output only (useful when debugging macros)
144145
# CPPFLAGS += -E

‎kbe/src/lib/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ all install clean full:
3030
cd thread && $(MAKE) $@
3131
cd xmlplus && $(MAKE) $@
3232
cd third_party/g3dlite && $(MAKE) $@
33+
cd third_party/tinyxml && $(MAKE) $@
3334

3435
UNITTEST_LIBS = cstdkbe \
3536
entitydef \

‎kbe/src/lib/server/serverapp.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ bool ServerApp::installPyScript()
4040
break;
4141
};
4242

43-
44-
return getScript().install(L"../../res/script/common", pyPaths, "KBEngine");
43+
wchar_t homedir[] = L"../../res/script/common";
44+
return getScript().install(homedir, pyPaths, "KBEngine");
4545
}
4646

4747
//-------------------------------------------------------------------------------------
Lines changed: 13 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,13 @@
1-
#****************************************************************************
2-
#
3-
# Makefile for TinyXml test.
4-
# Lee Thomason
5-
# www.grinninglizard.com
6-
#
7-
# This is a GNU make (gmake) makefile
8-
#****************************************************************************
9-
10-
# DEBUG can be set to YES to include debugging info, or NO otherwise
11-
DEBUG := NO
12-
13-
# PROFILE can be set to YES to include profiling info, or NO otherwise
14-
PROFILE := NO
15-
16-
# TINYXML_USE_STL can be used to turn on STL support. NO, then STL
17-
# will not be used. YES will include the STL files.
18-
TINYXML_USE_STL := NO
19-
20-
#****************************************************************************
21-
22-
CC := gcc
23-
CXX := g++
24-
LD := g++
25-
AR := ar rc
26-
RANLIB := ranlib
27-
28-
DEBUG_CFLAGS := -Wall -Wno-format -g -DDEBUG
29-
RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3
30-
31-
LIBS :=
32-
33-
DEBUG_CXXFLAGS := ${DEBUG_CFLAGS}
34-
RELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
35-
36-
DEBUG_LDFLAGS := -g
37-
RELEASE_LDFLAGS :=
38-
39-
ifeq (YES, ${DEBUG})
40-
CFLAGS := ${DEBUG_CFLAGS}
41-
CXXFLAGS := ${DEBUG_CXXFLAGS}
42-
LDFLAGS := ${DEBUG_LDFLAGS}
43-
else
44-
CFLAGS := ${RELEASE_CFLAGS}
45-
CXXFLAGS := ${RELEASE_CXXFLAGS}
46-
LDFLAGS := ${RELEASE_LDFLAGS}
47-
endif
48-
49-
ifeq (YES, ${PROFILE})
50-
CFLAGS := ${CFLAGS} -pg -O3
51-
CXXFLAGS := ${CXXFLAGS} -pg -O3
52-
LDFLAGS := ${LDFLAGS} -pg
53-
endif
54-
55-
#****************************************************************************
56-
# Preprocessor directives
57-
#****************************************************************************
58-
59-
ifeq (YES, ${TINYXML_USE_STL})
60-
DEFS := -DTIXML_USE_STL
61-
else
62-
DEFS :=
63-
endif
64-
65-
#****************************************************************************
66-
# Include paths
67-
#****************************************************************************
68-
69-
#INCS := -I/usr/include/g++-2 -I/usr/local/include
70-
INCS :=
71-
72-
73-
#****************************************************************************
74-
# Makefile code common to all platforms
75-
#****************************************************************************
76-
77-
CFLAGS := ${CFLAGS} ${DEFS}
78-
CXXFLAGS := ${CXXFLAGS} ${DEFS}
79-
80-
#****************************************************************************
81-
# Targets of the build
82-
#****************************************************************************
83-
84-
OUTPUT := libtinyxml.a
85-
86-
all: ${OUTPUT}
87-
88-
89-
#****************************************************************************
90-
# Source files
91-
#****************************************************************************
92-
93-
SRCS := tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp
94-
95-
# Add on the sources for libraries
96-
SRCS := ${SRCS}
97-
98-
OBJS := $(addsuffix .o,$(basename ${SRCS}))
99-
100-
#****************************************************************************
101-
# Output
102-
#****************************************************************************
103-
104-
${OUTPUT}: ${OBJS}
105-
${AR} $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
106-
107-
#****************************************************************************
108-
# common rules
109-
#****************************************************************************
110-
111-
# Rules for compiling source files to object files
112-
%.o : %.cpp
113-
${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
114-
115-
%.o : %.c
116-
${CC} -c ${CFLAGS} ${INCS} $< -o $@
117-
118-
dist:
119-
bash makedistlinux
120-
121-
clean:
122-
-rm -f core ${OBJS} ${OUTPUT}
123-
124-
depend:
125-
#makedepend ${INCS} ${SRCS}
126-
127-
tinyxml.o: tinyxml.h tinystr.h
128-
tinyxmlparser.o: tinyxml.h tinystr.h
129-
tinyxmlerror.o: tinyxml.h tinystr.h
1+
LIB = tinyxml
2+
3+
SRCS = \
4+
tinystr \
5+
tinyxml \
6+
tinyxmlerror \
7+
tinyxmlparser
8+
9+
ifndef KBE_ROOT
10+
export KBE_ROOT := $(subst /kbe/src/lib/third_party/$(LIB),,$(CURDIR))
11+
endif
12+
13+
include $(KBE_ROOT)/kbe/src/build/common.mak
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
#****************************************************************************
2+
#
3+
# Makefile for TinyXml test.
4+
# Lee Thomason
5+
# www.grinninglizard.com
6+
#
7+
# This is a GNU make (gmake) makefile
8+
#****************************************************************************
9+
10+
# DEBUG can be set to YES to include debugging info, or NO otherwise
11+
DEBUG := NO
12+
13+
# PROFILE can be set to YES to include profiling info, or NO otherwise
14+
PROFILE := NO
15+
16+
# TINYXML_USE_STL can be used to turn on STL support. NO, then STL
17+
# will not be used. YES will include the STL files.
18+
TINYXML_USE_STL := NO
19+
20+
#****************************************************************************
21+
22+
CC := gcc
23+
CXX := g++
24+
LD := g++
25+
AR := ar rc
26+
RANLIB := ranlib
27+
28+
DEBUG_CFLAGS := -Wall -Wno-format -g -DDEBUG
29+
RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3
30+
31+
LIBS :=
32+
33+
DEBUG_CXXFLAGS := ${DEBUG_CFLAGS}
34+
RELEASE_CXXFLAGS := ${RELEASE_CFLAGS}
35+
36+
DEBUG_LDFLAGS := -g
37+
RELEASE_LDFLAGS :=
38+
39+
ifeq (YES, ${DEBUG})
40+
CFLAGS := ${DEBUG_CFLAGS}
41+
CXXFLAGS := ${DEBUG_CXXFLAGS}
42+
LDFLAGS := ${DEBUG_LDFLAGS}
43+
else
44+
CFLAGS := ${RELEASE_CFLAGS}
45+
CXXFLAGS := ${RELEASE_CXXFLAGS}
46+
LDFLAGS := ${RELEASE_LDFLAGS}
47+
endif
48+
49+
ifeq (YES, ${PROFILE})
50+
CFLAGS := ${CFLAGS} -pg -O3
51+
CXXFLAGS := ${CXXFLAGS} -pg -O3
52+
LDFLAGS := ${LDFLAGS} -pg
53+
endif
54+
55+
#****************************************************************************
56+
# Preprocessor directives
57+
#****************************************************************************
58+
59+
ifeq (YES, ${TINYXML_USE_STL})
60+
DEFS := -DTIXML_USE_STL
61+
else
62+
DEFS :=
63+
endif
64+
65+
#****************************************************************************
66+
# Include paths
67+
#****************************************************************************
68+
69+
#INCS := -I/usr/include/g++-2 -I/usr/local/include
70+
INCS :=
71+
72+
73+
#****************************************************************************
74+
# Makefile code common to all platforms
75+
#****************************************************************************
76+
77+
CFLAGS := ${CFLAGS} ${DEFS}
78+
CXXFLAGS := ${CXXFLAGS} ${DEFS}
79+
80+
#****************************************************************************
81+
# Targets of the build
82+
#****************************************************************************
83+
84+
OUTPUT := ../../bin/Hybrid/libtinyxml.a
85+
86+
all: ${OUTPUT}
87+
88+
89+
#****************************************************************************
90+
# Source files
91+
#****************************************************************************
92+
93+
SRCS := tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp
94+
95+
# Add on the sources for libraries
96+
SRCS := ${SRCS}
97+
98+
OBJS := $(addsuffix .o,$(basename ${SRCS}))
99+
100+
#****************************************************************************
101+
# Output
102+
#****************************************************************************
103+
104+
${OUTPUT}: ${OBJS}
105+
${AR} $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS}
106+
107+
#****************************************************************************
108+
# common rules
109+
#****************************************************************************
110+
111+
# Rules for compiling source files to object files
112+
%.o : %.cpp
113+
${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@
114+
115+
%.o : %.c
116+
${CC} -c ${CFLAGS} ${INCS} $< -o $@
117+
118+
dist:
119+
bash makedistlinux
120+
121+
clean:
122+
-rm -f core ${OBJS} ${OUTPUT}
123+
124+
depend:
125+
#makedepend ${INCS} ${SRCS}
126+
127+
tinyxml.o: tinyxml.h tinystr.h
128+
tinyxmlparser.o: tinyxml.h tinystr.h
129+
tinyxmlerror.o: tinyxml.h tinystr.h

‎kbe/src/lib/xmlplus/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
LIB = xmlplus
22

3-
SRCS = \
4-
xmlplus
3+
SRCS =
54

65
ifndef KBE_ROOT
76
export KBE_ROOT := $(subst /kbe/src/lib/$(LIB),,$(CURDIR))

0 commit comments

Comments
 (0)