papaschtroumpf Posted February 5, 2005 Report Share Posted February 5, 2005 I'm trying to port a windows based environment to cygwin (which I'm hoping is the first step towards a full linux migration) This project is for an embedded TI processor and we're not using gcc as the compiler. The TI compiler generates .obj files instead of .o, and the Powers That Be decided that this wasn't about to change (i.e. even though I could tell the TI compiler to use the .o extension, it's not going to happen). The TI compiler doesn't know how to generate dependencies, so I figured I'd use gcc to do it, like : gcc -E -MM -MG *.c The problem is that is generate dependencies like this: foo.o: foo.c bar.h bar2.h whereas what I want is : foo.obj: foo.c bar.h bar2.h I can't figure out how to tell gcc that I want the obj extension for my object files, so right now my solution is as follows: gcc -E -MM -MG *.c | sed "s/.o:/.obj:/" >.depend which feels like a kludge and porbably takes longer. Any better way to do this? Also, I have .asm files that depend on .inc files using the following syntax in foo.asm: .include "bar.inc" so I would like a dependency rule to look like this: foo.obj: foo.asm bar.inc Can gcc be tricked into doing this? Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.