-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.libatlas430
29 lines (21 loc) · 1.06 KB
/
Makefile.libatlas430
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
DRIVERLIB_SRC := $(wildcard $(DRIVERLIB)/*.c)
ATLAS_ARCH_SRC := $(wildcard $(ATLAS_ARCH_DIR)/*.c)
ATLAS_DRV_SRC := $(wildcard $(ATLAS_DRV_DIR)/*.c)
ATLAS_OBJ_DIR = $(OBJ_DIR)/libatlas430
DRIVERLIB_OBJECTS = $(DRIVERLIB_SRC:$(DRIVERLIB)/%.c=$(ATLAS_OBJ_DIR)/driverlib/%.o)
ATLAS_OBJECTS = $(ATLAS_DRV_SRC:$(ATLAS_DRV_DIR)/%.c=$(ATLAS_OBJ_DIR)/%.o) $(ATLAS_ARCH_SRC:$(ATLAS_ARCH_DIR)/%.c=$(ATLAS_OBJ_DIR)/arch/%.o)
$(ATLAS_OBJ_DIR)/driverlib/%.o: $(DRIVERLIB)/%.c
@echo -e " * [driverlib] $(@F)"
@mkdir -p $(ATLAS_OBJ_DIR)/driverlib
@$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
$(ATLAS_OBJ_DIR)/%.o: $(ATLAS_DRV_DIR)/%.c config.h
@echo -e " * [drivers] $(@F)"
@mkdir -p $(ATLAS_OBJ_DIR)
@$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
$(ATLAS_OBJ_DIR)/arch/%.o: $(ATLAS_ARCH_DIR)/%.c config.h
@echo -e " * [arch] $(@F)"
@mkdir -p $(ATLAS_OBJ_DIR)/arch
@$(CC) $(INCLUDES) $(CFLAGS) -c $< -o $@
$(OBJ_DIR)/libatlas430.a: $(DRIVERLIB_OBJECTS) $(ATLAS_OBJECTS)
@${RM} -f $(OBJ_DIR)/libatlas430.a
@${AR} rs $(OBJ_DIR)/libatlas430.a $(DRIVERLIB_OBJECTS) $(ATLAS_OBJECTS)