how to use makefile?

Thread Starter

simplytuff

Joined Mar 21, 2008
37
I am working on a project which includes programming MSP430-449STK2 development board by Olimex,


i am totally new to programming, i need to know how to make binary file using the header files which came with the program?

the project instructions say

"The software is written in C using the MSPGCC (http://mspgcc.sourceforge.net/), a port of the GCC to the MSP platform. The JTAG debugger is from Olimex (MSP430-JTAG http://www.olimex.com) and is used to download the firmware into the MSP430.

The firmware comes with a makefile – unzip the sources to any directory and run make"
 

davebee

Joined Oct 22, 2008
540
"make" is a program that reads a text file of instructions, then performs the instructions.

Usually the instructions are things like calling a compiler to compile source code with a number of library files, sometimes calling a linker program, sometimes renaming and moving the resulting files elsewhere in your system.

The point of a makefile is that somebody can supply you with the make text file so you don't need to know all the details. If they have done a good job, all you need to do is to unzip the zipfile to a directory, navigate a command console to that directory and type "make".

It is not unusual for problems to come up. If that happens, then you might have a difficult time getting anywhere if you're totally new to programming.
 

stellarpower

Joined Feb 19, 2009
26
If you're using Linux or a posix-compliant OS (don't worry if you don't know what that means) you should be able to open a terminal/command prompt/console and use cd to go to the unzipped folder. Then, type ./configure and it should start to work out how to change itself based on your system. After that, type make and when that's finished, usually make install. If it doesn't work well, don't worry. It should make things easy, but I've never managed to get it to work successfully.
 

Thread Starter

simplytuff

Joined Mar 21, 2008
37
Command Prompt doesn't seem to recognize any of the commands, i have tried several !

below is a screen shot from instructions, when i try "make" nothing happens1

 

someonesdad

Joined Jul 7, 2009
1,583
make is a program, just like any other tool. There are probably many ways of getting it on Windows; here are two:

  1. Install cygwin and ensure that the proper package is installed that includes make.
  2. Install MSYS from MinGW.
Unless you're familiar with UNIX-type stuff, I don't recommend cygwin because you'll likely get hopelessly confused by all the stuff (it's actually pretty simple, but you won't grok that until after you've learned to deal with the complexity). MSYS is intended to give you tools like bash, make, awk, and grep (basic UNIX-type utilities); this is to be able to let you use mingw to build things that e.g. use the autotools framework.

You can get by without using make; this can be done by reading the makefile and understanding its instructions. If you already have make, you can type 'make -n <target_to_build>' and see what will be done. Then you can replace those commands with e.g. a batch file to do the work (but you won't have the build avoidance benefits of make).

You could post the makefile in this thread and one of us could run 'make -n' for you, so that might be a nice workaround.
 
Top