-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (34 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
50 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
OBJS = ./src/*.cpp
CC=g++
OPTIMIZATION= #-O2
NANA_FLAGS=-lgdi32 -lcomdlg32 -ljpeg -lpng
FFMPEG_FLAGS=-lavformat -lavcodec -lavutil
LIBS= -lmingw32 -lSDL2main -lSDL2 -lSDL2_Image $(NANA_FLAGS) $(FFMPEG_FLAGS)
IDIR = ./src/headers
CFLAGS= -I$(IDIR) $(LIBS) $(EXTRA_LIBS)
DEPS = $(wildcard $(IDIR)/*.hpp)
IDIR = ./src/headers
_DEPS = star.hpp ui.hpp videoplayer.hpp
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
ODIR = ./obj
_OBJ = main.o star.o ui.o videoplayer.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
all: starBG
$(ODIR)/%.o: ./src/%.cpp $(DEPS)
$(CC) -c $(OPTIMIZATION) -o $@ $< -I./src/headers
starBG: $(OBJ)
$(CC) -O3 -o ./bin/$@ $^ $(CFLAGS)
prepare:
mkdir -p bin/
mkdir -p obj/
run: starBG
./bin/starBG
clean:
rm -f obj/*
rm -f bin/starBG.exe
install:
pacman -S --needed --noconfirm mingw-w64-x86_64-toolchain
pacman -S --needed --noconfirm mingw-w64-x86_64-SDL2
pacman -S --needed --noconfirm mingw-w64-x86_64-SDL2_image
pacman -S --needed --noconfirm mingw-w64-x86_64-ffmpeg
.PHONY: install clean prepare