-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile.inc
More file actions
39 lines (32 loc) · 919 Bytes
/
makefile.inc
File metadata and controls
39 lines (32 loc) · 919 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
SHELL = /bin/sh
PROJ = yaeos
VERSION = 1.2.1a
ARCH = arm7tdmi
SRCTAR = $(PROJ)-$(VERSION)-src
RELTAR = $(PROJ)-$(VERSION)-$(ARCH)
EXE = p1test p2test
SRC = pcb asl
LIBS = $(addprefix lib,$(SRC))
CC = arm-none-eabi-gcc
LD = arm-none-eabi-ld
AR = arm-none-eabi-ar
CFLAGS = -mcpu=$(ARCH) -Wall -std=gnu11
ifeq ($(shell uname),Darwin)
INC_DIR = /usr/local/include/uarm
else
INC_DIR = /usr/include/uarm
endif
SYSLIB = $(INC_DIR)/crtso.o $(INC_DIR)/libuarm.o
ELFSCRIPT = $(INC_DIR)/ldscripts/elf32ltsarm.h.uarmcore.x
# don't print recipe (alternative use "@" before command)
.SILENT:
# don't remove intermediate files
.SECONDARY:
# delete target if exit nonzero
.DELETE_ON_ERROR:
# ignore error (alternative use "-" before command)
.IGNORE: clean
# prerequisite name is string before ".o", ex. pcb.o:pcb.c
%.o : %.c
# "$@" file name of the target of the rule
$(CC) $(CFLAGS) -c $< -o $@ -I $(INC_DIR) -I ../include