-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
40 lines (30 loc) · 1.03 KB
/
Makefile
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
###############################################################################
# Copyright (c) 2010 Linaro Limited
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Peter Maydell (Linaro) - initial implementation
# Claudio Fontana (Linaro) - small refactoring and aarch64 support
###############################################################################
# import the variables generated by configure
include Makefile.in
CFLAGS ?= -g -Wall
PROG=risu
SRCS=risu.c comms.c risu_$(ARCH).c risu_reginfo_$(ARCH).c
HDRS=risu.h
BINS=test_$(ARCH).bin
OBJS=$(SRCS:.c=.o)
all: $(PROG) $(BINS)
$(PROG): $(OBJS)
$(CC) $(CFLAGS) -o $@ $^
%.o: %.c $(HDRS)
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
%_$(ARCH).bin: %_$(ARCH).elf
$(OBJCOPY) -O binary $< $@
%_$(ARCH).elf: %_$(ARCH).s
$(AS) -o $@ $<
clean:
rm -f $(PROG) $(OBJS) $(BINS)