-
-
Save MatyasKriz/fa4c844503d2d76d3f48760e093a493b to your computer and use it in GitHub Desktop.
Makefile pro spravne fungovani IZG3 na Macu. Omluvte prosim nepekne odradkovani Makefile, pokud by vam neco nefungovalo, napiste komentar dole pod gistem.
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
################################################################################ | |
# IZG project, framework compilation | |
################################################################################ | |
################################################################################ | |
# promenne prekladu | |
CFLAGS = -g3 -Wall $(INCS) -Wno-unused-function -fmessage-length=0 | |
ifeq ($(OS), Windows_NT) | |
INCS = -I../include -IQ:/mingw/SDL/ | |
LIBS = -lmingw32 -lSDLmain -lSDL -L../lib -LQ:/mingw/SDL | |
# REMOVE = del | |
REMOVE = rm -f | |
BIN = izg_lab_03.exe | |
else | |
UNAME_S := $(shell uname -s) | |
ifeq ($(UNAME_S), Linux) | |
LIBS = -lSDL | |
endif | |
ifeq ($(UNAME_S), Darwin) | |
LIBS = `sdl-config --libs` | |
CFLAGS += `sdl-config --cflags` | |
endif | |
INCS = -I/usr/include/SDL | |
# LIBS=-m32 -lSDL | |
# LIBS=-m64 -lSDL | |
REMOVE = rm -f | |
BIN = izg_lab_03 | |
endif | |
CXX = g++ | |
#CFLAGS = -m32 -g3 -Wall $(INCS) -Wno-unused-function -fmessage-length=0 | |
#CFLAGS = -m64 -g3 -Wall $(INCS) -Wno-unused-function -fmessage-length=0 | |
################################################################################ | |
# obecny cil kompilace | |
all: makedir $(BIN) | |
makedir: | |
mkdir -p obj | |
################################################################################ | |
# linkovani vysledneho souboru | |
$(BIN): obj/main.o obj/student.o obj/io.o obj/color.o | |
$(CXX) obj/main.o obj/student.o obj/io.o obj/color.o -o $(BIN) $(LIBS) | |
# strip $(BIN) | |
################################################################################ | |
# kompilace hlavniho souboru | |
obj/main.o: src/main.cpp | |
$(CXX) -c src/main.cpp -o obj/main.o $(CFLAGS) | |
################################################################################ | |
# kompilace studentskeho souboru | |
obj/student.o: src/student.cpp src/student.h | |
$(CXX) -c src/student.cpp -o obj/student.o $(CFLAGS) | |
################################################################################ | |
# kompilace dilcich souboru | |
obj/io.o: src/io.cpp src/io.h | |
$(CXX) -c src/io.cpp -o obj/io.o $(CFLAGS) | |
obj/color.o: src/color.cpp src/color.h | |
$(CXX) -c src/color.cpp -o obj/color.o $(CFLAGS) | |
################################################################################ | |
# cil vycisteni souboru prekladu | |
clean: clear | |
clear: | |
$(REMOVE) obj/*.o bin/$(BIN) | |
################################################################################ | |
################################################################################ |
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
/** | |
* @file student.h | |
* @author Ladislav Mosner, VUT FIT Brno, imosner@fit.vutbr.cz | |
* @author Petr Kleparnik, VUT FIT Brno, ikleparnik@fit.vutbr.cz | |
* @author Kamil Behun, VUT FIT Brno, ibehun@fit.vutbr.cz | |
* @date 11.03.2018 | |
* | |
* @brief Definice funkci studentu. | |
* | |
*/ | |
#ifndef STUDENT_H | |
#define STUDENT_H | |
#ifdef __linux__ | |
#include <limits.h> | |
#endif | |
#ifdef __APPLE__ | |
#include <cmath> | |
#endif | |
#include <vector> | |
#include <time.h> | |
#include <stdio.h> | |
#include "color.h" | |
void putPixel(int x, int y, RGBA color); | |
RGBA getPixel(int x, int y); | |
void pinedaTriangle(const Point &v1, const Point &v2, const Point &v3, const RGBA &color1, const RGBA &color2, bool arrow = false); | |
void pinedaPolygon(const Point *points, const int size, const RGBA &color1, const RGBA &color2); | |
#endif // STUDENT_H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment