Creating your makefile

 

To create your makefile

  1. In the C++ Projects view, right-click the HelloWorld project folder and click New > File.
  2. In the File name box, type makefile.
  3. Click Finish.
  4. Type the code below in the makefile editor.
  5. CXXFLAGS = -g

    all : main.o
    ${CXX} ${CXXFLAGS} -o hello.exe main.o

    clean :
    rm -rf hello.exe main.o

  6. Click File > Save makefile.

Next

Back

Copyright IBM Corporation
 2000, 2002. All Rights Reserved.