[Solved] How to create makefile


Why not try something like this:

CC=g++
CFLAGS=-c -Wall
LDFLAGS=
SOURCES= p4KyuCho.cpp Stack.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=hello

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS) 
*TAB* $(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
*TAB* $(CC) $(CFLAGS) $< -o $@

From: http://mrbook.org/tutorials/make/

SPACING/TABBING IS VERY, I REPEAT, VERY IMPORTANT IN MAKEFILES. read up on that.

solved How to create makefile