Skip to content

Commit

Permalink
build(nmake): fix syntax for nmake
Browse files Browse the repository at this point in the history
`nmake` not as flexible as `make` and has set of limitations which needs to be handled.
  • Loading branch information
parfeon committed Dec 15, 2024
1 parent 66d961f commit 1f97a86
Show file tree
Hide file tree
Showing 17 changed files with 554 additions and 516 deletions.
10 changes: 9 additions & 1 deletion core/samples/subscribe_event_engine_sample.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */

#include <string.h>
#if !defined _WIN32
#include <unistd.h>
#else
#include <windows.h>
#endif
#include <stdio.h>
#include <time.h>

Expand Down Expand Up @@ -87,7 +91,11 @@ static void wait_seconds(const double time_in_seconds)
double time_passed_in_seconds;
do {
time_passed_in_seconds = difftime(time(NULL), start);
#if !defined _WIN32
usleep(10);
#else
Sleep(1);
#endif
} while (time_passed_in_seconds < time_in_seconds);
}

Expand Down Expand Up @@ -166,7 +174,7 @@ void subscribe_message_listener_(
char* msg = string_from_mem_block(message.payload);
char* tt = string_from_mem_block(message.tt);
char* type = message_type_2_string(message.message_type);
char client[100];
char client[100];

if (global) {
snprintf(client, sizeof(client), "PubNub (%p) received", pb);
Expand Down
88 changes: 1 addition & 87 deletions cpp/windows.mk
Original file line number Diff line number Diff line change
Expand Up @@ -34,90 +34,4 @@ clean:
del *.obj
del *.exe
del *.pdb
del *.il?

#/D HAVE_STRERROR_S /D _CRT_SECURE_NO_WARNINGS /D _WINSOCK_DEPRECATED_NO_WARNINGS

SOURCEFILES = ..\core\pbcc_set_state.c ..\core\pubnub_pubsubapi.c ..\core\pubnub_coreapi.c ..\core\pubnub_coreapi_ex.c ..\core\pubnub_ccore_pubsub.c ..\core\pubnub_ccore.c ..\core\pubnub_netcore.c ..\lib\sockets\pbpal_sockets.c ..\lib\sockets\pbpal_resolv_and_connect_sockets.c ..\lib\sockets\pbpal_handle_socket_error.c ..\core\pubnub_alloc_std.c ..\core\pubnub_assert_std.c ..\core\pubnub_generate_uuid.c ..\core\pubnub_timers.c ..\core\pubnub_blocking_io.c ..\lib\base64\pbbase64.c ..\core\pubnub_json_parse.c ..\core\pubnub_free_with_timeout_std.c ..\windows\pbtimespec_elapsed_ms.c ..\lib\md5\md5.c ..\lib\pb_strnlen_s.c ..\lib\pb_strncasecmp.c ..\core\pubnub_helper.c pubnub_version_windows.cpp ..\windows\pubnub_generate_uuid_windows.c ..\windows\pbpal_windows_blocking_io.c ..\windows\windows_socket_blocking_io.c ..\core\c99\snprintf.c ..\lib\miniz\miniz_tinfl.c ..\lib\miniz\miniz_tdef.c ..\lib\miniz\miniz.c ..\lib\pbcrc32.c ..\core\pbgzip_compress.c ..\core\pbgzip_decompress.c ..\core\pbcc_subscribe_v2.c ..\core\pubnub_subscribe_v2.c ..\windows\msstopwatch_windows.c ..\core\pubnub_url_encode.c ..\core\pbcc_advanced_history.c ..\core\pubnub_advanced_history.c ..\core\pbcc_objects_api.c ..\core\pubnub_objects_api.c ..\core\pbcc_actions_api.c ..\core\pubnub_actions_api.c ..\core\pubnub_memory_block.c ..\lib\pbstr_remove_from_list.c ..\windows\pb_sleep_ms.c ..\core\pbauto_heartbeat.c ..\windows\pbauto_heartbeat_init_windows.c

LIBS=ws2_32.lib rpcrt4.lib

!ifndef ONLY_PUBSUB_API
ONLY_PUBSUB_API = 0
!endif

!ifndef USE_PROXY
USE_PROXY = 1
!endif

!ifndef USE_REVOKE_TOKEN
USE_REVOKE_TOKEN = 0
!endif

!ifndef USE_GRANT_TOKEN
USE_GRANT_TOKEN = 0
!endif

!ifndef USE_FETCH_HISTORY
USE_FETCH_HISTORY = 1
!endif

!if $(USE_PROXY)
PROXY_INTF_SOURCEFILES = ..\core\pubnub_proxy.c ..\core\pubnub_proxy_core.c ..\core\pbhttp_digest.c ..\core\pbntlm_core.c ..\core\pbntlm_packer_sspi.c ..\windows\pubnub_set_proxy_from_system_windows.c
!endif

!if $(USE_FETCH_HISTORY)
FETCH_HIST_SOURCEFILES = ..\core\pubnub_fetch_history.c ..\core\pbcc_fetch_history.c
!endif

CFLAGS = /EHsc /Zi /MP /TP /I .. /I . /I ..\core\c99 /I ..\windows /W3 /D PUBNUB_THREADSAFE /D HAVE_STRERROR_S /D PUBNUB_ONLY_PUBSUB_API=$(ONLY_PUBSUB_API) /D PUBNUB_PROXY_API=$(USE_PROXY) /D _CRT_SECURE_NO_WARNINGS /D _WINSOCK_DEPRECATED_NO_WARNINGS /D PUBNUB_USE_GRANT_TOKEN_API=$(USE_GRANT_TOKEN) /D PUBNUB_USE_REVOKE_TOKEN_API=$(USE_REVOKE_TOKEN)
# /Zi enables debugging, remove to get a smaller .exe and no .pdb
# /MP uses one compiler (`cl`) process for each input file, enabling faster build
# /TP means "compile all files as C++"
# /EHsc enables (standard) exception support
# /analyze runs static analysis

all: fntest_runner.exe pubnub_sync_sample.exe pubnub_callback_sample.exe pubnub_callback_cpp11_sample.exe cancel_subscribe_sync_sample.exe subscribe_publish_callback_sample.exe futres_nesting_sync.exe futres_nesting_callback.exe futres_nesting_callback_cpp11.exe

SYNC_INTF_SOURCEFILES= ..\core\pubnub_ntf_sync.c ..\core\srand_from_pubnub_time.c

pubnub_sync_sample.exe: samples\pubnub_sample.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp
$(CXX) /Fe$@ $(CFLAGS) samples\pubnub_sample.cpp $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)

cancel_subscribe_sync_sample.exe: samples\cancel_subscribe_sync_sample.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp
$(CXX) /Fe$@ $(CFLAGS) samples\cancel_subscribe_sync_sample.cpp $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)

