JuiceBox Code Lcd Makefile

(file lcd_1.mak)

PROJECT=lcd_1
 * 1)  the name of the project
 * 1)  the name of the project

OBJECTS = $(PROJECT).o crt0.o
 * 1)  List of the objects files in the project
 * 2)  Keep it current with all the source!

GCC = D:/cygwin/opt/rtems-4.6/bin/arm-rtems-gcc
 * 1)  Here's where the compiler options can be messed up

GCFLAGS = -Wall -nostartfiles -mcpu=arm7tdmi -O2

OBJCOPY = D:/cygwin/opt/rtems-4.6/bin/arm-rtems-objcopy



all:: $(PROJECT).hex

$(PROJECT).hex: $(PROJECT).elf $(OBJCOPY) -R .stack -S -O ihex $(PROJECT).elf $(PROJECT).hex

$(PROJECT).elf: $(OBJECTS) $(PROJECT).dld $(GCC) $(GCFLAGS) -T $(PROJECT).dld $(OBJECTS) -Xlinker -Map -Xlinker $(PROJECT).map -o $(PROJECT).elf


 * 1)  Default rules to compile .c and .cpp file to .o
 * 2)  and assemble .s files to .o
 * 1)  and assemble .s files to .o

.c.o : $(GCC) $(GCFLAGS) -c $< $(GCC) -MM -o $*.d $<

.cpp.o : $(GCC) $(GCFLAGS) -c $< $(GCC) -MM -o $*.d $<

.s.o : $(GCC) -x assembler-with-cpp $(GCFLAGS) -Wa,-gstabs -c $<


 * 1)    Optional: copy all the .d files (autodependicies from source files) to the bottom of the makefile
 * 2)    This will ensure that header file mods will force a recompile, if needed
 * 3)    To update: delete everything after this line and "cat *.d >> lcd_1.mak"
 * 1)    To update: delete everything after this line and "cat *.d >> lcd_1.mak"

lcd_1.o: lcd_1.c stdint.h s3c44b0x.h