-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
55 lines (43 loc) · 1.34 KB
/
makefile
File metadata and controls
55 lines (43 loc) · 1.34 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Created by the Intel FPGA Monitor Program
# DO NOT MODIFY
############################################
# Global Defines
DEFINE_COMMA := ,
############################################
# Compilation Targets
# Programs
AS := arm-altera-eabi-as
CC := arm-altera-eabi-gcc
LD := arm-altera-eabi-ld
OC := arm-altera-eabi-objcopy
RM := rm -f
# Flags
USERCCFLAGS := -g -O1
ARCHASFLAGS := -mfloat-abi=soft -march=armv7-a -mcpu=cortex-a9 --gstabs -I "$$GNU_ARM_TOOL_ROOTDIR/arm-altera-eabi/include/"
ARCHCCFLAGS := -mfloat-abi=soft -march=armv7-a -mtune=cortex-a9 -mcpu=cortex-a9
ARCHLDFLAGS := --defsym arm_program_mem=0x0 --defsym arm_available_mem_size=0x3ffffff8 --defsym __cs3_stack=0x3ffffff8
ARCHLDSCRIPT := -T"C:/intelFPGA_lite/18.1/University_Program/Monitor_Program/build/altera-socfpga-unhosted-as.ld"
ASFLAGS := $(ARCHASFLAGS)
CCFLAGS := -Wall -c $(USERCCFLAGS) $(ARCHCCFLAGS)
LDFLAGS := $(ARCHLDFLAGS) $(ARCHLDSCRIPT) -e _start -u _start
OCFLAGS := -O srec
# Files
HDRS :=
SRCS := lab4.s address_map_arm.s main.s
OBJS := $(patsubst %, %.o, $(SRCS))
# Targets
COMPILE: lab4.srec
lab4.srec: lab4.axf
$(RM) $@
$(OC) $(OCFLAGS) $< $@
lab4.axf: $(OBJS)
$(RM) $@
$(LD) $(LDFLAGS) $(OBJS) -o $@
%.c.o: %.c $(HDRS)
$(RM) $@
$(CC) $(CCFLAGS) $< -o $@
%.s.o: %.s $(HDRS)
$(RM) $@
$(AS) $(ASFLAGS) $< -o $@
CLEAN:
$(RM) lab4.srec lab4.axf $(OBJS)