#48396 - justinGBA - Tue Jul 19, 2005 7:57 pm
I am stuck and i do not understand the layout of the makefile..
For reference, this one looks nice...
now all my devkit arm stuff is in...
/Developer/GameBoy\ Advance/devkitARM
/Developer/GameBoy\ Advance/libgba
how do i let the make file know where the tools are so it builds?
sorry im new to unix style programming
TIA
For reference, this one looks nice...
Code: |
# === Project details (add your own stuff here) === PROJ? ? := foo INCLUDE? := LIBPATHS := LIBS? ? := COBJS? ?:= $(PROJ).o SOBJS? ?:= OBJS? ? := $(COBJS) $(SOBJS) # --- boot type --- MB = 0 ifeq ($(MB),1) EXT? ? ?:= mb.gba SPECS? ?:= -specs=gba_mb.specs else EXT? ? ?:= gba SPECS? ?:= -specs=gba.specs endif # --- Compiling --- CROSS:= arm-elf- AS= $(CROSS)as CC= $(CROSS)gcc LD= $(CROSS)gcc OBJCOPY= $(CROSS)objcopy MODEL? ?:= -mthumb-interwork -mthumb CBASE? ?:= $(INCLUDE) -O2 -Wall -mthumb-interwork ASFLAGS := -mthumb-interwork CFLAGS? := $(CBASE) -mthumb LDFLAGS := $(SPECS) $(MODEL) $(LIBPATHS) $(LIBS)? -Wl,-Map,$(PROJ).map # === Building steps === build: $(PROJ).$(EXT) # --- convert to binary --- $(PROJ).$(EXT) : $(PROJ).elf ? ?@$(OBJCOPY) -v -O binary $< $@ ? ?-@gbafix $@ # --- link --- $(PROJ).elf : $(OBJS) ? ?$(LD) $(OBJS) $(LDFLAGS) -o $@ # --- compile --- $(COBJS) : %.o : %.c ? ?$(CC) $(CFLAGS) -c $< -o $@ # === Clean === .PHONY : clean clean : ? ?@rm -fv $(OBJS) ? ?@rm -fv $(PROJ).$(EXT) ? ?@rm -fv $(PROJ).elf #EOF |
now all my devkit arm stuff is in...
/Developer/GameBoy\ Advance/devkitARM
/Developer/GameBoy\ Advance/libgba
how do i let the make file know where the tools are so it builds?
sorry im new to unix style programming
TIA