1
0
Files
xplayer/Makefile.mingw
2024-02-04 13:23:09 +08:00

27 lines
620 B
Makefile

TARGET = xPlayer
BUILD := build
SRCS := src imgui
VPATH := $(foreach dir,$(SRCS),$(CURDIR)/$(dir))
CFILES := $(foreach dir,$(SRCS),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SRCS),$(notdir $(wildcard $(dir)/*.cpp)))
OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o)
INCLUDES := -I$(CURDIR)/imgui
CFLAGS := -O2 -Wall $(INCLUDES) `pkg-config --cflags glfw3`
CXXFLAGS := $(CFLAGS) -std=c++17
LDFLAGS := `pkg-config mpv glfw3 --libs` -lgdi32
all: $(TARGET)
$(TARGET): $(OFILES)
$(CXX) -o $@ $^ $(LDFLAGS)
run: all
@./$(TARGET)
.PHONY: clean
clean:
$(RM) $(OFILES) $(TARGET)