-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmakefile.posix
111 lines (96 loc) · 2.53 KB
/
makefile.posix
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# -*- makefile -*-
# 使用するツール類の設定
CXX = g++
LD = g++
STRIP = strip
MKDEP = mkdep
# 作るライブラリ名の設定
# これはdarwin用の設定で、libyaya.bundleを生成する。
# LinuxやBSDならpostfixを.soにする必要がある筈。
DYLIB_NAME_PREFIX = lib
DYLIB_NAME_POSTFIX = .bundle
# boostの場所を指定。
BOOST_INCLUDES = /sw/include
# libboost_regex.aの場所を設定。
#LIBBOOST_REGEX_A = /sw/lib/libboost_regex-1_32.a
LIBBOOST_REGEX_A = ./libboost_regex.a
# 注意:
# このプログラムは wstring を使用しています。
# お使いのコンパイラが wstring を理解しない場合は……どうにかして対処して下さい。
# 追加するフラグ。
# CXXFLAGSは必要無ければ空でも良いが、LDFLAGSはdlopen可能なライブラリを
# 作れる設定にしなければならない。darwinなら-bundle、LinuxやBSDなら-shared。
ARCH_FLAGS = -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk
CXXFLAGS = -O3 -Wno-long-double $(ARCH_FLAGS)
LDFLAGS = -bundle $(ARCH_FLAGS)
################## これより下は弄らなくてもコンパイル出来ます ##################
CXXFLAGS_ADD = -DPOSIX -I. -Itinyxpath -I$(BOOST_INCLUDES)
LD_ADD = $(LIBBOOST_REGEX_A)
LIBAYA5_OBJ = \
aya5.o \
ayavm.o \
basis.o \
ccct.o \
comment.o \
duplevinfo.o \
file.o \
file1.o \
function.o \
globalvariable.o \
lib.o \
lib1.o \
localvariable.o \
log.o \
logexcode.o \
manifest.o \
misc.o \
mt19937ar.o \
parser0.o \
parser1.o \
selecter.o \
sysfunc.o \
value.o \
valuesub.o \
wsex.o \
posix_utils.o \
posix_charconv.o \
strconv.o \
strconv_cp932.o \
wordmatch.o \
tinyxpath/action_store.o \
tinyxpath/htmlutil.o \
tinyxpath/lex_util.o \
tinyxpath/node_set.o \
tinyxpath/tinystr.o \
tinyxpath/tinyxml.o \
tinyxpath/tinyxmlerror.o \
tinyxpath/tinyxmlparser.o \
tinyxpath/tokenlist.o \
tinyxpath/xml_util.o \
tinyxpath/xpath_expression.o \
tinyxpath/xpath_processor.o \
tinyxpath/xpath_stack.o \
tinyxpath/xpath_static.o \
tinyxpath/xpath_stream.o \
tinyxpath/xpath_syntax.o \
$(NULL)
LIBAYA5 = $(DYLIB_NAME_PREFIX)yaya$(DYLIB_NAME_POSTFIX)
all: $(LIBAYA5)
depend:
mkdep $(CXXFLAGS) $(CXXFLAGS_ADD) $(LIBAYA5_OBJ:.o=.cpp)
clean:
rm -f $(LIBAYA5) $(LIBAYA5_OBJ)
$(LIBAYA5): $(LIBAYA5_OBJ)
$(LD) -o $@ $(LIBAYA5_OBJ) $(LDFLAGS) $(LD_ADD)
$(STRIP) -x $@
DISTDIR = yaya-src
dist:
rm -rf $(DISTDIR)
mkdir -p $(DISTDIR)
cp *.cpp *.h *.dsp *.dsw *.rc *.txt makefile.* $(DISTDIR)
zip -r $(DISTDIR).zip $(DISTDIR)
rm -rf $(DISTDIR)
.cpp.o:
$(CXX) $(CXXFLAGS) $(CXXFLAGS_ADD) -o $@ -c $<
#-include .depend
.PHONY: all clean depend