...
Code Block |
---|
language | c# |
---|
title | rfdc makefile |
---|
|
APP = rfdc-test
# Add any other object files to this list below
APP_OBJS = xrfdc_selftest_example.o
APP_OBJS += xrfdc_clk.o
LDLIBS += -lmetal
LDLIBS += -lrfdc
all: $(APP)
build: $(APP)
$(APP): $(APP_OBJS)
$(CC) $(LDFLAGS) -o $@ $(APP_OBJS) $(LDLIBS)
clean:
-rm -f $(APP) *.elf *.gdb *.o $(APP_OBJS)
%.o: %.c
$(CC) -c -Wall -O0 -g3 -c -fmessage-length=0 -MT"$@" -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" |
...
Code Block |
---|
|
#
# This file is the rfdc-test recipe.
#
SUMMARY = "Simple rfdc-test application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "file://xrfdc_selftest_example.c \
file://xrfdc_clk.c \
file://xrfdc_clk.h \
file://Makefile \
"
S = "${WORKDIR}"
DEPENDS = "rfdc"
PROVIDES = "rfdc-test"
do_compile (){
{ make all BOARD_FLAG=-DXPS_BOARD_ZCU111 oe_runmakeOUTS=rfdc-test RFDC_OBJS=xrfdc_selftest_example.o
}
do_install() {
install -d ${D}${bindir}
install -m 0755 rfdc-test ${D}${bindir}
} |
Note: Users need to pass the XPS_BOARD_ZCU111 symbol to the compiler in order to set up the clocks correctly. The OUTS here will be the application name, and the RFDC_OBJS is the toplevel file