Makefile 929 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ##
  2. # Copyright (C) 2021 Alibaba Group Holding Limited
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License version 2 as
  6. # published by the Free Software Foundation.
  7. ##
  8. # To support host build in current path
  9. ifeq ($(CC),)
  10. CC:=gcc
  11. endif
  12. CFLAGS = -O0 -Wall -g -lm
  13. INCLUDES = -I../../driver/isp -I../../common
  14. EXEC1 = output/isp_run_bm_script
  15. all: $(EXEC1)
  16. .c.o:
  17. $(CC) -c $(CFLAGS) $(INCLUDES) $<
  18. prepare:
  19. mkdir -p output
  20. SOURCES_COMMON = ../../common/log_common.c
  21. OBJECTS_COMMON = log_common.o
  22. common: $(SOURCES_COMMON)
  23. $(CC) $(CFLAGS) -c $<
  24. SOURCES1 = isp_run_bm_script.c
  25. OBJECTS1 = $(SOURCES1:.c=.o)
  26. $(EXEC1): prepare common $(OBJECTS1)
  27. @echo OBJECTS1=$(OBJECTS1)
  28. $(CC) $(CFLAGS) -o $(EXEC1) $(OBJECTS_COMMON) $(OBJECTS1)
  29. cp -r isp_bm_scripts ./output/
  30. clean:
  31. rm -f *.o
  32. rm -rf output
  33. install:
  34. .PHONY: clean all prepare common