DSP Hello World » Makefile
1 |
###############################################################################
|
---|---|
2 |
## Makefile example for compiling DSP Hello World ARM side code
|
3 |
###############################################################################
|
4 |
|
5 |
# Set the compiler being used.
|
6 |
CC = arm-angstrom-linux-gnueabi-g++ |
7 |
|
8 |
# Setup reference to MDK
|
9 |
ifndef MDK |
10 |
MDK = ${HOME}/MDK_2012-08-10 |
11 |
endif
|
12 |
|
13 |
# Includes needed for proper compilation
|
14 |
INCLUDES = -I${MDK}/sw/ARM/linux/libdsp -I${MDK}/sw/ARM/linux/libdaq |
15 |
# Libraries needed for linking
|
16 |
LDFLAGS = ${MDK}/lib/ARM/Release/dsplink.lib -L${MDK}/lib/ARM/Release -ldsp -lpthread -lrt -ldaq |
17 |
|
18 |
# Set Compiler Flags
|
19 |
CFLAGS =-g -c -Wall $(INCLUDES) -std=gnu++0x |
20 |
|
21 |
# List of source to be compiled
|
22 |
SOURCES = arm_main.cpp |
23 |
|
24 |
OBJECTS = $(SOURCES:.cpp=.o) |
25 |
EXECUTABLE = HelloWorld |
26 |
|
27 |
all: $(SOURCES) $(EXECUTABLE) |
28 |
|
29 |
$(EXECUTABLE): $(OBJECTS) |
30 |
$(CC) $(OBJECTS) -o $@ $(LDFLAGS) |
31 |
|
32 |
.cpp.o: |
33 |
$(CC) $(CFLAGS) $< -o $@ |
34 |
|
35 |
clean: |
36 |
rm -rf $(OBJECTS) $(EXECUTABLE) |