From 85d459a3f0dddc7a08de13c73e7b0fd7d94b6972 Mon Sep 17 00:00:00 2001 From: zvon Date: Wed, 23 Jan 2019 22:45:38 +0100 Subject: [PATCH] Add 'install' and 'install_gui' targets --- Makefile | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2b5cd0a..79de7de 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ CC ?= clang CXX ?= clang++ CFLAGS ?= -O2 -Wall -Wextra -std=c++11 +PREFIX ?= /usr/local/bin .PHONY: default default: tv_rename @@ -9,6 +10,16 @@ default: tv_rename clean: rm -f *.o tv_rename +.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 @@ -24,7 +35,10 @@ network.o: network.cpp tv_rename.o: tv_rename.cpp $(CXX) $(CFLAGS) -c tv_rename.cpp -gui: gui.cpp mainwindow.cpp seasonwindow.cpp network.o functions_gui.o filesystem_gui.o tv_rename_gui.o +.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