From be4c2206f6c3b2f225d3df12540690d51abbb71c Mon Sep 17 00:00:00 2001 From: zvon Date: Wed, 12 Feb 2020 11:49:48 +0100 Subject: [PATCH] Makefile: add new files, break up tv_rename_gui --- Makefile | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index a995afd..d4bb28d 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,9 @@ PREFIX ?= /usr/local/bin APPDIR ?= /usr/share/applications ICONDIR ?= /usr/share/icons/hicolor +GTKFLAGS = `pkg-config gtkmm-3.0 --cflags` +GTKLIBS = `pkg-config gtkmm-3.0 --libs` + .PHONY: default default: tv_rename @@ -64,15 +67,11 @@ main.o: main.cpp .PHONY: gui gui: tv_rename_gui -tv_rename_gui: gui.cpp mainwindow.cpp seasonwindow.cpp databasewindow.cpp\ - network.o functions_gui.o filesystem_u_gui.o tv_rename_gui.o\ - progress.cpp progresswindow.cpp - $(CXX) $(CFLAGS) -o tv_rename_gui gui.cpp mainwindow.cpp seasonwindow.cpp\ - databasewindow.cpp network.o functions_gui.o\ - filesystem_u_gui.o tv_rename_gui.o progress.cpp\ - progresswindow.cpp\ - `pkg-config gtkmm-3.0 --cflags --libs`\ - -lcurl -lsqlite3 -DGUI +tv_rename_gui: gui.o mainwindow.o seasonwindow.o databasewindow.o\ + searchwindow.o gtkfunctions.o network.o functions_gui.o\ + filesystem_u_gui.o tv_rename_gui.o progress_gui.o\ + progresswindow.o + $(CXX) $(CFLAGS) -o $@ $^ $(GTKFLAGS) $(GTKLIBS) -lcurl -lsqlite3 strip tv_rename_gui filesystem_u_gui.o: unix/filesystem.cpp @@ -84,6 +83,23 @@ functions_gui.o: functions.cpp tv_rename_gui.o: tv_rename.cpp $(CXX) $(CFLAGS) -c tv_rename.cpp -o tv_rename_gui.o -DGUI +gui.o: gui.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI +mainwindow.o: mainwindow.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI +seasonwindow.o: seasonwindow.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI +databasewindow.o: databasewindow.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI +searchwindow.o: searchwindow.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI +gtkfunctions.o: gtkfunctions.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI +progress_gui.o: progress.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI +progresswindow.o: progresswindow.cpp + $(CXX) $(CFLAGS) -o $@ -c $^ $(GTKFLAGS) -DGUI + .PHONY: windows windows: tv_rename.exe