@whitetiger0990: Why use cygwin instead of MSYS?
@juan abba: I did this once. My makefile looks like this:
Code:
rfrc : rfrc_41.o rfrc_main.o rfrc_init.o rfrc_interrupts.o
mplink 18f8722.lkr rfrc_41.o ifi_frc_8722.lib rfrc_main.o rfrc_init.o \
rfrc_interrupts.o //o rfrc
rfrc_41.o : rfrc_41.c rfrc_41.h rfrc_main.h
mcc18 -Op- -fo rfrc_41.o rfrc_41.c
rfrc_main.o : rfrc_main.c rfrc_main.h
mcc18 -Op- -fo rfrc_main.o rfrc_main.c
rfrc_init.o : rfrc_init.c rfrc_init.h
mcc18 -Op- -fo rfrc_init.o rfrc_init.c
rfrc_interrupts.o : rfrc_interrupts.c rfrc_interrupts.h rfrc_main.h
mcc18 -Op- -fo rfrc_interrupts.o rfrc_interrupts.c
clean :
rm -rf *.o; rm -rf *.hex
rm -rf rfrc
rm -rf rfrc.cod
rm -rf rfrc.lst
I wrote this when I was still bad at writing makefiles, so now I'd probably make a rule to compile all objects, but the above does work and is also a bit easier to understand, I think.
And, although my code was never tested (so it could be completely terrible and bad), you can find the entire repository here: svn://home.russfrank.net/development/team41_2008/rfrc/ . (If you need an SVN client for windows, try TortoiseSVN:
http://tortoisesvn.tigris.org/) It does compile, but I never actually put it on an RC.
Hope this helps!