dmcoles / gnu_make_amiga

GNU General Public License v3.0
7 stars 1 forks source link

Failure to find rule #1

Closed steen-lund closed 5 months ago

steen-lund commented 5 months ago

The makefile I have pasted in below fails with the following output.

make: *** No rule to make target ´obj/main.o´, needed by ´bin/SerialDebugTest´. Stop.

Same makefile work fine with make 3.75 from Aminet (http://aminet.net/dev/c/make-3.75-bin.lha) If it matters I am using OS3.2.2.1.

CC = vc +aos68k_warpos
STRIP = strip
MKDIR = makedir >NIL: ALL
RM    = delete ALL FORCE QUIET

TARGET  = SerialDebugTest
VERSION = 1

OPTIMIZE = O2
DEBUG    = 
INCLUDES = -I. -I./include
DEFINES  =
WARNINGS =

CFLAGS   = -c99 -cpp-comments
LDFLAGS  =
LIBS     =

STRIPFLAGS = 

SRCS = main.c
OBJS = $(addprefix obj/,$(SRCS:.c=.o))
DEPS = $(OBJS:.o=.d)

.PHONY: all
all: bin/$(TARGET)

obj/%.o: src/%.c
#   @$(MKDIR) $(dir $@)
    $(CC) $(CFLAGS) -c $< -o $@

bin/$(TARGET): $(OBJS)
#   @$(MKDIR) $(dir $@)
    $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

.PHONY: clean
clean:
    $(RM) bin obj
dmcoles commented 5 months ago

I'm not able to reproduce this using your makefile. Would you be willing to share your whole source ?

steen-lund commented 5 months ago

Added archive of me little test project

SerialDebugTest.zip

dmcoles commented 5 months ago

I'm still not able to recreate. I've tried to compile your project and I'm not seeing the same problem as you. I haven't managed to build your project though as the compiler crashes out. Probably I don't have the compiler set up correctly but it does at least try to compile the source file

I wonder if it could be a stack size issue. It's a long shot but it's the only thing I can think of at the moment

steen-lund commented 5 months ago

Hmm, yes something is odd. I just tried the exact same makefile but in UAE instead of real hardware and it just worked fine. I will have to investigate further why it does not work on my real hardware system.

Sorry for the inconvenience.