From db14ed4243a0e1fea3370fd2070c96bef4bec0be Mon Sep 17 00:00:00 2001 From: David Odin Date: Mon, 19 Jun 2017 19:47:44 +0200 Subject: [PATCH] Allow asm source files --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2b79436..3f7ef78 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,8 @@ OBJS = ${SRC:%.c=${OBJDIR}/%.o} DEPS = ${OBJS:%.o=$(OBJDIR)/%.d} NAME_SRC = $(wildcard $(TARGET_DIR)/*.c) -NAME_OBJS = ${NAME_SRC:%.c=${OBJDIR}/%.o} +NAME_A_SRC = $(wildcard $(TARGET_DIR)/*.s) +NAME_OBJS = ${NAME_SRC:%.c=${OBJDIR}/%.o} ${NAME_A_SRC:%.s=${OBJDIR}/%.o} NAME_DEPS = ${NAME_OBJS:%.o=$(OBJDIR)/%.d} -include $(DEPS) $(NAME_DEPS) @@ -64,6 +65,11 @@ ${OBJDIR}/%.o: %.c @echo "-- compiling" $< @$(CC) -MMD -MP -MF ${OBJDIR}/$*.d $(CFLAGS) $< -c -o $@ -I$(INCLUDES) -I$(TARGET_INCLUDES) +${OBJDIR}/%.o: %.s + @mkdir -p $(dir $@) + @echo "-- assembing" $< + @$(CC) -MMD -MP -MF ${OBJDIR}/$*.d $(CFLAGS) $< -c -o $@ -I$(INCLUDES) -I$(TARGET_INCLUDES) + $(APPS): @make --no-print-directory MODULE=$(shell dirname $@) NAME=$(shell basename $@) apps/$(shell dirname $@)/$(shell basename $@)/$(shell basename $@).bin -- 2.43.0