Makefile 870 Bytes
Newer Older
Mikhail Karpenko's avatar
Mikhail Karpenko committed
1
PROG       = str
2
CXXFLAGS   += -Wall -std=c++03 -I$(STAGING_DIR_HOST)/usr/include-uapi
3
LDFLAGS    += -pthread -lasound
4

Mikhail Karpenko's avatar
Mikhail Karpenko committed
5 6
SRCS       = main.cpp streamer.cpp audio.cpp video.cpp socket.cpp rtsp.cpp rtp_stream.cpp helpers.cpp parameters.cpp
STREAMER_OBJS = $(SRCS:.cpp=.o)
7

Mikhail Karpenko's avatar
Mikhail Karpenko committed
8 9 10 11
INSTALL    = install
INSTMODE   = 0755
INSTDOCS   = 0644
OWN        = -o root -g root
12

Mikhail Karpenko's avatar
Mikhail Karpenko committed
13 14 15 16
SYSCONFDIR = /etc/
BINDIR     = /usr/bin/
WWW_PAGES  = /www/pages
IMAGEDIR   = $(WWW_PAGES)/images
17

Mikhail Karpenko's avatar
Mikhail Karpenko committed
18
all: $(PROG)
19 20

$(PROG): $(STREAMER_OBJS)
21
	$(CXX) -o $@ $(STREAMER_OBJS) $(LDFLAGS)
22 23 24 25

%.o: %.cpp
	 $(CXX) $(CXXFLAGS) -c -o $@ $<

Mikhail Karpenko's avatar
Mikhail Karpenko committed
26 27
install: $(PROG)
	$(INSTALL) $(OWN) -d $(DESTDIR)$(BINDIR)
28
	$(INSTALL) -m $(INSTMODE) $(OWN) $(PROG) $(DESTDIR)$(BINDIR)
Mikhail Karpenko's avatar
Mikhail Karpenko committed
29 30 31 32 33 34 35 36 37

clean:
	rm -f *.o *.ver *.mp *~ core*  .depend $(PROG)

depend: .depend

.depend: $(SRCS)
	rm -f ./.depend
	$(CXX) $(CXXFLAGS) -MM $^ > ./.depend;
38

Mikhail Karpenko's avatar
Mikhail Karpenko committed
39
include .depend