mirror of
https://github.com/bmartini/zynq-axis.git
synced 2024-09-05 19:19:27 +08:00
01a04802cf
This change prepends the CROSS_COMPILE environmental variable to the compilers definition. Thus adding the possibility of cross compiling when the cross compiling tool chain has been setup correctly.
40 lines
510 B
Makefile
40 lines
510 B
Makefile
CC = ${CROSS_COMPILE}gcc
|
|
LDFLAGS := -linterface
|
|
CFLAGS := -c -Wall -Werror
|
|
INCLUDES := -I.
|
|
|
|
EXECUTABLE = \
|
|
write-memory \
|
|
read-memory \
|
|
test-mem \
|
|
test-cfg
|
|
|
|
|
|
.PHONY : all
|
|
all : $(EXECUTABLE)
|
|
|
|
|
|
.c.o :
|
|
$(CC) $(INCLUDES) $(CFLAGS) $< -o $@
|
|
|
|
|
|
write-memory : write-memory.o
|
|
$(CC) $< -o $@ $(LDFLAGS)
|
|
|
|
|
|
read-memory : read-memory.o
|
|
$(CC) $< -o $@ $(LDFLAGS)
|
|
|
|
|
|
test-mem : test-mem.o
|
|
$(CC) $< -o $@ $(LDFLAGS)
|
|
|
|
|
|
test-cfg : test-cfg.o
|
|
$(CC) $< -o $@ $(LDFLAGS)
|
|
|
|
|
|
.PHONY : clean
|
|
clean :
|
|
rm -f *.o $(EXECUTABLE)
|