-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
160 lines (137 loc) · 5.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
## Genio - The Haiku IDE Makefile ##############################################
COMPILER_FLAGS = -Werror -std=c++20 -gdwarf-3
WARNINGS = ALL
TARGET_DIR := app
TYPE := APP
APP_MIME_SIG := "application/x-vnd.Genio"
debug ?= 0
ifneq ($(debug), 0)
DEBUGGER := TRUE
endif
ifeq ($(strip $(DEBUGGER)), TRUE)
NAME := Genio_debug
COMPILER_FLAGS += -DGDEBUG
else
NAME := Genio
endif
arch := $(shell getarch)
platform := $(shell uname -p)
SRCS := src/GenioApp.cpp
SRCS += src/GenioScripting.cpp
SRCS += src/alert/GTextAlert.cpp
SRCS += src/config/ConfigManager.cpp
SRCS += src/config/ConfigWindow.cpp
SRCS += src/config/GMessage.cpp
SRCS += src/extensions/ExtensionManager.cpp
SRCS += src/extensions/ToolsMenu.cpp
SRCS += src/helpers/ActionManager.cpp
SRCS += src/helpers/FSUtils.cpp
SRCS += src/helpers/Languages.cpp
SRCS += src/helpers/Logger.cpp
SRCS += src/helpers/MakeFileHandler.cpp
SRCS += src/helpers/GSettings.cpp
SRCS += src/helpers/GrepThread.cpp
SRCS += src/helpers/PipeImage.cpp
SRCS += src/helpers/ResourceImport.cpp
SRCS += src/helpers/StatusView.cpp
SRCS += src/helpers/Styler.cpp
SRCS += src/helpers/TextUtils.cpp
SRCS += src/helpers/Utils.cpp
SRCS += src/helpers/console_io/ConsoleIOView.cpp
SRCS += src/helpers/console_io/ConsoleIOThread.cpp
SRCS += src/helpers/console_io/GenericThread.cpp
SRCS += src/helpers/console_io/WordTextView.cpp
SRCS += src/helpers/mterm/KeyTextViewScintilla.cpp
SRCS += src/helpers/mterm/MTerm.cpp
SRCS += src/helpers/mterm/MTermView.cpp
SRCS += src/helpers/tabview/CircleColorMenuItem.cpp
SRCS += src/helpers/tabview/TabContainerView.cpp
SRCS += src/helpers/tabview/TabManager.cpp
SRCS += src/helpers/tabview/TabView.cpp
SRCS += src/lsp-client/CallTipContext.cpp
SRCS += src/lsp-client/LSPEditorWrapper.cpp
SRCS += src/lsp-client/LSPProjectWrapper.cpp
SRCS += src/lsp-client/LSPPipeClient.cpp
SRCS += src/lsp-client/LSPReaderThread.cpp
SRCS += src/lsp-client/LSPServersManager.cpp
SRCS += src/lsp-client/Transport.cpp
SRCS += src/project/ProjectFolder.cpp
SRCS += src/project/ProjectItem.cpp
SRCS += src/git/BranchItem.cpp
SRCS += src/git/GitAlert.cpp
SRCS += src/git/GitCredentialsWindow.cpp
SRCS += src/git/GitRepository.cpp
SRCS += src/git/RemoteProjectWindow.cpp
SRCS += src/git/RepositoryView.cpp
SRCS += src/git/SourceControlPanel.cpp
SRCS += src/git/SwitchBranchMenu.cpp
SRCS += src/ui/EditorStatusView.cpp
SRCS += src/ui/Editor.cpp
SRCS += src/ui/EditorContextMenu.cpp
SRCS += src/ui/EditorTabManager.cpp
SRCS += src/ui/FunctionsOutlineView.cpp
SRCS += src/ui/GenioWindow.cpp
SRCS += src/ui/GenioSecondaryWindow.cpp
SRCS += src/ui/GlobalStatusView.cpp
SRCS += src/ui/GoToLineWindow.cpp
SRCS += src/ui/IconCache.cpp
SRCS += src/ui/ProblemsPanel.cpp
SRCS += src/ui/ProjectBrowser.cpp
SRCS += src/ui/QuitAlert.cpp
SRCS += src/ui/SearchResultPanel.cpp
SRCS += src/ui/SearchResultTab.cpp
SRCS += src/ui/StyledItem.cpp
SRCS += src/ui/ToolBar.cpp
SRCS += src/templates/IconMenuItem.cpp
SRCS += src/templates/TemplateManager.cpp
SRCS += src/templates/TemplatesMenu.cpp
RDEFS := Genio.rdef Spinner.rdef
LIBS = be shared translation localestub $(STDCPPLIBS)
LIBS += columnlistview tracker
LIBS += git2
LIBS += src/scintilla/bin/libscintilla.a
LIBS += yaml-cpp
LIBS += editorconfig
SYSTEM_INCLUDE_PATHS = $(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/interface)
SYSTEM_INCLUDE_PATHS += $(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/shared)
SYSTEM_INCLUDE_PATHS += $(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/storage)
SYSTEM_INCLUDE_PATHS += $(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/support)
SYSTEM_INCLUDE_PATHS += $(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/tracker)
SYSTEM_INCLUDE_PATHS += $(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/locale)
SYSTEM_INCLUDE_PATHS += $(shell findpaths -a $(platform) -e B_FIND_PATH_HEADERS_DIRECTORY lexilla)
SYSTEM_INCLUDE_PATHS += src/scintilla/haiku
SYSTEM_INCLUDE_PATHS += src/scintilla/include
## clang build flag ############################################################
BUILD_WITH_CLANG ?= 0
################################################################################
ifeq ($(BUILD_WITH_CLANG), 1)
# clang build
CC := clang
CXX := clang++
LD := clang++
endif
LOCALES := ca de en_AU en_GB en es_419 es fr fur it nb tr
## Include the Makefile-Engine
include $(BUILDHOME)/etc/makefile-engine
# Rules to compile the resource definition files.
# Taken from makefile_engine and removed CFLAGS because
# clang doesn't like if we pass -std=c++20 to it
$(OBJ_DIR)/%.rsrc : %.rdef
cat $< | $(CC) -E $(INCLUDES) - | grep -av '^#' | $(RESCOMP) -I $(dir $<) -o "$@" -
$(OBJ_DIR)/%.rsrc : %.RDEF
cat $< | $(CC) -E $(INCLUDES) - | grep -av '^#' | $(RESCOMP) -I $(dir $<) -o "$@" -
deps:
$(MAKE) -C src/scintilla/haiku
.PHONY: clean deps
cleanall: clean
$(MAKE) clean -C src/scintilla/haiku
rm -f txt2header
rm -f Changelog.h
$(TARGET): deps
GenioApp.cpp : Changelog.h
Changelog.h : Changelog.txt txt2header
txt2header < Changelog.txt > Changelog.h
txt2header :
$(CXX) txt2header.cpp -o txt2header
compiledb:
compiledb make -Bnwk