futres_nesting_sync.exe: samples\futres_nesting.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp
$(CXX) /Fe$@ $(CFLAGS) samples\futres_nesting.cpp $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)

fntest_runner.exe: fntest\pubnub_fntest_runner.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp fntest\pubnub_fntest.cpp fntest\pubnub_fntest_basic.cpp fntest\pubnub_fntest_medium.cpp
$(CXX) /Fe$@ $(CFLAGS) fntest\pubnub_fntest_runner.cpp $(FETCH_HIST_SOURCEFILES) $(SYNC_INTF_SOURCEFILES) pubnub_futres_sync.cpp fntest/pubnub_fntest.cpp fntest\pubnub_fntest_basic.cpp fntest\pubnub_fntest_medium.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)


##
# The socket poller module to use. You should use the `poll` poller it
# doesn't have the weird restrictions of `select` poller. OTOH,
# select() on Windows is compatible w/BSD sockets poll(), while
# WSAPoll() has some weird differences to poll(). The names are the
# same until the last `_`, then it's `poll` vs `select.
SOCKET_POLLER_C=..\lib\sockets\pbpal_ntf_callback_poller_poll.c

CALLBACK_INTF_SOURCEFILES=..\windows\pubnub_ntf_callback_windows.c ..\windows\pubnub_get_native_socket.c ..\core\pubnub_timer_list.c ..\lib\sockets\pbpal_adns_sockets.c ..\lib\pubnub_dns_codec.c ..\core\pubnub_dns_servers.c ..\windows\pubnub_dns_system_servers.c ..\lib\pubnub_parse_ipv4_addr.c ..\lib\pubnub_parse_ipv6_addr.c $(SOCKET_POLLER_C) ..\core\pbpal_ntf_callback_queue.c ..\core\pbpal_ntf_callback_admin.c ..\core\pbpal_ntf_callback_handle_timer_list.c ..\core\pubnub_callback_subscribe_loop.c


