mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
30 lines
722 B
Makefile
Executable File
30 lines
722 B
Makefile
Executable File
# This file is part of the OpenMV project.
|
|
#
|
|
# Copyright (c) 2013-2021 Ibrahim Abdelkader <iabdalkader@openmv.io>
|
|
# Copyright (c) 2013-2021 Kwabena W. Agyeman <kwagyeman@openmv.io>
|
|
#
|
|
# This work is licensed under the MIT license, see the file LICENSE for details.
|
|
#
|
|
# UVC Makefile
|
|
SRCS = $(wildcard src/*.c)
|
|
OBJS = $(addprefix $(BUILD)/, $(SRCS:.c=.o))
|
|
OBJ_DIRS = $(sort $(dir $(OBJS)))
|
|
|
|
all: | $(OBJ_DIRS) $(OBJS)
|
|
$(OBJ_DIRS):
|
|
$(MKDIR) -p $@
|
|
|
|
$(BUILD)/%.o : %.c
|
|
$(ECHO) "CC $<"
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
$(BUILD)/src/string0.o : src/string0.c
|
|
$(ECHO) "CC $<"
|
|
$(CC) $(CFLAGS) -ffreestanding -fno-builtin -fno-lto -c -o $@ $<
|
|
|
|
$(BUILD)/%.o : %.s
|
|
$(ECHO) "AS $<"
|
|
$(AS) $(AFLAGS) $< -o $@
|
|
|
|
-include $(OBJS:%.o=%.d)
|