17 lines
511 B
Makefile
17 lines
511 B
Makefile
|
SOURCES = cpp/opengl/render_context_glx.cpp cpp/opengl/render_opengles.cpp cpp/math.cpp cpp/render.cpp
|
||
|
OUTPUTFILE = engine.so
|
||
|
|
||
|
CXXFLAGS = -fpic -std=c++20 -Wall -Werror -O2 -flto -fomit-frame-pointer -ffast-math -funroll-loops -fno-rtti -fno-exceptions
|
||
|
|
||
|
.PHONY: all
|
||
|
all: clean $(OUTPUTFILE)
|
||
|
find . -name "*.o" -type f -delete
|
||
|
|
||
|
.PHONY: clean
|
||
|
clean:
|
||
|
rm -f $(OUTPUTFILE)
|
||
|
find . -name "*.o" -type f -delete
|
||
|
|
||
|
$(OUTPUTFILE): $(subst .cpp,.o,$(SOURCES))
|
||
|
$(CXX) -shared $(CXXFLAGS) -s -o $@ $^ -lGLESv2 -lGLX -lX11
|