makefile:14: multiple target patterns

Viewed 32

I'm trying to create a makefile for a simple hello world program in c, but when I try to run the make file to run it I get the error.

TARGET = hello_world

ALT_DEVICE_FAMILY ?= soc_cv_av

SOCEDS_ROOT ?= $(SOCEDS_DEST_ROOT)

HWLIBS_ROOT = $(SOCEDS_ROOT)/ip/altera/hps/altera_hps/hwlib

CROSS_COMPILE = arm-linux-gnueabihf-

CFLAGS = -g -Wall -D$(ALT_DEVICE_FAMILY) -
I$(HWLIBS_ROOT)/include/$(ALT_DEVICE_FAMILY) -I$(HWLIBS_ROOT)/include/

LDFLAGS = -g -Wall

CC = $(CROSS_COMPILE)gcc

ARCH= arm

build: $(TARGET)

$(TARGET): main.o

    $(CC) $(LDFLAGS) $^ -o $@

%.o : %.c

    $(CC) $(CFLAGS) -c $< -o $@

.PHONY: clean

clean:

    rm -f $(TARGET) *.a *.o *~

The project is running in an intel FPGA Cyclon V.

0 Answers
Related