#107379 - Ant6n - Sun Oct 29, 2006 3:57 am
Hi,
I recently switched from the managed make system of vham to eclipse. I used the eclipse tutorial that floats around here in the forum somewhere. they gave an example makefile, so i basicly just copy pasted my source file names. I dont know much about makefiles, so i dont know how i can add my .S files
I tried this:
earlier this at least compiled, but the asm files seemed not to link. the debugger showed the pc run jump around and then settle in an infite loop when calling agbprint.
i fiddled around with it, and now it doesnt even compile anymore, giving the error message:
"make -k build
make: *** No rule to make target `lib_asmirqhandler.S', needed by `lib_asmirqhandler.o'.
make: *** No rule to make target `lib_asmagbprint.S', needed by `lib_asmagbprint.o'.
make: Target `build' not remade because of errors."
can anybody please point out what i am doing wrong here. Its porbably something obvious for people who use make and asm files.
Thank you very much
Anton
Last edited by Ant6n on Wed Nov 01, 2006 4:05 pm; edited 4 times in total
I recently switched from the managed make system of vham to eclipse. I used the eclipse tutorial that floats around here in the forum somewhere. they gave an example makefile, so i basicly just copy pasted my source file names. I dont know much about makefiles, so i dont know how i can add my .S files
I tried this:
Code: |
# --- Project details --- PROJ := lib EXT := gba CFILES := main.c lib_time.c lib_frame.c lib_math.c lib_interrupt.c lib_memory.c lib_sprite.c lib_stile.c rock.c ship.c shipdata.c SFILES := lib_asmirqhandler.S lib_asmagbprint.S COBJS := $(CFILES:.c=.o) SOBJS := $(SFILES:.S=.o) OBJS := $(COBJS) $(SOBJS) #--- Tool settings --- # for devkitARM r19+ use PREFIX := arm-eabi PREFIX := arm-eabi- AS := $(PREFIX)as CC := $(PREFIX)gcc LD := $(PREFIX)gcc OBJCOPY := $(PREFIX)objcopy MODEL := -mthumb-interwork -mthumb SPECS := -specs=gba.specs # comment out for DKA ASFLAGS := -mthumb-interwork CFLAGS := -I./ $(MODEL) -O2 -Wall LDFLAGS := $(SPECS) $(MODEL) #--- Build steps --- build : $(PROJ).$(EXT) $(PROJ).$(EXT) : $(PROJ).elf @$(OBJCOPY) -v -O binary $< $@ -@gbafix $@ $(PROJ).elf : $(OBJS) @$(LD) $(OBJS) $(LDFLAGS) -o $@ $(COBJS) : %.o : %.c $(CC) $(CFLAGS) -g -c $< -o $@ $(SOBJS) : %.o : %.S $(AS) $(ASLAGS) -g -c $< -o $@ # --- Clean --- .PHONY : clean clean : @rm -fv $(COBJS) @rm -fv $(SOBJS) @rm -fv $(PROJ).$(EXT) @rm -fv $(PROJ).elf |
earlier this at least compiled, but the asm files seemed not to link. the debugger showed the pc run jump around and then settle in an infite loop when calling agbprint.
i fiddled around with it, and now it doesnt even compile anymore, giving the error message:
"make -k build
make: *** No rule to make target `lib_asmirqhandler.S', needed by `lib_asmirqhandler.o'.
make: *** No rule to make target `lib_asmagbprint.S', needed by `lib_asmagbprint.o'.
make: Target `build' not remade because of errors."
can anybody please point out what i am doing wrong here. Its porbably something obvious for people who use make and asm files.
Thank you very much
Anton
Last edited by Ant6n on Wed Nov 01, 2006 4:05 pm; edited 4 times in total