Merge pull request #116 from mstorsjo/make-deps
Add proper dependencies for the command line binaries
This commit is contained in:
commit
4afa4fc7a8
3
Makefile
3
Makefile
@ -64,11 +64,14 @@ PROCESSING_INCLUDES = \
|
||||
|
||||
H264DEC_INCLUDES = $(DECODER_INCLUDES) -Icodec/console/dec/inc
|
||||
H264DEC_LDFLAGS = -L. -ldecoder -lcommon
|
||||
H264DEC_DEPS = $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
|
||||
|
||||
H264ENC_INCLUDES = $(ENCODER_INCLUDES) -Icodec/console/enc/inc
|
||||
H264ENC_LDFLAGS = -L. -lencoder -lprocessing -lcommon
|
||||
H264ENC_DEPS = $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
|
||||
|
||||
CODEC_UNITTEST_LDFLAGS = -L. -lgtest -ldecoder -lcommon
|
||||
CODEC_UNITTEST_DEPS = $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
|
||||
|
||||
.PHONY: test
|
||||
|
||||
|
@ -98,7 +98,7 @@ if args.library is not None:
|
||||
f.write("LIBRARIES += $(LIBPREFIX)%s.$(LIBSUFFIX)\n"%args.library);
|
||||
|
||||
if args.binary is not None:
|
||||
f.write("%s: $(%s_OBJS) $(LIBS) $(%s_LIBS)\n"%(args.binary, PREFIX, PREFIX))
|
||||
f.write("%s: $(%s_OBJS) $(LIBS) $(%s_LIBS) $(%s_DEPS)\n"%(args.binary, PREFIX, PREFIX, PREFIX))
|
||||
f.write("\t$(CXX) -o $@ $(%s_OBJS) $(%s_LDFLAGS) $(%s_LIBS) $(LDFLAGS) $(LIBS)\n\n"%(PREFIX, PREFIX, PREFIX))
|
||||
f.write("binaries: %s\n"%args.binary);
|
||||
f.write("BINARIES += %s\n"%args.binary);
|
||||
|
@ -22,7 +22,7 @@ $(H264DEC_SRCDIR)/./src/h264dec.o: $(H264DEC_SRCDIR)/./src/h264dec.cpp
|
||||
$(H264DEC_SRCDIR)/./src/read_config.o: $(H264DEC_SRCDIR)/./src/read_config.cpp
|
||||
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(H264DEC_CFLAGS) $(H264DEC_INCLUDES) -c -o $(H264DEC_SRCDIR)/./src/read_config.o $(H264DEC_SRCDIR)/./src/read_config.cpp
|
||||
|
||||
h264dec: $(H264DEC_OBJS) $(LIBS) $(H264DEC_LIBS)
|
||||
h264dec: $(H264DEC_OBJS) $(LIBS) $(H264DEC_LIBS) $(H264DEC_DEPS)
|
||||
$(CXX) -o $@ $(H264DEC_OBJS) $(H264DEC_LDFLAGS) $(H264DEC_LIBS) $(LDFLAGS) $(LIBS)
|
||||
|
||||
binaries: h264dec
|
||||
|
@ -18,7 +18,7 @@ $(H264ENC_SRCDIR)/./src/read_config.o: $(H264ENC_SRCDIR)/./src/read_config.cpp
|
||||
$(H264ENC_SRCDIR)/./src/welsenc.o: $(H264ENC_SRCDIR)/./src/welsenc.cpp
|
||||
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(H264ENC_CFLAGS) $(H264ENC_INCLUDES) -c -o $(H264ENC_SRCDIR)/./src/welsenc.o $(H264ENC_SRCDIR)/./src/welsenc.cpp
|
||||
|
||||
h264enc: $(H264ENC_OBJS) $(LIBS) $(H264ENC_LIBS)
|
||||
h264enc: $(H264ENC_OBJS) $(LIBS) $(H264ENC_LIBS) $(H264ENC_DEPS)
|
||||
$(CXX) -o $@ $(H264ENC_OBJS) $(H264ENC_LDFLAGS) $(H264ENC_LIBS) $(LDFLAGS) $(LIBS)
|
||||
|
||||
binaries: h264enc
|
||||
|
@ -14,7 +14,7 @@ OBJS += $(CODEC_UNITTEST_OBJS)
|
||||
$(CODEC_UNITTEST_SRCDIR)/./simple_test.o: $(CODEC_UNITTEST_SRCDIR)/./simple_test.cpp
|
||||
$(CXX) $(CFLAGS) $(CXXFLAGS) $(INCLUDES) $(CODEC_UNITTEST_CFLAGS) $(CODEC_UNITTEST_INCLUDES) -c -o $(CODEC_UNITTEST_SRCDIR)/./simple_test.o $(CODEC_UNITTEST_SRCDIR)/./simple_test.cpp
|
||||
|
||||
codec_unittest: $(CODEC_UNITTEST_OBJS) $(LIBS) $(CODEC_UNITTEST_LIBS)
|
||||
codec_unittest: $(CODEC_UNITTEST_OBJS) $(LIBS) $(CODEC_UNITTEST_LIBS) $(CODEC_UNITTEST_DEPS)
|
||||
$(CXX) -o $@ $(CODEC_UNITTEST_OBJS) $(CODEC_UNITTEST_LDFLAGS) $(CODEC_UNITTEST_LIBS) $(LDFLAGS) $(LIBS)
|
||||
|
||||
binaries: codec_unittest
|
||||
|
Loading…
x
Reference in New Issue
Block a user