Makefile 979 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ##
  2. # Copyright (C) 2021 Alibaba Group Holding Limited
  3. # Author: LuChongzhi <chongzhi.lcz@alibaba-inc.com>
  4. #
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License version 2 as
  7. # published by the Free Software Foundation.
  8. ##
  9. DIR_TO_ROOT=../../..
  10. include $(DIR_TO_ROOT)/build.param
  11. TARGET := libhal_platform.a
  12. OUTPUT_DIR := $(DIR_TO_ROOT)/output/hal
  13. #CFLAGS = -Wall -g -O0
  14. INCLUDE += -I./include
  15. INCLUDE += -I$(VI_INC)
  16. SRCS = $(wildcard *.c)
  17. OBJS = $(SRCS:.c=.o)
  18. all: # $(TARGET) fro Light do nothing, the lib libhal_platform.so from ISP repo
  19. #camera:
  20. # make -C camera
  21. $(TARGET): $(OBJS)
  22. @mkdir -p $(OUTPUT_DIR)
  23. @echo "Linking" $@ "..."
  24. $(AR) -r -o $(OUTPUT_DIR)/$@ .obj/*.o
  25. $(OBJS): %.o:%.c
  26. @mkdir -p .obj
  27. @echo "Compiling" $< "..."
  28. $(CC) $(CFLAGS) $(INCLUDE) -c -o .obj/$(notdir $@) $<
  29. clean:
  30. rm -rf .obj
  31. rm -f $(OUTPUT_DIR)/$(TARGET)
  32. # make -C camera clean
  33. .PHONY: clean all camera