(Latest Revision: Sun Oct 29, 2017 )
Makefile
Makefile
To make a copy of the Makefile, just select the text
in-between the spacer lines below and copy it to your 'clipboard'. Then make
a new file and paste the text into it. Name the new file "Makefile" - exactly
that name - no extension.
The file has three indented lines. Each of those indented lines should begin
with a single tab character, and no other whitespace, followed by some text
that starts with "g++". The syntax of a Makefile requires that the indentation
be made with a tab character. If not, the 'make' command may not compile
your program properly.
It's possible that your software could transform the tabs into a series
of blank spaces. So please check for that. After you make your new copy of the file,
if necessary, just change back the indentation to a single tab
character.
# To compile the program put sequence.cpp, sem.cpp,
# sem.h, and this file: Makefile in a directory
# on one of the lab Macs. Then type
# make
# at the shell prompt while 'in' the directory
sequence: sequence.o sem.o
g++ -o sequence sequence.o sem.o
sequence.o: sequence.cpp sem.h
g++ -c sequence.cpp
sem.o: sem.cpp sem.h
g++ -c sem.cpp