make.exe: *** No rule to make target `all'. Stop.

Guest #1172271
Hi,

I'm newbie in this field. I want to compile uSmartX with WinARM but I
got this following message:

> "make.exe" all
make.exe: *** No rule to make target `all'.  Stop.

> Process Exit Code: 2
> Time Taken: 00:01

This is my makefile for any case:

# Makefile for ARM target

# Define directories.
  uSMARTX_INC_DIR = ../../../inc/
  uSMARTX_SRC_DIR = ../../../src/
  uSMARTX_HAL_DIR = ../../hal/
  uSMARTX_HAL_INC_DIR = ../inc/

# Define programs.
  AR = arm-elf-ar
    COMPILE = arm-elf-gcc
    ASSEMBLE = arm-elf-gcc -x assembler-with-cpp
    REMOVE = rm -f
    COPY = cp
    MOVE = mv

# MCU name
  MCU = arm7tdmi

# Output format. Can be [srec|ihex].
    FORMAT = ihex

# Target file name (without extension).
  TARGET = libusmartx

# List C source files here.
  SRC =  $(uSMARTX_SRC_DIR)usmartx.c \
      $(uSMARTX_SRC_DIR)queue.c \
      $(uSMARTX_SRC_DIR)mailbox.c \
      $(uSMARTX_SRC_DIR)semaphore.c \
      $(uSMARTX_SRC_DIR)mballoc.c \
      $(uSMARTX_SRC_DIR)cycbuff.c \

# List Assembler source files here.
  ASRC = $(uSMARTX_HAL_DIR)hal_gnu.s

# Compiler flags.
  CPFLAGS = -c -g -O2 -Wall

# Assembler flags.
    ASFLAGS = -Wa,-ahlms=$(<:.s=.lst),--gstabs

# Linker flags (passed via GCC).
  LDFLAGS =

# Additional library flags (-lm = math library).
  LIBFLAGS =

# Define all project specific object files.
  OBJ  = $(SRC:.c=.o) $(ASRC:.s=.o)

# Define all listing files.
  LST = $(ASRC:.s=.lst) $(SRC:.c=.lst)

# Compiler flags to generate dependency files.
  GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d

# Add target processor to flags.
     CPFLAGS += -mcpu=$(MCU) $(GENDEPFLAGS)
  ASFLAGS += -mcpu=$(MCU)
  LDFLAGS += -mcpu=$(MCU)

# Default target.
.PHONY : Lib
Lib: Clean $(TARGET).a clear_output

# Link: create ELF output file from object files.
.SECONDARY : $(TRG).elf
.PRECIOUS : $(OBJ)
%.a: $(OBJ)
  $(AR) rs $(TARGET).a $(OBJ)

# Compile: create object files from C source files.
%.o : %.c
  $(COMPILE) -c $(CPFLAGS) -I$(uSMARTX_INC_DIR) -I$(uSMARTX_HAL_INC_DIR)
$< -o $@

# Assemble: create object files from assembler files.
%.o : %.s
  $(ASSEMBLE) -c $(ASFLAGS) $< -o $@

# Target: clean project.
.SILENT : Clean
.PHONY : Clean
Clean :
  $(REMOVE) $(TARGET).hex
  $(REMOVE) $(TARGET).obj
  $(REMOVE) $(TARGET).elf
  $(REMOVE) $(TARGET).bin
  $(REMOVE) $(TARGET).map
  $(REMOVE) $(TARGET).obj
  $(REMOVE) $(TARGET).sym
  $(REMOVE) $(TARGET).lnk
  $(REMOVE) $(TARGET).lss
  $(REMOVE) $(OBJ)
  $(REMOVE) $(LST)
  $(REMOVE) $(SRC:.c=.s)

# Target clear output files
.SILENT : clear_output
.PHONY: clear_output
clear_output :
  $(RM)  $(uSMARTX_SRC_DIR)*.o
  $(RM)  *.o

# Include the dependency files.
-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)


# List assembly only source file dependencies here:

If someone can help me with this problem I will be very greatful.

Thanks in advance
Guest #1172272
I also see no line for target 'all'. Seems your "all" target is renamed
'Lib'. Do you try to make a library? Call make with 'make Lib'

Reply

A question of your own? This thread is over 19 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.