pubnub_callback_sample.exe: samples\pubnub_sample.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_windows.cpp
$(CXX) /Fe$@ -D PUBNUB_CALLBACK_API $(CFLAGS) samples\pubnub_sample.cpp $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_windows.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)

pubnub_callback_cpp11_sample.exe: samples\pubnub_sample.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_cpp11.cpp
$(CXX) /Fe$@ /D PUBNUB_CALLBACK_API $(CFLAGS) samples\pubnub_sample.cpp $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_cpp11.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)

subscribe_publish_callback_sample.exe: samples\subscribe_publish_callback_sample.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_windows.cpp
$(CXX) /Fe$@ -D PUBNUB_CALLBACK_API $(CFLAGS) samples\subscribe_publish_callback_sample.cpp $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_windows.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)

futres_nesting_callback.exe: samples\futres_nesting.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_windows.cpp
$(CXX) /Fe$@ -D PUBNUB_CALLBACK_API $(CFLAGS) samples\futres_nesting.cpp $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_windows.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)

futres_nesting_callback_cpp11.exe: samples\futres_nesting.cpp $(SOURCEFILES) $(PROXY_INTF_SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_cpp11.cpp
$(CXX) /Fe$@ -D PUBNUB_CALLBACK_API $(CFLAGS) samples\futres_nesting.cpp $(CALLBACK_INTF_SOURCEFILES) pubnub_futres_cpp11.cpp $(SOURCEFILES) $(FETCH_HIST_SOURCEFILES) $(PROXY_INTF_SOURCEFILES) /link $(LIBS)


del *.il?
14 changes: 9 additions & 5 deletions make/common/preprocessing.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
###############################################################################

# Included public headers.
INCLUDES = $(OPTION_PREFIX)I.. $(OPTION_PREFIX)I. $(INCLUDES_PLATFORM) $(INCLUDES_OPENSSL)
INCLUDES_ = $(OPTION_PREFIX)I.. $(OPTION_PREFIX)I. $(INCLUDES_PLATFORM) $(INCLUDES_OPENSSL)
INCLUDES = $(strip $(INCLUDES_))

# Feature flags definition.
DEFINES_COMMON = \
Expand All @@ -28,14 +29,17 @@ DEFINES_COMMON = \
$(OPTION_PREFIX)D PUBNUB_USE_OBJECTS_API=$(USE_OBJECTS_API) \
$(OPTION_PREFIX)D PUBNUB_USE_RETRY_CONFIGURATION=$(USE_RETRY_CONFIGURATION) \
$(OPTION_PREFIX)D PUBNUB_USE_REVOKE_TOKEN_API=$(USE_REVOKE_TOKEN) \
$(OPTION_PREFIX)D PUBNUB_USE_SSL=$(USE_SSL) \
$(OPTION_PREFIX)D PUBNUB_USE_SUBSCRIBE_EVENT_ENGINE=$(USE_SUBSCRIBE_EVENT_ENGINE) \
$(OPTION_PREFIX)D PUBNUB_USE_SUBSCRIBE_V2=$(USE_SUBSCRIBE_V2)

# Preprocessing flags for synchronous PubNub library version.
CPPFLAGS = $(INCLUDES) $(DEFINES_COMMON) $(DEFINES_EXTERN_C) $(DEFINES_RANDOM_IV)
CPPFLAGS_ = $(INCLUDES) $(DEFINES_PLATFORM) $(DEFINES_COMMON) $(DEFINES_EXTERN_C) $(DEFINES_RANDOM_IV)
CPPFLAGS = $(strip $(CPPFLAGS_))

# Preprocessing flags for PubNub library with callback interface.
CALLBACK_CPPFLAGS = \
$(CPPFLAGS) \
CALLBACK_CPPFLAGS_ = \
$(CPPFLAGS_) \
$(OPTION_PREFIX)D PUBNUB_CALLBACK_API \
$(OPTION_PREFIX)D PUBNUB_SET_DNS_SERVERS=$(USE_DNS_SERVERS)
$(OPTION_PREFIX)D PUBNUB_SET_DNS_SERVERS=$(USE_DNS_SERVERS)
CALLBACK_CPPFLAGS = $(strip $(CALLBACK_CPPFLAGS_))
95 changes: 58 additions & 37 deletions make/common/targets_app.mk
Original file line number Diff line number Diff line change
@@ -1,103 +1,124 @@
# Sample application targets.
# Description: Makefile used to declare list of targets to build sample app
# which demonstrates various features.

#
# Note: `nmake` can't handle `/` to `\` replacement in multiline prerequisites
# so they have been separated from targets for preprocessing.

###############################################################################
# Sample application targets #
###############################################################################

# ----------------- Samples based on sync PubNub library -----------------

SYNC_CANCEL_SUBSCRIBE_SOURCES_ = ../core/samples/cancel_subscribe_sync_sample.c
SYNC_CANCEL_SUBSCRIBE_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_CANCEL_SUBSCRIBE_SOURCES_))
cancel_subscribe_sync_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/cancel_subscribe_sync_sample.c) \
$(SYNC_CANCEL_SUBSCRIBE_SOURCES) \
pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

