27 lines
777 B
Makefile
27 lines
777 B
Makefile
#CXXFLAGS = -O2 -g -fmessage-length=0 -Ilib/soil2 -Ilib/imgui -Ilib/imgui_sdl -I/usr/include
|
|
CXXFLAGS = -O2 -g -fmessage-length=0 -Ilib/soil2 -Ilib/imgui -Ilib/imgui_sdl -s USE_SDL=2 -Wall -std=c++14
|
|
|
|
LDFLAGS = -s USE_SDL=2 -s ALLOW_MEMORY_GROWTH=1 -O2 --preload-file data --separate-asm --js-library preboot.js
|
|
|
|
SITE_CXX_OBJ = $(patsubst %.cpp,%.o,$(wildcard src/*.cpp)) $(patsubst %.cpp,%.o,$(wildcard src/*/*.cpp))
|
|
LIBS_CXX_OBJ = $(patsubst %.cpp,%.o,$(wildcard lib/*/*.cpp))
|
|
LIBS_C_OBJ = $(patsubst %.c,%.o,$(wildcard lib/*/*.c))
|
|
|
|
OBJS = $(LIBS_C_OBJ) $(LIBS_CXX_OBJ) $(SITE_CXX_OBJ)
|
|
|
|
LIBS = -lGL -lGLU
|
|
# -lSDL2
|
|
|
|
TARGET = ff-site.js
|
|
|
|
CC = emcc
|
|
CXX = emcc
|
|
|
|
$(TARGET): $(OBJS)
|
|
$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LDFLAGS)
|
|
|
|
all: $(TARGET)
|
|
|
|
clean:
|
|
rm -f $(OBJS) $(TARGET)
|