Skip to content

Instantly share code, notes, and snippets.

@lstarnes1024
Last active August 29, 2015 14:15
Show Gist options
  • Save lstarnes1024/4b7debc39ac9360094ee to your computer and use it in GitHub Desktop.
Save lstarnes1024/4b7debc39ac9360094ee to your computer and use it in GitHub Desktop.
Makefile for CS 240 PA2 (simple version)
# Example C++ Makefile for PA2
# Author: Lee Starnes <starnelt@dukes.jmu.edu>
CXX = g++
CXXFLAGS = -std=c++11 -g -Wall
CPPFLAGS = -I.
LIBS =
SRCS = \
billTypeImpl.cpp \
dateTypeImpl.cpp \
doctorTypeImpl.cpp \
patientTypeImpl.cpp \
personTypeImpl.cpp \
mainProg.cpp
OBJS = ${SRCS:.cpp=.o}
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
out: $(OBJS)
$(CXX) $(CXXFLAGS) $(LIBS) $^ -o $@
default: out
clean:
@rm *.o out
run: out
@./out
.PHONY: clean run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment