Created
June 20, 2016 09:22
-
-
Save zry656565/e15bed34d833bfdbf1bd796afed742d8 to your computer and use it in GitHub Desktop.
Makefile sample from https://www.cs.umd.edu/class/fall2002/cmsc214/Tutorial/makefile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OBJS = MovieList.o Movie.o NameList.o Name.o Iterator.o | |
CC = g++ | |
DEBUG = -g | |
CFLAGS = -Wall -c $(DEBUG) | |
LFLAGS = -Wall $(DEBUG) | |
p1 : $(OBJS) | |
$(CC) $(LFLAGS) $(OBJS) -o p1 | |
MovieList.o : MovieList.h MovieList.cpp Movie.h NameList.h Name.h Iterator.h | |
$(CC) $(CFLAGS) MovieList.cpp | |
Movie.o : Movie.h Movie.cpp NameList.h Name.h | |
$(CC) $(CFLAGS) Movie.cpp | |
NameList.o : NameList.h NameList.cpp Name.h | |
$(CC) $(CFLAGS) NameList.cpp | |
Name.o : Name.h Name.cpp | |
$(CC) $(CFLAGS) Name.cpp | |
Iterator.o : Iterator.h Iterator.cpp MovieList.h | |
$(CC) $(CFLAGS) Iterator.cpp | |
clean: | |
\rm *.o *~ p1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment