| 1 |
# Makefile for libs/jpinput |
| 2 |
# Satofumi KAMIMURA |
| 3 |
# $Id$ |
| 4 |
|
| 5 |
# Compile options |
| 6 |
CC = g++ |
| 7 |
CXXFLAGS = -g -O0 -Wall -Werror ${INCLUDES} `sdl-config --cflags` |
| 8 |
INCLUDES = -I../unittest |
| 9 |
LDFLAGS = |
| 10 |
LDLIBS = |
| 11 |
RUBY = ruby |
| 12 |
INPUT_CONVERT_SCRIPT = cnvTable2header.rb |
| 13 |
|
| 14 |
# Target |
| 15 |
JPINPUT_LIB = jpinput.a |
| 16 |
TARGET = ${JPINPUT_LIB} |
| 17 |
|
| 18 |
all : ${TARGET} |
| 19 |
|
| 20 |
clean : |
| 21 |
${RM} *.o ${TARGET} allTest |
| 22 |
cd samples/ && ${MAKE} clean |
| 23 |
|
| 24 |
test : allTest |
| 25 |
./allTest |
| 26 |
|
| 27 |
depend : |
| 28 |
makedepend -Y -- ${INCLUDES} -- ${wildcard *.h *.cpp} |
| 29 |
|
| 30 |
.PHONY : all clean depend |
| 31 |
###################################################################### |
| 32 |
${JPINPUT_LIB} : \ |
| 33 |
${JPINPUT_LIB}(JpString.o) \ |
| 34 |
${JPINPUT_LIB}(UtfString.o) \ |
| 35 |
${JPINPUT_LIB}(RomanCreator.o) \ |
| 36 |
${JPINPUT_LIB}(PlainTextConverter.o) \ |
| 37 |
${JPINPUT_LIB}(JpTextConverter.o) |
| 38 |
|
| 39 |
JpTextConverter.o : RomanConvertTable.h KanaConvertTable.h |
| 40 |
|
| 41 |
RomanConvertTable.h : roman_table.txt ${INPUT_CONVERT_SCRIPT} |
| 42 |
ruby ${INPUT_CONVERT_SCRIPT} $< > $@ || ${RM} $@ |
| 43 |
|
| 44 |
KanaConvertTable.h : kana_table.txt ${INPUT_CONVERT_SCRIPT} |
| 45 |
ruby ${INPUT_CONVERT_SCRIPT} $< > $@ || ${RM} $@ |
| 46 |
|
| 47 |
allTest.o : ../unittest/allTest.cpp |
| 48 |
${CXX} ${CXXFLAGS} `cppunit-config --cflags` $< -c -o $@ |
| 49 |
|
| 50 |
REQUIRE_LIBS = jpinput.a |
| 51 |
TEST_OBJS = allTest.o TestRomanCreator.o TestJpTextConverter.o ${REQUIRE_LIBS} |
| 52 |
TEST_LDLIBS = |
| 53 |
|
| 54 |
allTest : ${TEST_OBJS} |
| 55 |
${CXX} ${CXXFLAGS} ${TEST_OBJS} -o $@ `cppunit-config --libs` ${TEST_LDLIBS} |
| 56 |
|
| 57 |
# DO NOT DELETE |
| 58 |
|
| 59 |
JpTextConverter.o: TextConvertInterface.h |
| 60 |
PlainTextConverter.o: TextConvertInterface.h |
| 61 |
JpString.o: JpString.h |
| 62 |
JpTextConverter.o: JpTextConverter.h TextConvertInterface.h |
| 63 |
JpTextConverter.o: RomanConvertTable.h KanaConvertTable.h |
| 64 |
PlainTextConverter.o: PlainTextConverter.h TextConvertInterface.h |
| 65 |
RomanCreator.o: RomanCreator.h RomanConvertTable.h UtfString.h |
| 66 |
TestJpTextConverter.o: TestJpTextConverter.h ../unittest/ArrayTestUtil.h |
| 67 |
TestRomanCreator.o: TestRomanCreator.h RomanCreator.h |
| 68 |
UtfString.o: UtfString.h |