commit d1edce71135cc6d98c0a4b5729774542b676e769 Author: sophgo-forum-service <forum_service@sophgo.com> Date: Fri Mar 15 16:07:33 2024 +0800 [fix] recommend using ssh method to clone repo. [fix] fix sensor driver repo branch name.
34 lines
716 B
Makefile
34 lines
716 B
Makefile
SHELL = /bin/bash
|
|
ifeq ($(PARAM_FILE), )
|
|
PARAM_FILE:=../../../Makefile.param
|
|
include $(PARAM_FILE)
|
|
endif
|
|
|
|
SDIR = $(PWD)
|
|
SRCS = $(wildcard $(SDIR)/*.c)
|
|
INCS = -I$(KERNEL_INC) -I$(MW_INC) -I$(ISP_INC) -I../../common
|
|
OBJS = $(SRCS:.c=.o)
|
|
DEPS = $(SRCS:.c=.d)
|
|
|
|
EXTRA_CFLAGS = $(INCS)
|
|
LIBS = -lsys
|
|
EXTRA_LDFLAGS = $(LIBS) -lm -latomic -lpthread
|
|
|
|
TARGET = lt9611
|
|
|
|
.PHONY : clean all
|
|
all: $(TARGET)
|
|
|
|
$(SDIR)/%.o: $(SDIR)/%.c
|
|
@$(CC) $(DEPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $<
|
|
@echo [$(notdir $(CC))] $(notdir $@)
|
|
|
|
$(TARGET): $(OBJS)
|
|
@$(CXX) -o $@ $(OBJS) $(ELFFLAGS) $(EXTRA_LDFLAGS) -static
|
|
@echo -e $(BLUE)[LINK]$(END)[$(notdir $(CC))] $(notdir $@)
|
|
|
|
clean:
|
|
@rm -f $(OBJS) $(DEPS) $(TARGET)
|
|
|
|
-include $(DEPS)
|