2018-09-22 22:50:42 +00:00
|
|
|
CC ?= clang
|
|
|
|
CXX ?= clang++
|
2019-01-07 21:20:17 +00:00
|
|
|
CFLAGS ?= -O2 -Wall -Wextra -std=c++11
|
2019-01-23 21:45:38 +00:00
|
|
|
PREFIX ?= /usr/local/bin
|
2019-05-18 13:05:06 +00:00
|
|
|
APPDIR ?= /usr/share/applications
|
|
|
|
ICONDIR ?= /usr/share/icons/hicolor
|
2018-09-22 22:50:42 +00:00
|
|
|
|
2019-01-04 19:19:08 +00:00
|
|
|
.PHONY: default
|
2018-09-22 22:50:42 +00:00
|
|
|
default: tv_rename
|
|
|
|
|
2019-01-04 19:19:08 +00:00
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2019-02-04 16:39:48 +00:00
|
|
|
rm -f *.o tv_rename tv_rename_gui
|
2019-01-04 19:19:08 +00:00
|
|
|
|
2019-01-23 21:45:38 +00:00
|
|
|
.PHONY: install
|
|
|
|
install: tv_rename
|
|
|
|
install -d $(PREFIX)/
|
|
|
|
install -m 755 tv_rename $(PREFIX)/
|
|
|
|
|
|
|
|
.PHONY: install_gui
|
|
|
|
install_gui: gui
|
|
|
|
install -d $(PREFIX)/
|
|
|
|
install -m 755 tv_rename_gui $(PREFIX)/
|
2019-05-18 13:05:06 +00:00
|
|
|
install -d $(APPDIR)
|
|
|
|
install -m 755 tv_rename_gui.desktop $(APPDIR)/
|
|
|
|
install -d $(ICONDIR)
|
|
|
|
install -m 644 tv_rename.svg $(ICONDIR)/scalable/apps/
|
|
|
|
gtk-update-icon-cache -f $(ICONDIR)
|
|
|
|
|
|
|
|
.PHONY: uninstall
|
|
|
|
uninstall:
|
|
|
|
rm $(PREFIX)/tv_rename
|
|
|
|
|
|
|
|
.PHONY: uninstall_gui
|
|
|
|
uninstall_gui:
|
|
|
|
rm $(PREFIX)/tv_rename_gui
|
|
|
|
rm $(APPDIR)/tv_rename_gui.desktop
|
|
|
|
rm $(ICONDIR)/scalable/apps/tv_rename.svg
|
|
|
|
gtk-update-icon-cache -f $(ICONDIR)
|
2019-01-23 21:45:38 +00:00
|
|
|
|
2020-01-15 21:23:11 +00:00
|
|
|
tv_rename: functions.o filesystem.o network.o tv_rename.o progress.o main.cpp
|
2019-06-04 19:54:00 +00:00
|
|
|
$(CXX) $(CFLAGS) -o tv_rename main.cpp tv_rename.o functions.o\
|
2020-01-15 21:23:11 +00:00
|
|
|
filesystem.o network.o progress.o -lcurl -lsqlite3
|
2019-01-03 18:01:43 +00:00
|
|
|
|
2020-01-15 21:23:11 +00:00
|
|
|
filesystem.o: unix/filesystem.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c unix/filesystem.cpp -o filesystem.o
|
2018-09-22 22:50:42 +00:00
|
|
|
|
|
|
|
functions.o: functions.cpp
|
2019-01-03 19:16:28 +00:00
|
|
|
$(CXX) $(CFLAGS) -c functions.cpp
|
2018-09-22 22:50:42 +00:00
|
|
|
|
2020-01-15 21:23:11 +00:00
|
|
|
network.o: unix/network.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c unix/network.cpp
|
2019-01-19 12:40:10 +00:00
|
|
|
|
|
|
|
tv_rename.o: tv_rename.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c tv_rename.cpp
|
|
|
|
|
2019-06-04 19:54:00 +00:00
|
|
|
progress.o: progress.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c progress.cpp
|
|
|
|
|
2019-01-23 21:45:38 +00:00
|
|
|
.PHONY: gui
|
|
|
|
gui: tv_rename_gui
|
|
|
|
|
2019-07-12 21:10:40 +00:00
|
|
|
tv_rename_gui: gui.cpp mainwindow.cpp seasonwindow.cpp databasewindow.cpp network.o\
|
2019-06-04 19:54:00 +00:00
|
|
|
functions_gui.o filesystem_u_gui.o tv_rename_gui.o
|
2019-07-12 21:10:40 +00:00
|
|
|
$(CXX) $(CFLAGS) -o tv_rename_gui gui.cpp mainwindow.cpp seasonwindow.cpp databasewindow.cpp\
|
2019-06-04 19:54:00 +00:00
|
|
|
network.o functions_gui.o filesystem_u_gui.o\
|
|
|
|
tv_rename_gui.o `pkg-config gtkmm-3.0 --cflags --libs`\
|
2019-07-12 21:10:40 +00:00
|
|
|
-lcurl -lsqlite3 -DGUI
|
2019-01-23 19:46:03 +00:00
|
|
|
|
2019-04-01 18:18:47 +00:00
|
|
|
filesystem_u_gui.o: unix/filesystem.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c unix/filesystem.cpp -o filesystem_u_gui.o -DGUI
|
2019-01-23 19:46:03 +00:00
|
|
|
|
|
|
|
functions_gui.o: functions.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c functions.cpp -o functions_gui.o -DGUI
|
|
|
|
|
|
|
|
tv_rename_gui.o: tv_rename.cpp
|
|
|
|
$(CXX) $(CFLAGS) -c tv_rename.cpp -o tv_rename_gui.o -DGUI
|
|
|
|
|
2019-02-04 16:39:48 +00:00
|
|
|
|
|
|
|
.PHONY: windows
|
|
|
|
windows: tv_rename.exe
|
|
|
|
|
2020-01-15 21:23:11 +00:00
|
|
|
tv_rename.exe: tv_rename.cpp functions.cpp windows/filesystem.cpp windows/network.cpp\
|
2019-06-04 19:54:00 +00:00
|
|
|
progress.cpp sqlite3.c main.cpp
|
|
|
|
$(CXX) -MD -EHsc -Fe"tv_rename" tv_rename.cpp windows/filesystem.cpp\
|
2020-01-15 21:23:11 +00:00
|
|
|
functions.cpp windows/network.cpp progress.cpp sqlite3.c main.cpp\
|
2019-06-04 19:54:00 +00:00
|
|
|
-D_WIN32 -DUNICODE -link wininet.lib shlwapi.lib ole32.lib\
|
|
|
|
shell32.lib user32.lib
|
2019-02-04 16:39:48 +00:00
|
|
|
|
|
|
|
.PHONY: windows_gui
|
|
|
|
windows_gui: tv_rename_gui.exe
|
|
|
|
|
2019-06-04 19:54:00 +00:00
|
|
|
tv_rename_gui.exe: tv_rename_gui.res tv_rename_gui.cpp tv_rename.cpp\
|
2020-01-15 21:23:11 +00:00
|
|
|
windows/filesystem.cpp functions.cpp windows/network.cpp
|
2019-06-04 19:54:00 +00:00
|
|
|
$(CXX) -MD -EHsc -Fe"tv_rename_gui" tv_rename_gui.cpp tv_rename.cpp\
|
2020-01-15 21:23:11 +00:00
|
|
|
windows/filesystem.cpp functions.cpp windows/network.cpp -D_WIN32 -DUNICODE\
|
2019-06-04 19:54:00 +00:00
|
|
|
-DGUI -link wininet.lib shlwapi.lib ole32.lib shell32.lib gdi32.lib\
|
|
|
|
user32.lib tv_rename_gui.res
|
2019-02-04 16:39:48 +00:00
|
|
|
|
|
|
|
tv_rename_gui.res: tv_rename_gui.rc
|
|
|
|
rc tv_rename_gui.rc
|