Makefile: windows - compile separate object files
This commit is contained in:
parent
991a21af4e
commit
013d98e941
67
Makefile
67
Makefile
@ -106,25 +106,68 @@ progresswindow.o: gtk/progresswindow.cpp
|
|||||||
.PHONY: windows
|
.PHONY: windows
|
||||||
windows: tv_rename.exe
|
windows: tv_rename.exe
|
||||||
|
|
||||||
tv_rename.exe: tv_rename.cpp functions.cpp windows/filesystem.cpp\
|
WINDOWS_CLI_OBJECTS = tv_rename_cli.obj functions_cli.obj filesystem_cli.obj\
|
||||||
windows/network.cpp progress.cpp sqlite3.c main.cpp tv_rename_stringtable.res
|
network_cli.obj progress_cli.obj sqlite3.obj main.obj
|
||||||
$(CXX) -MD -EHsc -Fe"tv_rename" tv_rename.cpp windows/filesystem.cpp\
|
|
||||||
functions.cpp windows/network.cpp progress.cpp sqlite3.c main.cpp\
|
sqlite3.obj: sqlite3.c
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -D_WIN32 -DUNICODE -c
|
||||||
|
tv_rename_cli.obj: tv_rename.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -D_WIN32 -DUNICODE -c
|
||||||
|
functions_cli.obj: functions.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -D_WIN32 -DUNICODE -c
|
||||||
|
filesystem_cli.obj: windows/filesystem.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -D_WIN32 -DUNICODE -c
|
||||||
|
network_cli.obj: windows/network.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -D_WIN32 -DUNICODE -c
|
||||||
|
progress_cli.obj: progress.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -D_WIN32 -DUNICODE -c
|
||||||
|
main.obj: main.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -D_WIN32 -DUNICODE -c
|
||||||
|
|
||||||
|
tv_rename.exe: $(WINDOWS_CLI_OBJECTS) tv_rename_stringtable.res
|
||||||
|
$(CXX) -MD -EHsc -Fe"tv_rename" $(WINDOWS_CLI_OBJECTS)\
|
||||||
-D_WIN32 -DUNICODE -link wininet.lib shlwapi.lib ole32.lib\
|
-D_WIN32 -DUNICODE -link wininet.lib shlwapi.lib ole32.lib\
|
||||||
shell32.lib user32.lib tv_rename_stringtable.res
|
shell32.lib user32.lib tv_rename_stringtable.res
|
||||||
|
|
||||||
.PHONY: windows_gui
|
.PHONY: windows_gui
|
||||||
windows_gui: tv_rename_gui.exe
|
windows_gui: tv_rename_gui.exe
|
||||||
|
|
||||||
WINDOWS_GUI_CPP = windows/gui.cpp windows/mainwindow.cpp\
|
WINDOWS_GUI_OBJECTS = gui.obj mainwindow.obj\
|
||||||
windows/gui_functions.cpp tv_rename.cpp\
|
gui_functions.obj tv_rename.obj\
|
||||||
windows/filesystem.cpp functions.cpp windows/network.cpp\
|
filesystem.obj functions.obj network.obj\
|
||||||
progress.cpp sqlite3.c windows/patternwindow.cpp\
|
progress.obj sqlite3.obj patternwindow.obj\
|
||||||
windows/progresswindow.cpp windows/seasonwindow.cpp\
|
progresswindow.obj seasonwindow.obj\
|
||||||
windows/databasewindow.cpp windows/searchwindow.cpp
|
databasewindow.obj searchwindow.obj
|
||||||
|
|
||||||
tv_rename_gui.exe: $(WINDOWS_GUI_CPP) tv_rename.res tv_rename_stringtable.res
|
gui.obj: windows/gui.cpp
|
||||||
$(CXX) -MD -EHsc -Fe"tv_rename_gui" $(WINDOWS_GUI_CPP) -DGUI -D_WIN32 -DUNICODE\
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
mainwindow.obj: windows/mainwindow.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
gui_functions.obj: windows/gui_functions.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
filesystem.obj: windows/filesystem.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
network.obj: windows/network.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
patternwindow.obj: windows/patternwindow.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
progresswindow.obj: windows/progresswindow.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
seasonwindow.obj: windows/seasonwindow.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
databasewindow.obj: windows/databasewindow.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
searchwindow.obj: windows/searchwindow.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
tv_rename.obj: tv_rename.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
functions.obj: functions.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
progress.obj: progress.cpp
|
||||||
|
$(CXX) -MD -EHsc -Fo"$@" $^ -DGUI -D_WIN32 -DUNICODE -c
|
||||||
|
|
||||||
|
tv_rename_gui.exe: $(WINDOWS_GUI_OBJECTS) tv_rename.res tv_rename_stringtable.res
|
||||||
|
$(CXX) -MD -EHsc -Fe"tv_rename_gui" $(WINDOWS_GUI_OBJECTS) -DGUI -D_WIN32 -DUNICODE\
|
||||||
-link wininet.lib shlwapi.lib ole32.lib\
|
-link wininet.lib shlwapi.lib ole32.lib\
|
||||||
shell32.lib user32.lib gdi32.lib comctl32.lib tv_rename.res tv_rename_stringtable.res
|
shell32.lib user32.lib gdi32.lib comctl32.lib tv_rename.res tv_rename_stringtable.res
|
||||||
mt -manifest tv_rename_gui.exe.manifest -outputresource:tv_rename_gui.exe
|
mt -manifest tv_rename_gui.exe.manifest -outputresource:tv_rename_gui.exe
|
||||||
|
2
main.cpp
2
main.cpp
@ -4,10 +4,10 @@
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
#include "resources_windows.h"
|
#include "resources_windows.h"
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
using char_t = wchar_t;
|
using char_t = wchar_t;
|
||||||
using string = std::wstring;
|
using string = std::wstring;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <windows.h>
|
||||||
#include "gui_functions.hpp"
|
#include "gui_functions.hpp"
|
||||||
#include "mainwindow.hpp"
|
#include "mainwindow.hpp"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "gui_functions.hpp"
|
|
||||||
#include "../functions.hpp"
|
#include "../functions.hpp"
|
||||||
#include "../resources_windows.h"
|
#include "../resources_windows.h"
|
||||||
|
#include "gui_functions.hpp"
|
||||||
#include "databasewindow.hpp"
|
#include "databasewindow.hpp"
|
||||||
#include "mainwindow.hpp"
|
#include "mainwindow.hpp"
|
||||||
#include "patternwindow.hpp"
|
#include "patternwindow.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user