Skip to content

Instantly share code, notes, and snippets.

@patricklucas
Created June 12, 2012 20:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patricklucas/2919945 to your computer and use it in GitHub Desktop.
Save patricklucas/2919945 to your computer and use it in GitHub Desktop.
CC=g++
CPPFLAGS=-O2 -Wall -Wextra -Werror -std=c++11
PROJ=homework2
BIN=$(PROJ)
SRCS=main.cpp vector3d.cpp
OBJS=$(subst .cpp,.o,$(SRCS))
$(BIN): $(OBJS)
$(CC) -o $@ $^
main.o: vector3d.h main.cpp
$(CC) $(CPPFLAGS) -c main.cpp
vector3d.o: vector3d.h vector3d.cpp
$(CC) $(CPPFLAGS) -c vector3d.cpp
turnin: $(PROJ).tgz
$(PROJ).tgz:
git archive --prefix=$(PROJ)/ master | gzip > $(PROJ).tgz
clean:
rm -f $(BIN) $(OBJS) $(PROJ).tgz
@t-mart
Copy link

t-mart commented Jun 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment