-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.own
61 lines (48 loc) · 1.55 KB
/
Makefile.own
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
51
52
53
54
55
56
57
58
59
60
61
# make script for the ffmpeg-coder project to build the project from source code
# By Abir-Tx
# Use make -f Makefile.own winbuild to use this file
# variables
CC := g++
SRCDIR := src
BUILDDIR := bin
CFLAG := -v
INC := -I include/ffmpeg-coder -I lib
APPNAME := ffmpeg-coder
.PHONY: all
all: build run
.PHONY: build
build:
${CC} ${CFLAG} src/ffmpeg-coder.cpp src/frontend_funcs.cpp src/main.cpp src/quickConvertSettings.cpp src/utils.cpp ${INC} -o ${BUILDDIR}/${APPNAME}.o
.PHONY: clean
clean:
echo Deleting the binaries....
rm ${BUILDDIR}/*
rm ffmpeg-coder/usr/bin/ffmpeg-coder
.PHONY: run
run:
echo Running the built program....
./${BUILDDIR}/${APPNAME}.o
.PHONY: dir
dir:
echo Creating directories.....
mkdir bin
mkdir build
.PHONY: debpackage
debpackage: build
echo Creating the debian package of ffmpeg-coder
mv bin/ffmpeg-coder.o bin/ffmpeg-coder
cp bin/ffmpeg-coder ffmpeg-coder/usr/bin/
fakeroot dpkg-deb -v --build ffmpeg-coder bin
echo The deb package has been created in the bin folder
# Windows Configs for make
.PHONY: winbuild
winbuild:
${CC} ${CFLAG} src\ffmpeg-coder.cpp src\frontend_funcs.cpp src\main.cpp src\quickConvertSettings.cpp src\utils.cpp ${INC} -o ${BUILDDIR}/${APPNAME}.exe
.PHONY: winrun
winrun:
echo Running the built program....
./${BUILDDIR}/${APPNAME}.exe
.PHONY: winProductionBuild
winProductionBuild:
echo Building release version.....
${CC} ${CFLAG} src\ffmpeg-coder.cpp src\frontend_funcs.cpp src\main.cpp src\quickConvertSettings.cpp src\utils.cpp ${INC} -static-libgcc -static-libstdc++ -o ${BUILDDIR}/${APPNAME}.exe