You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
450 B
32 lines
450 B
include ../../Makefile.conf
|
|
|
|
TARGET=libcmsis.a
|
|
|
|
# Includes
|
|
CFLAGS+= -I.
|
|
|
|
C_SRC=$(wildcard *.c)
|
|
C_OBJ=$(subst .c,.o,$(C_SRC))
|
|
|
|
ASM_SRC=$(wildcard *.s)
|
|
ASM_OBJ=$(subst .s,.s.o,$(ASM_SRC))
|
|
ASMFLAGS=-x assembler-with-cpp
|
|
|
|
OBJ=$(C_OBJ) $(ASM_OBJ)
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(TARGET)
|
|
|
|
$(TARGET): $(OBJ)
|
|
$(AR) -cr $@ $^
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -o $@ -c $^
|
|
|
|
%.s.o: %.s
|
|
$(CC) $(CFLAGS) $(ASMFLAGS) -o $@ -c $^
|
|
|
|
clean:
|
|
mv $(OBJ) /tmp/
|
|
mv $(TARGET) /tmp/
|
|
|