Jump to content

Makefile Help

Recommended Posts

I've been learning to program/debug via command prompt instructions and I'm now trying to set up a project structure where my source files are included in a /lib directory, and I dump my object files into an /obj directory.  I've modified my makefile to reflect this, however after doing a couple test runs ('make -n'), the only command that gets executed is the first one in the file (cmd to build make.o).  However if I type out the commands manually I can successfully generate an .elf file which is uploaded to my Launchpad.  Could somebody please take a look at my makefile?    For reference, I'm just using a template 'Blink the LEDs' example where I create a header/souce file combination for the delay() function.


For Reference, my laptop is a Lenovo T520 running 64-bit Lubuntu 13.04


Link to post
Share on other sites

you might want to add an 'all' target as the first target


... stuff

all: ${FILE_OUT}

... stuff


Also, your clean is very dangerous, if the INCDIR variable isn't set, the script will try and remove all your top level files

( Not sure why you are deleting the INCDIR/* files )



Adding the 'all' target did the trick.  Thanks!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...