Makefile 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. ###############################################################################
  2. #
  3. # Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
  4. #
  5. # Redistribution and use in source and binary forms, with or without
  6. # modification, are permitted provided that the following conditions
  7. # are met:
  8. # * Redistributions of source code must retain the above copyright
  9. # notice, this list of conditions and the following disclaimer.
  10. # * Redistributions in binary form must reproduce the above copyright
  11. # notice, this list of conditions and the following disclaimer in the
  12. # documentation and/or other materials provided with the distribution.
  13. # * Neither the name of NVIDIA CORPORATION nor the names of its
  14. # contributors may be used to endorse or promote products derived
  15. # from this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
  18. # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  21. # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  22. # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  23. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  24. # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  25. # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. #
  29. ###############################################################################
  30. include ../../Rules.mk
  31. EXAMPLE := cameras_opencv_demo
  32. EXAMPLE_SRC := \
  33. cameras_opencv_demo.cpp
  34. EXAMPLE_OBJS := $(EXAMPLE_SRC:.cpp=.o)
  35. CPPFLAGS += -I "/opt/miivii/include" `pkg-config --cflags opencv4`
  36. LDFLAGS += -L"/opt/miivii/lib" `pkg-config --libs opencv4`
  37. all: $(EXAMPLE)
  38. %.o: %.cpp
  39. $(CPP) $(CPPFLAGS) -c $<
  40. $(EXAMPLE): $(EXAMPLE_OBJS)
  41. @echo $(TOP_DIR)/source
  42. $(CPP) -o $@ $(EXAMPLE_OBJS) -L"$(TOP_DIR)/source" -lmvgmslcamera $(CPPFLAGS) $(LDFLAGS)
  43. @mkdir -p $(TOP_DIR)/bin
  44. @cp -rf $(EXAMPLE) $(TOP_DIR)/bin
  45. clean:
  46. $(AT)rm -rf $(OBJS) $(LIB_OBJS) $(EXAMPLE) $(EXAMPLE_OBJS)