2 PROGRAMS
=SVMTeval SVMTlearn SVMTagger
4 all: $(LIBRARY
).a
$(LIBRARY
).so
$(PROGRAMS
)
6 SVMTeval
: src
/bin
/SVMTeval.static.o
$(LIBRARY
).a
$(LIBRARY
).so
7 g
++ $(LDFLAGS
) $(EXTRA_LDFLAGS
) $< -o
$@
-L.
-lsvmtool
++ $(LIBS
)
9 SVMTlearn
: src
/bin
/SVMTlearn.static.o
$(LIBRARY
).a
$(LIBRARY
).so
10 g
++ $(LDFLAGS
) $(EXTRA_LDFLAGS
) $< -o
$@
-L.
-lsvmtool
++ $(LIBS
)
12 SVMTagger
: src
/bin
/SVMTagger.static.o
$(LIBRARY
).a
$(LIBRARY
).so
13 g
++ $(LDFLAGS
) $(EXTRA_LDFLAGS
) $< -o
$@
-L.
-lsvmtool
++ $(LIBS
)
18 SOURCES
= src
/learner.
cc \
32 SHARED_OBJS
= $(SOURCES
:.
cc=.shared.o
)
33 STATIC_OBJS
= $(SOURCES
:.
cc=.static.o
)
35 EXTRA_CFLAGS
=-I
$(INCLUDE_DIR
)
36 STATIC_CFLAGS
= -O2
-g
-ansi
-Wall
-Wno-unused-parameter
$(EXTRA_CFLAGS
)
37 SHARED_CFLAGS
= $(STATIC_CFLAGS
) -fPIC
39 LDFLAGS
= -Wl
,-z
,defs
-Wl
,--as-needed
-Wl
,--no-undefined
43 $(LIBRARY
).so.
$(MAJOR
).
$(MINOR
): $(SHARED_OBJS
)
44 g
++ $(LDFLAGS
) $(EXTRA_LDFLAGS
) -shared \
45 -Wl
,-soname
,$(LIBRARY
).so.
$(MAJOR
) \
46 -o
$(LIBRARY
).so.
$(MAJOR
).
$(MINOR
) \
49 $(LIBRARY
).so
: $(LIBRARY
).so.
$(MAJOR
).
$(MINOR
)
51 ln
-s
$@.
$(MAJOR
).
$(MINOR
) $@.
$(MAJOR
)
55 $(LIBRARY
).a
: $(STATIC_OBJS
)
59 g
++ -o
$@
-c
$+ $(SHARED_CFLAGS
)
62 g
++ -o
$@
-c
$+ $(SHARED_CFLAGS
)
65 gcc
-o
$@
-c
$+ $(SHARED_CFLAGS
)
68 g
++ $(LDFLAGS
) $(EXTRA_LDFLAGS
) -shared
$^
-o
$@
71 g
++ -o
$@
-c
$+ $(STATIC_CFLAGS
)
74 g
++ -o
$@
-c
$+ $(STATIC_CFLAGS
)
77 gcc
-o
$@
-c
$+ $(STATIC_CFLAGS
)
79 S
: $(SOURCES
:.
cc=.S
) src
/bin
/SVMTeval.S src
/bin
/SVMTlearn.S src
/bin
/SVMTagger.S
82 g
++ -Wall
-O0
-o
$@
-S
$+ $(EXTRA_CFLAGS
)
85 g
++ -Wall
-O0
-o
$@
-S
$+ $(EXTRA_CFLAGS
)
88 gcc
-Wall
-O0
-o
$@
-S
$+ $(EXTRA_CFLAGS
)
94 rm -fv
$(STATIC_FIXED_OBJS
)
96 rm -fv
*.so
*.so
* *.a src
/*.o src
/bin
/*.o src
/*.S src
/bin
/*.S
*~
100 install: $(LIBRARY
).a
$(LIBRARY
).so
101 mkdir
-p
"$(DESTDIR)/usr/lib/"
102 cp
-a
*.a
"$(DESTDIR)/usr/lib/"
103 cp
-a
*.so
* "$(DESTDIR)/usr/lib/"
104 mkdir
-p
"$(DESTDIR)/usr/include/"
106 find
$(INCLUDE_DIR
) -name
"*.h" | \
108 t
=`echo "$$f" | sed -e 's|^$(INCLUDE_DIR)/|/usr/include/%PACKAGE%/|'` ; \
110 mkdir
-p
"$(DESTDIR)/$$d" ; \
111 cp
"$$f" "$(DESTDIR)/$$t"; \