metadata$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/metadata.c) \
pubnub_sync$(LIB_EXT)
SYNC_METADATA_SOURCES_ = ../core/samples/metadata.c
SYNC_METADATA_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_METADATA_SOURCES_))
metadata$(APP_EXT): $(SYNC_METADATA_SOURCES) pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

SYNC_ADVANCED_HISTORY_SOURCES_ = ../core/samples/pubnub_advanced_history_sample.c
SYNC_ADVANCED_HISTORY_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_ADVANCED_HISTORY_SOURCES_))
pubnub_advanced_history_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_advanced_history_sample.c) \
$(SYNC_ADVANCED_HISTORY_SOURCES) \
pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

pubnub_fetch_history_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_fetch_history_sample.c) \
pubnub_sync$(LIB_EXT)
SYNC_FETCH_HISTORY_SOURCES_ = ../core/samples/pubnub_fetch_history_sample.c
SYNC_FETCH_HISTORY_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_FETCH_HISTORY_SOURCES_))
pubnub_fetch_history_sample$(APP_EXT): $(SYNC_FETCH_HISTORY_SOURCES) pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

SYNC_PUBLISH_VIA_POST_SOURCES_ = ../core/samples/pubnub_publish_via_post_sample.c
SYNC_PUBLISH_VIA_POST_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_PUBLISH_VIA_POST_SOURCES_))
pubnub_publish_via_post_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_publish_via_post_sample.c) \
$(SYNC_PUBLISH_VIA_POST_SOURCES) \
pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

SYNC_PUBLISH_RETRY_SOURCES_ = ../core/samples/pubnub_sync_publish_retry.c
SYNC_PUBLISH_RETRY_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_PUBLISH_RETRY_SOURCES_))
pubnub_sync_publish_retry$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_sync_publish_retry.c) \
pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

pubnub_sync_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_sync_sample.c) \
$(SYNC_PUBLISH_RETRY_SOURCES) \
pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

pubnub_sync_secretkey_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_sync_secretkey_sample.c) \
pubnub_sync$(LIB_EXT)
SYNC_SAMPLE_SOURCES_ = ../core/samples/pubnub_sync_sample.c
SYNC_SAMPLE_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_SAMPLE_SOURCES_))
pubnub_sync_sample$(APP_EXT): $(SYNC_SAMPLE_SOURCES) pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)


# ----------------- Samples based on callback PubNub library -----------------

