22 lines
824 B
Makefile
22 lines
824 B
Makefile
CXX = g++
|
|
CXXFLAGS = -Wall -O3
|
|
SFMLFLAGS = -lsfml-system -lsfml-window -lsfml-graphics
|
|
|
|
# In case you installed SFML to a non-standard path, you'll need to tell the compiler where to find the SFML headers (.hpp files):
|
|
# g++ -c main.cpp -I<sfml-install-path>/include
|
|
|
|
# If SFML is not installed in a standard path, you need to tell the dynamic linker where to find the SFML libraries first by specifying LD_LIBRARY_PATH:
|
|
# export LD_LIBRARY_PATH=<sfml-install-path>/lib && ./sfml-app
|
|
|
|
quickhull: main.o Quickhull.h Point.h Line.h Triangle.h Display.o
|
|
# link with sfml libs; -lsfml-network -lsfml-audio currently not needed
|
|
$(CXX) $(CXXFLAGS) -o quickhull main.o Quickhull.h Point.h Line.h Triangle.h Display.o $(SFMLFLAGS)
|
|
|
|
main.o: main.cpp
|
|
$(CXX) $(CXXFLAGS) -c main.cpp
|
|
|
|
Display.o: Display.h
|
|
|
|
clean:
|
|
-rm *.o quickhull
|