Last active
March 24, 2017 23:15
-
-
Save 648trindade/3d90de34ebb72870bb6834acb2548012 to your computer and use it in GitHub Desktop.
Makefile para demos de Computação Gráfica
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
################################################################################ | |
# Makefile para sistemas GNU/Linux # | |
# Alvo: Demos com canvas do prof. Cesar Tadeu Pozzer, docente da disciplina # | |
# de Computação Gráfica da UFSM, disponível no link # | |
# http://www-usr.inf.ufsm.br/~pozzer/disciplinas/cg_demos.rar # | |
# Instruções: Coloque esse arquivo no diretório raiz do projeto. Compile com # | |
# 'make' a partir de qualquer shell como bash, sh, zsh, etc. # | |
# Para evitar possíveis erros, crie manualmente uma pasta 'build' no di- # | |
# retório raiz do projeto. | |
# Obs.: Esse Makefile não faz uso das bibliotecas disponibilizadas juntamente # | |
# ao código fonte, por se tratarem de bibliotecas 32-bit somente. # | |
# Para compilar você precisa instalar os pacotes com cabeçalhos de desen-# | |
# volvimento freeglut, GLU (Utilitários OpenGL) e GL (API OpenGL) # | |
# Disponíveis como freeglut3-dev, libglu1-mesa-dev e libgl1-mesa-dev # | |
# nos repositórios de distribuições GNU/Linux baseadas em Debian. # | |
# Autor: Rafael Gauna Trindade # | |
# Data: 2016/04/02 # | |
################################################################################ | |
CXX=g++ | |
CXXFLAGS=-Wall -fexceptions -std=c++11 -g | |
INCLUDES=-Iinclude | |
SRCS=$(shell find -name *.cpp) | |
OBJS=$(shell find -name *.cpp | sed "s/(.*\)cpp/\1o/g") | |
LIBS=-lglut -lGLU -lGL | |
all: link | |
link: ${OBJS} | |
# ligando e gerando executavel em "./build/simulador" | |
${CXX} -o build/simulador ${OBJS} ${LIBS} | |
%.o: %.cpp | |
${CXX} ${CXXFLAGS} $< -o $@ | |
clear: | |
# apagando todos os arquivos objetos gerados | |
rm *.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
funcionou. ++STAR