CALLBACK_PUBLISH_SUBLOOP_SOURCES_ = ../core/samples/publish_callback_subloop_sample.c
CALLBACK_PUBLISH_SUBLOOP_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_PUBLISH_SUBLOOP_SOURCES_))
publish_callback_subloop_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/publish_callback_subloop_sample.c) \
$(CALLBACK_PUBLISH_SUBLOOP_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

CALLBACK_PUBLISH_QUEUE_SUBLOOP_SOURCES_ = ../core/samples/publish_queue_callback_subloop.c
CALLBACK_PUBLISH_QUEUE_SUBLOOP_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_PUBLISH_QUEUE_SUBLOOP_SOURCES_))
publish_queue_callback_subloop$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/publish_queue_callback_subloop.c) \
$(CALLBACK_PUBLISH_QUEUE_SUBLOOP_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

CALLBACK_SAMPLE_SOURCES_ = ../core/samples/pubnub_callback_sample.c
CALLBACK_SAMPLE_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_SAMPLE_SOURCES_))
pubnub_callback_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_callback_sample.c) \
$(CALLBACK_SAMPLE_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

CALLBACK_SUBLOOP_SOURCES_ = ../core/samples/pubnub_callback_subloop_sample.c
CALLBACK_SUBLOOP_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_SUBLOOP_SOURCES_))
pubnub_callback_subloop_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/pubnub_callback_subloop_sample.c) \
$(CALLBACK_SUBLOOP_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

CALLBACK_EVENT_ENGINE_SOURCES_ = ../core/samples/subscribe_event_engine_sample.c
CALLBACK_EVENT_ENGINE_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_EVENT_ENGINE_SOURCES_))
subscribe_event_engine_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/subscribe_event_engine_sample.c) \
$(CALLBACK_EVENT_ENGINE_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

CALLBACK_SUBSCRIBE_PUBLISH_SOURCES_ = ../core/samples/subscribe_publish_callback_sample.c
CALLBACK_SUBSCRIBE_PUBLISH_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_SUBSCRIBE_PUBLISH_SOURCES_))
subscribe_publish_callback_sample$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/subscribe_publish_callback_sample.c) \
$(CALLBACK_SUBSCRIBE_PUBLISH_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

CALLBACK_PUBLISH_FROM_CALLBACK_SOURCES_ = ../core/samples/subscribe_publish_from_callback.c
CALLBACK_PUBLISH_FROM_CALLBACK_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_PUBLISH_FROM_CALLBACK_SOURCES_))
subscribe_publish_from_callback$(APP_EXT): \
$(subst /,$(PATH_SEP),../core/samples/subscribe_publish_from_callback.c) \
$(CALLBACK_PUBLISH_FROM_CALLBACK_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)


# --------------- Console based on sync PubNub library --------------

SYNC_CONSOLE_SOURCES_ = $(CONSOLE_SOURCE_FILES) ../core/samples/console/pnc_ops_sync.c
SYNC_CONSOLE_SOURCES = $(subst /,$(PATH_SEP),$(SYNC_CONSOLE_SOURCES_))
pubnub_console_sync$(APP_EXT): \
$(subst /,$(PATH_SEP),$(CONSOLE_SOURCE_FILES)) \
$(subst /,$(PATH_SEP),../core/samples/pubnub_console_sync.c) \
$(SYNC_CONSOLE_SOURCES) \
pubnub_sync$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)

CALLBACK_CONSOLE_SOURCES_ = $(CONSOLE_SOURCE_FILES) ../core/samples/console/pnc_ops_callback.c
CALLBACK_CONSOLE_SOURCES = $(subst /,$(PATH_SEP),$(CALLBACK_CONSOLE_SOURCES_))
pubnub_console_callback$(APP_EXT): \
$(subst /,$(PATH_SEP),$(CONSOLE_SOURCE_FILES)) \
$(subst /,$(PATH_SEP),../core/samples/pnc_ops_callback.c) \
$(CALLBACK_CONSOLE_SOURCES) \
pubnub_callback$(LIB_EXT)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
$(COMPILER) $(OUT_FLAG)$@ $(COMPILER_FLAGS) $(CALLBACK_CPPFLAGS) $(PREREQUISITES) $(LDLIBS)
Loading

0 comments on commit 1f97a86

Please sign in to comment.