CC ?= clang CXX ?= clang++ CFLAGS ?= -O2 -Wall -Wextra -std=c++11 PREFIX ?= /usr/local/bin .PHONY: default default: tv_rename .PHONY: clean clean: rm -f *.o tv_rename tv_rename_gui .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)/ tv_rename: functions.o filesystem.o network.o tv_rename.o main.cpp $(CXX) $(CFLAGS) -o tv_rename main.cpp tv_rename.o functions.o filesystem.o network.o -lcurl filesystem.o: filesystem.cpp $(CXX) $(CFLAGS) -c filesystem.cpp functions.o: functions.cpp $(CXX) $(CFLAGS) -c functions.cpp network.o: network.cpp $(CXX) $(CFLAGS) -c network.cpp tv_rename.o: tv_rename.cpp $(CXX) $(CFLAGS) -c tv_rename.cpp .PHONY: gui gui: tv_rename_gui tv_rename_gui: gui.cpp mainwindow.cpp seasonwindow.cpp network.o functions_gui.o filesystem_gui.o tv_rename_gui.o $(CXX) $(CFLAGS) -o tv_rename_gui gui.cpp mainwindow.cpp seasonwindow.cpp network.o functions_gui.o filesystem_gui.o tv_rename_gui.o `pkg-config gtkmm-3.0 --cflags --libs` -lcurl -DGUI filesystem_gui.o: filesystem.cpp $(CXX) $(CFLAGS) -c filesystem.cpp -o filesystem_gui.o -DGUI 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 .PHONY: windows windows: tv_rename.exe tv_rename.exe: tv_rename.cpp filesystem.cpp functions.cpp network.cpp main.cpp $(CXX) -MD -EHsc -Fe"tv_rename" tv_rename.cpp filesystem.cpp functions.cpp network.cpp main.cpp -D_WIN32 -DUNICODE -link wininet.lib shlwapi.lib .PHONY: windows_gui windows_gui: tv_rename_gui.exe tv_rename_gui.exe: tv_rename_gui.res tv_rename_gui.cpp tv_rename.cpp filesystem.cpp functions.cpp network.cpp $(CXX) -MD -EHsc -Fe"tv_rename_gui" tv_rename_gui.cpp tv_rename.cpp filesystem.cpp functions.cpp network.cpp -D_WIN32 -DUNICODE -DGUI -link wininet.lib shlwapi.lib ole32.lib shell32.lib gdi32.lib user32.lib tv_rename_gui.res tv_rename_gui.res: tv_rename_gui.rc rc tv_rename_gui.rc