initial, building using mingw32 under cygwin, have to add mingw sys-root/bin to PATH

This commit is contained in:
Josh Holtrop 2012-03-04 19:52:47 -05:00
commit d0c8bd87ff
3 changed files with 28 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
clock.exe

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
PREFIX := i686-pc-mingw32
CC := $(PREFIX)-gcc
CXX := $(PREFIX)-g++
LD := $(PREFIX)-ld
CPPFLAGS := -I/c/apps/SFML-1.6/include -mwindows
LDFLAGS := -L/c/apps/SFML-1.6/lib -lsfml-system -static-libstdc++ -static-libgcc
all: clock
clock: clock.cpp
$(CXX) -o $@ -I/c/apps/SFML-1.6/include $^ -L/c/apps/SFML-1.6/lib -static-libgcc -static-libstdc++ -lsfml-system

15
clock.cpp Normal file
View File

@ -0,0 +1,15 @@
#include <SFML/System.hpp>
#include <iostream>
int main()
{
sf::Clock Clock;
while (Clock.GetElapsedTime() < 5.f)
{
std::cout << Clock.GetElapsedTime() << std::endl;
sf::Sleep(0.5f);
}
return 0;
}