Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. CFLAGS = -Wall -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -O2 -Werror -Wno-unused -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-strict-overflow -Wno-array-bounds -Wno-shift-negative-value -Wempty-body -Wtype-limits -Wno-unused-result -fPIC -Wmissing-field-initializers -std=gnu99
  2. INCLUDE += -I../user_mode
  3. SRCS = isp_venc_shake.c
  4. OBJS = $(SRCS:.c=.o)
  5. #source search path
  6. vpath %.c
  7. # name of the outputfile (library)
  8. IVSLIB = ../user_mode/libivs.a
  9. IVSSLIB = ../user_mode/libivs.so
  10. TARGET = ivs_test
  11. #Here are rules for building codes and generating object library.
  12. all: tags
  13. @echo ---------------------------------------
  14. @echo "Usage: make [ system | testdata | versatile | integrator | android]"
  15. @echo "system - PC system model (== pclinux)"
  16. @echo "testdata - PC system model for test data creation"
  17. @echo "eval - PC system model for evaluation with frame limit"
  18. @echo "versatile - ARM versatile with FPGA HW"
  19. @echo "integrator - ARM integrator with FPGA HW"
  20. @echo "android - ARM android"
  21. @echo "NOTE! Make sure to do 'make clean'"
  22. @echo "between compiling to different targets!"
  23. @echo ---------------------------------------
  24. .PHONY: system_lib system testdata clean depend
  25. evaluation: eval
  26. eval: system
  27. system_static: testdata
  28. system: testdata
  29. # for libva
  30. system_lib: system
  31. testdata: .depend $(IVSLIB)
  32. .PHONY: hwlinux
  33. hwlinux:
  34. hwlinux: .depend $(TARGET)
  35. $(TARGET): $(OBJS)
  36. $(CC) $(CFLAGS) $(OBJS) $(IVSLIB) -lm -lpthread -o $(TARGET)
  37. %.o: %.c
  38. $(CC) -c $(CFLAGS) $(INCLUDE) $< -o $@
  39. clean:
  40. $(RM) $(TARGET)
  41. $(RM) .depend
  42. $(RM) *.o *.gcno *.gcda
  43. tags:
  44. ctags ../kernel_mode/*h ./*[ch]
  45. depend .depend: $(SRCS)
  46. @echo "[CC] $@"
  47. @$(CC) -M $(DEBFLAGS) $(INCLUDE) $^ > .depend
  48. ifneq (clean, $(findstring clean, $(MAKECMDGOALS)))
  49. ifeq (.depend, $(wildcard .depend))
  50. include .depend
  51. endif
  52. endif