5 CFLAGS
:= -g
-O2
-fPIC
-Wall
$(shell pkg-config
--cflags sdl
)
7 LDLIBS
:= $(shell pkg-config
--libs sdl
)
12 all : librawv.so rawv hrclock
14 librawv.so
: ivideo.o view.o capture.o net.o misc.o sdlu.o
15 $(LINK.
cpp) -shared
-Wl
,-no-undefined
-Wl
,-soname
=$@.
$(MAJOR
) $^
$(LDLIBS
) -o
$@.
$(MAJOR
).
$(MINOR
)
16 /sbin
/ldconfig
-l
$@.
$(MAJOR
).
$(MINOR
)
19 rawv
: rawv.o librawv.so
20 $(LINK.
cpp) $^
-Wl
,-rpath
=\
$$ORIGIN -o
$@
23 $(LINK.
cpp) $^
$(LDLIBS
) -lSDL_ttf
-o
$@
28 $(RM
) *.o
*.so
*.so.
* rawv hrclock
31 install : rawv.h librawv.so librawv.so.
$(MAJOR
) librawv.so.
$(MAJOR
).
$(MINOR
) rawv
32 mkdir
-p
$(DESTDIR
)$(PREFIX
)/{include,lib
,bin
}/
33 install -m
644 rawv.h
$(DESTDIR
)$(PREFIX
)/include/
34 cp
-d librawv.so librawv.so.
$(MAJOR
) librawv.so.
$(MAJOR
).
$(MINOR
) $(DESTDIR
)$(PREFIX
)/lib
/
35 install rawv
$(DESTDIR
)$(PREFIX
)/bin
/