36 lines
1.0 KiB
Makefile
36 lines
1.0 KiB
Makefile
EXE = microsa
|
|
SOURCES = main.cpp
|
|
SOURCES += $(IMGUI_DIR)/imgui.cpp $(IMGUI_DIR)/imgui_demo.cpp $(IMGUI_DIR)/imgui_draw.cpp $(IMGUI_DIR)/imgui_tables.cpp $(IMGUI_DIR)/imgui_widgets.cpp
|
|
SOURCES += $(IMGUI_DIR)/backends/imgui_impl_glfw.cpp $(IMGUI_DIR)/backends/imgui_impl_opengl3.cpp
|
|
OBJS = $(addsuffix .o, $(basename $(notdir $(SOURCES))))
|
|
|
|
CXXFLAGS = -std=c++14 -I$(IMGUI_DIR) -I$(IMGUI_DIR)/backends -I$(TINYALSA_DIR)/include
|
|
CXXFLAGS += -g -Wall -Wformat -O2
|
|
LIBS = -L$(TINYALSA_DIR)/lib
|
|
|
|
LIBS += -lGL `pkg-config --static --libs glfw3` -ltinyalsa
|
|
|
|
CXXFLAGS += `pkg-config --cflags glfw3`
|
|
CFLAGS = $(CXXFLAGS)
|
|
|
|
##---------------------------------------------------------------------
|
|
## BUILD RULES
|
|
##---------------------------------------------------------------------
|
|
|
|
%.o:%.cpp
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
%.o:$(IMGUI_DIR)/%.cpp
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
%.o:$(IMGUI_DIR)/backends/%.cpp
|
|
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
|
|
all: $(EXE)
|
|
|
|
$(EXE): $(OBJS)
|
|
$(CXX) -o $@ $^ $(CXXFLAGS) $(LIBS)
|
|
|
|
clean:
|
|
rm -f $(EXE) $(OBJS)
|