File: Makefile.minorGems_targets

package info (click to toggle)
primrose 6%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 5,300 kB
  • ctags: 3,385
  • sloc: cpp: 27,318; php: 765; ansic: 636; objc: 272; sh: 136; makefile: 95; perl: 67
file content (208 lines) | stat: -rw-r--r-- 6,278 bytes parent folder | download | duplicates (5)
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#
# Modification History
#
# 2004-November-19    Jason Rohrer
# Copied from Primrose source.
#
# 2004-November-21    Jason Rohrer
# Added multi-source downloader.
#
# 2004-December-13    Jason Rohrer
# Added socket manager.
#
# 2005-February-4    Jason Rohrer
# Added ScreenGL.
#
# 2005-February-21    Jason Rohrer
# Added SingleTextureGL.
#
# 2006-April-24    Jason Rohrer
# Added conditional compilation of files that depend on OpenGL/GLUT.
#
# 2006-November-21    Jason Rohrer
# Added PNGImageConverter.
#
# 2007-April-23    Jason Rohrer
# Changed to make compilation of all objects individually conditional using
# NEEDED_MINOR_GEMS_OBJECTS variable.
#



##
# The common portion of Makefiles for all targets that use minorGems,
# supplying target dependencies for minorGems targets.
#
#
# Should not be made manually---used by project-specific configure scripts to 
# build Makefiles.
##


# Makefile Usage (these must be in your Makefile in the following order):
# -- Include Makefile.minorGems
# -- List the desired minorGems objects in NEEDED_MINOR_GEMS_OBJECTS
#    Example:
#      NEEDED_MINOR_GEMS_OBJECTS = \
#       ${SOCKET_O} \
#       ${SOCKET_CLIENT_O} \
#       ${SOCKET_SERVER_O} \
#       ${HOST_ADDRESS_O}
# -- Define your project-specific targets and rules
# -- Include this file





##
# Dependencies for minorGems objects.
##


# first, take the object list and turn it into a source list
MINOR_GEMS_SOURCE = ${NEEDED_MINOR_GEMS_OBJECTS:.o=.cpp}


# Here is what the old, manual list looked like, for reference:
#
# MINOR_GEMS_SOURCE = \
#  ${HOST_ADDRESS_CPP} \
#  ${SOCKET_CPP} \
#  ${SOCKET_SERVER_CPP} \
#  ${SOCKET_CLIENT_CPP} \
#  ${SOCKET_UDP_CPP} \
#  ${NETWORK_FUNCTION_LOCKS_CPP} \
#  ${SOCKET_MANAGER_CPP} \
#  ${PATH_CPP} \
#  ${DIRECTORY_CPP} \
#  ${TYPE_IO_CPP} \
#  ${TIME_CPP} \
#  ${THREAD_CPP} \
#  ${MUTEX_LOCK_CPP} \
#  ${BINARY_SEMAPHORE_CPP} \
#  ${APP_LOG_CPP} \
#  ${PRINT_LOG_CPP} \
#  ${FILE_LOG_CPP} \
#  ${LOG_CPP} \
#  ${PRINT_UTILS_CPP} \
#  ${WEB_CLIENT_CPP} \
#  ${URL_UTILS_CPP} \
#  ${MIME_TYPER_CPP} \
#  ${STRING_BUFFER_OUTPUT_STREAM_CPP} \
#  ${XML_UTILS_CPP} \
#  ${HTML_UTILS_CPP} \
#  ${SETTINGS_MANAGER_CPP} \
#  ${TRANSLATION_MANAGER_CPP} \
#  ${STRING_UTILS_CPP} \
#  ${SHA1_CPP} \
#  ${MEMORY_TRACK_CPP} \
#  ${DEBUG_MEMORY_CPP} \
#  ${HOST_CATCHER_CPP} \
#  ${OUTBOUND_CHANNEL_CPP} \
#  ${DUPLICATE_MESSAGE_DETECTOR_CPP} \
#  ${PROTOCOL_UTILS_CPP} \
#  ${MESSAGE_PER_SECOND_LIMITER_CPP} \
#  ${MULTI_SOURCE_DOWNLOADER_CPP} \
#  ${ENCODING_UTILS_CPP} \
#  ${WEB_SERVER_CPP} \
#  ${REQUEST_HANDLING_THREAD_CPP} \
#  ${THREAD_HANDLING_THREAD_CPP} \
#  ${CONNECTION_PERMISSION_HANDLER_CPP} \
#  ${STOP_SIGNAL_THREAD_CPP} \
#  ${FINISHED_SIGNAL_THREAD_CPP} \
#  ${FINISHED_SIGNAL_THREAD_MANAGER_CPP} \
#  ${OPEN_GL_CPP_FILES} \
#  ${PNG_IMAGE_CONVERTER_CPP}



# next, generate dependencies using g++


# sed command for fixing up the dependencies generated by g++
# g++ (pre-3.0) leaves the path off of the .o target
# look for a .o file at the beginning of a line (in other words, one
# without a path), and replace it with the full-path version.
# This should be compatible with g++ 3.0, since we only replace .o names
# that occur at the beginning of a line (using the "^" modifier)

# Split into two parts because sed (on certain platforms) cannot process
# a string of commands as one long argument

MINOR_GEMS_SED_FIX_COMMAND_A = sed ' \
s/^HostAddress.*\.o/$${HOST_ADDRESS_O}/; \
s/^SocketServer.*\.o/$${SOCKET_SERVER_O}/; \
s/^SocketClient.*\.o/$${SOCKET_CLIENT_O}/; \
s/^SocketUDP.*\.o/$${SOCKET_UDP_O}/; \
s/^SocketManager.*\.o/$${SOCKET_MANAGER_O}/; \
s/^Socket.*\.o/$${SOCKET_O}/; \
s/^NetworkFunctionLocks.*\.o/$${NETWORK_FUNCTION_LOCKS_O}/; \
s/^LookupThread.*\.o/$${LOOKUP_THREAD_O}/; \
s/^Path.*\.o/$${PATH_O}/; \
s/^Directory.*\.o/$${DIRECTORY_O}/; \
s/^TypeIO.*\.o/$${TYPE_IO_O}/; \
s/^Time.*\.o/$${TIME_O}/; \
s/^MutexLock.*\.o/$${MUTEX_LOCK_O}/; \
s/^BinarySemaphore.*\.o/$${BINARY_SEMAPHORE_O}/; \
s/^AppLog.*\.o/$${APP_LOG_O}/; \
s/^PrintLog.*\.o/$${PRINT_LOG_O}/; \
s/^FileLog.*\.o/$${FILE_LOG_O}/; \
s/^Log.*\.o/$${LOG_O}/; \
s/^PrintUtils.*\.o/$${PRINT_UTILS_O}/; \
s/^WebClient.*\.o/$${WEB_CLIENT_O}/; \
s/^URLUtils.*\.o/$${URL_UTILS_O}/; \
s/^MimeTyper.*\.o/$${MIME_TYPER_O}/; \
s/^StringBufferOutputStream.*\.o/$${STRING_BUFFER_OUTPUT_STREAM_O}/; \
s/^XMLUtils.*\.o/$${XML_UTILS_O}/; \
s/^HTMLUtils.*\.o/$${HTML_UTILS_O}/; \
s/^SettingsManager.*\.o/$${SETTINGS_MANAGER_O}/; \
s/^TranslationManager.*\.o/$${TRANSLATION_MANAGER_O}/; \
s/^stringUtils.*\.o/$${STRING_UTILS_O}/; \
s/^sha1.*\.o/$${SHA1_O}/; \
'

MINOR_GEMS_SED_FIX_COMMAND_B = sed ' \
s/^MemoryTrack.*\.o/$${MEMORY_TRACK_O}/; \
s/^DebugMemory.*\.o/$${DEBUG_MEMORY_O}/; \
s/^HostCatcher.*\.o/$${HOST_CATCHER_O}/; \
s/^OutboundChannel.*\.o/$${OUTBOUND_CHANNEL_O}/; \
s/^DuplicateMessageDetector.*\.o/$${DUPLICATE_MESSAGE_DETECTOR_O}/; \
s/^protocolUtils.*\.o/$${PROTOCOL_UTILS_O}/; \
s/^MessagePerSecondLimiter.*\.o/$${MESSAGE_PER_SECOND_LIMITER_O}/; \
s/^MultiSourceDownloader.*\.o/$${MULTI_SOURCE_DOWNLOADER_O}/; \
s/^encodingUtils.*\.o/$${ENCODING_UTILS_O}/; \
s/^WebServer.*\.o/$${WEB_SERVER_O }/; \
s/^RequestHandlingThread.*\.o/$${REQUEST_HANDLING_THREAD_O}/; \
s/^ThreadHandlingThread.*\.o/$${THREAD_HANDLING_THREAD_O}/; \
s/^Thread.*\.o/$${THREAD_O}/; \
s/^ConnectionPermissionHandler.*\.o/$${CONNECTION_PERMISSION_HANDLER_O}/; \
s/^StopSignalThread.*\.o/$${STOP_SIGNAL_THREAD_O}/; \
s/^FinishedSignalThreadManager.*\.o/$${FINISHED_SIGNAL_THREAD_MANAGER_O}/; \
s/^FinishedSignalThread.*\.o/$${FINISHED_SIGNAL_THREAD_O}/; \
s/^ScreenGL.*\.o/$${SCREEN_GL_O}/; \
s/^ScreenGLSDL.*\.o/$${SCREEN_GL_SDL_O}/; \
s/^SingleTextureGL.*\.o/$${SINGLE_TEXTURE_GL_O}/; \
s/^PNGImageConverter.*\.o/$${PNG_IMAGE_CONVERTER_O}/; \
'



MINOR_GEMS_DEPENDENCY_FILE = Makefile.minorGems_dependencies


# build the dependency file 

${MINOR_GEMS_DEPENDENCY_FILE}: ${MINOR_GEMS_SOURCE}
	rm -f ${MINOR_GEMS_DEPENDENCY_FILE}
	${COMPILE} -I${ROOT_PATH} -MM ${MINOR_GEMS_SOURCE} >> ${MINOR_GEMS_DEPENDENCY_FILE}.temp
	cat ${MINOR_GEMS_DEPENDENCY_FILE}.temp | ${MINOR_GEMS_SED_FIX_COMMAND_A} | ${MINOR_GEMS_SED_FIX_COMMAND_B} >> ${MINOR_GEMS_DEPENDENCY_FILE}
	rm -f ${MINOR_GEMS_DEPENDENCY_FILE}.temp

include ${MINOR_GEMS_DEPENDENCY_FILE}