Commit f67e840f authored by SARVESH MEHTANI's avatar SARVESH MEHTANI

Added Lab5 data

parents
cmake_minimum_required(VERSION 3.0)
set(CMAKE_BUILD_TYPE DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
project(build)
add_executable(helloworld
helloworld.cpp)
find_package (Threads)
add_executable(usespthread
usespthread.cpp
)
target_link_libraries (usespthread ${CMAKE_THREAD_LIBS_INIT})
add_library(MyEngineDynamic SHARED
myengine/myengine.cpp
)
set_target_properties(MyEngineDynamic PROPERTIES PUBLIC_HEADER myengine/myengine.hpp)
add_library(MyEngineStatic STATIC
myengine/myengine.cpp
)
set_target_properties(MyEngineStatic PROPERTIES PUBLIC_HEADER myengine/myengine.hpp)
install(TARGETS MyEngineDynamic MyEngineStatic
DESTINATION ​/usr/local/lib/)
install(FILES myengine/myengine.hpp DESTINATION /usr/local/include/)
\ No newline at end of file
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
#include "myengine.hpp"
int generateRandomNumber() {
int iSecret;
srand(time(NULL));
return rand();
}
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h>
int generateRandomNumber();
\ No newline at end of file
cmake_minimum_required(VERSION 3.0)
set(CMAKE_BUILD_TYPE DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
project(build)
add_executable(mygamestatic
mygame.cpp
)
target_link_libraries( mygamestatic
PRIVATE
/usr/local/lib/libMyEngineStatic.a
)
add_executable(mygamedynamic
mygame.cpp
)
target_link_libraries( mygamedynamic
PRIVATE
/usr/local/lib/libMyEngineDynamic.so
)
\ No newline at end of file
set(CMAKE_C_COMPILER "/usr/bin/cc")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "GNU")
set(CMAKE_C_COMPILER_VERSION "5.4.0")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert")
set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_static_assert")
set(CMAKE_C_PLATFORM_ID "Linux")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_AR "/usr/bin/ar")
set(CMAKE_RANLIB "/usr/bin/ranlib")
set(CMAKE_LINKER "/usr/bin/ld")
set(CMAKE_COMPILER_IS_GNUCC 1)
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_COMPILER_IS_MINGW )
set(CMAKE_COMPILER_IS_CYGWIN )
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif()
set(CMAKE_C_COMPILER_ENV_VAR "CC")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif()
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "8")
set(CMAKE_C_COMPILER_ABI "ELF")
set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
endif()
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
set(CMAKE_CXX_COMPILER "/usr/bin/c++")
set(CMAKE_CXX_COMPILER_ARG1 "")
set(CMAKE_CXX_COMPILER_ID "GNU")
set(CMAKE_CXX_COMPILER_VERSION "5.4.0")
set(CMAKE_CXX_COMPILER_WRAPPER "")
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters")
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
set(CMAKE_CXX_PLATFORM_ID "Linux")
set(CMAKE_CXX_SIMULATE_ID "")
set(CMAKE_CXX_SIMULATE_VERSION "")
set(CMAKE_AR "/usr/bin/ar")
set(CMAKE_RANLIB "/usr/bin/ranlib")
set(CMAKE_LINKER "/usr/bin/ld")
set(CMAKE_COMPILER_IS_GNUCXX 1)
set(CMAKE_CXX_COMPILER_LOADED 1)
set(CMAKE_CXX_COMPILER_WORKS TRUE)
set(CMAKE_CXX_ABI_COMPILED TRUE)
set(CMAKE_COMPILER_IS_MINGW )
set(CMAKE_COMPILER_IS_CYGWIN )
if(CMAKE_COMPILER_IS_CYGWIN)
set(CYGWIN 1)
set(UNIX 1)
endif()
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
if(CMAKE_COMPILER_IS_MINGW)
set(MINGW 1)
endif()
set(CMAKE_CXX_COMPILER_ID_RUN 1)
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP)
set(CMAKE_CXX_LINKER_PREFERENCE 30)
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
# Save compiler ABI information.
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
set(CMAKE_CXX_COMPILER_ABI "ELF")
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
if(CMAKE_CXX_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_CXX_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
endif()
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
endif()
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c")
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
set(CMAKE_HOST_SYSTEM "Linux-4.15.0-32-generic")
set(CMAKE_HOST_SYSTEM_NAME "Linux")
set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-32-generic")
set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_SYSTEM "Linux-4.15.0-32-generic")
set(CMAKE_SYSTEM_NAME "Linux")
set(CMAKE_SYSTEM_VERSION "4.15.0-32-generic")
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
set(CMAKE_CROSSCOMPILING "FALSE")
set(CMAKE_SYSTEM_LOADED 1)
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# Relative path conversion top directories.
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame")
set(CMAKE_RELATIVE_PATH_TOP_BINARY "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build")
# Force unix paths in dependencies.
set(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# The generator used is:
set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles")
# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
"CMakeCache.txt"
"../CMakeLists.txt"
"CMakeFiles/3.5.1/CMakeCCompiler.cmake"
"CMakeFiles/3.5.1/CMakeCXXCompiler.cmake"
"CMakeFiles/3.5.1/CMakeSystem.cmake"
"CMakeFiles/feature_tests.c"
"CMakeFiles/feature_tests.cxx"
"/usr/share/cmake-3.5/Modules/CMakeCCompiler.cmake.in"
"/usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c"
"/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake"
"/usr/share/cmake-3.5/Modules/CMakeCXXCompiler.cmake.in"
"/usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp"
"/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake"
"/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake"
"/usr/share/cmake-3.5/Modules/CMakeCompilerIdDetection.cmake"
"/usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake"
"/usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake"
"/usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake"
"/usr/share/cmake-3.5/Modules/CMakeDetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake"
"/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake"
"/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake"
"/usr/share/cmake-3.5/Modules/CMakeFindBinUtils.cmake"
"/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake"
"/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake"
"/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake"
"/usr/share/cmake-3.5/Modules/CMakeParseImplicitLinkInfo.cmake"
"/usr/share/cmake-3.5/Modules/CMakeSystem.cmake.in"
"/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake"
"/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake"
"/usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake"
"/usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake"
"/usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake"
"/usr/share/cmake-3.5/Modules/CMakeUnixFindMake.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/ADSP-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/ARMCC-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/AppleClang-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Borland-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompilerInternal.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Compaq-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Cray-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Embarcadero-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Fujitsu-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/GHS-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/GNU-C-FeatureTests.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX-FeatureTests.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/GNU-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/HP-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/HP-CXX-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/IAR-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Intel-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/MIPSpro-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/MSVC-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/PGI-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/PathScale-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/SCO-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/SDCC-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/SunPro-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/TI-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/Watcom-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/XL-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/XL-CXX-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/zOS-C-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake"
"/usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake"
"/usr/share/cmake-3.5/Modules/MultiArchCross.cmake"
"/usr/share/cmake-3.5/Modules/Platform/Linux-CXX.cmake"
"/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake"
"/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake"
"/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake"
"/usr/share/cmake-3.5/Modules/Platform/Linux.cmake"
"/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake"
)
# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
"Makefile"
"CMakeFiles/cmake.check_cache"
)
# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
"CMakeFiles/3.5.1/CMakeSystem.cmake"
"CMakeFiles/3.5.1/CMakeCCompiler.cmake"
"CMakeFiles/3.5.1/CMakeCXXCompiler.cmake"
"CMakeFiles/3.5.1/CMakeCCompiler.cmake"
"CMakeFiles/3.5.1/CMakeCXXCompiler.cmake"
"CMakeFiles/CMakeDirectoryInformation.cmake"
)
# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
"CMakeFiles/mygamedynamic.dir/DependInfo.cmake"
"CMakeFiles/mygamestatic.dir/DependInfo.cmake"
)
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# The main recursive all target
all:
.PHONY : all
# The main recursive preinstall target
preinstall:
.PHONY : preinstall
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame"
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build"
#=============================================================================
# Target rules for target CMakeFiles/mygamedynamic.dir
# All Build rule for target.
CMakeFiles/mygamedynamic.dir/all:
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/depend
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/build
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" --progress-num=1,2 "Built target mygamedynamic"
.PHONY : CMakeFiles/mygamedynamic.dir/all
# Include target in all.
all: CMakeFiles/mygamedynamic.dir/all
.PHONY : all
# Build rule for subdir invocation for target.
CMakeFiles/mygamedynamic.dir/rule: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" 2
$(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/mygamedynamic.dir/all
$(CMAKE_COMMAND) -E cmake_progress_start "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" 0
.PHONY : CMakeFiles/mygamedynamic.dir/rule
# Convenience name for target.
mygamedynamic: CMakeFiles/mygamedynamic.dir/rule
.PHONY : mygamedynamic
# clean rule for target.
CMakeFiles/mygamedynamic.dir/clean:
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/clean
.PHONY : CMakeFiles/mygamedynamic.dir/clean
# clean rule for target.
clean: CMakeFiles/mygamedynamic.dir/clean
.PHONY : clean
#=============================================================================
# Target rules for target CMakeFiles/mygamestatic.dir
# All Build rule for target.
CMakeFiles/mygamestatic.dir/all:
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/depend
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/build
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" --progress-num=3,4 "Built target mygamestatic"
.PHONY : CMakeFiles/mygamestatic.dir/all
# Include target in all.
all: CMakeFiles/mygamestatic.dir/all
.PHONY : all
# Build rule for subdir invocation for target.
CMakeFiles/mygamestatic.dir/rule: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" 2
$(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/mygamestatic.dir/all
$(CMAKE_COMMAND) -E cmake_progress_start "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" 0
.PHONY : CMakeFiles/mygamestatic.dir/rule
# Convenience name for target.
mygamestatic: CMakeFiles/mygamestatic.dir/rule
.PHONY : mygamestatic
# clean rule for target.
CMakeFiles/mygamestatic.dir/clean:
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/clean
.PHONY : CMakeFiles/mygamestatic.dir/clean
# clean rule for target.
clean: CMakeFiles/mygamestatic.dir/clean
.PHONY : clean
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/edit_cache.dir
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/rebuild_cache.dir
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/mygamedynamic.dir
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/mygamestatic.dir
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
const char features[] = {"\n"
"C_FEATURE:"
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404
"1"
#else
"0"
#endif
"c_function_prototypes\n"
"C_FEATURE:"
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
"1"
#else
"0"
#endif
"c_restrict\n"
"C_FEATURE:"
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L
"1"
#else
"0"
#endif
"c_static_assert\n"
"C_FEATURE:"
#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
"1"
#else
"0"
#endif
"c_variadic_macros\n"
};
int main(int argc, char** argv) { (void)argv; return features[argc]; }
#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">])
#IncludeRegexScan: ^.*$
#IncludeRegexComplain: ^$
#IncludeRegexTransform:
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp
iostream
-
myengine.hpp
-
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
"CXX"
)
# The set of files for implicit dependencies of each language:
set(CMAKE_DEPENDS_CHECK_CXX
"/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/mygamedynamic.dir/mygame.cpp.o"
)
set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
)
# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
)
# Fortran module output directory.
set(CMAKE_Fortran_TARGET_MODULE_DIR "")
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# Delete rule output on recipe failure.
.DELETE_ON_ERROR:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame"
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build"
# Include any dependencies generated for this target.
include CMakeFiles/mygamedynamic.dir/depend.make
# Include the progress variables for this target.
include CMakeFiles/mygamedynamic.dir/progress.make
# Include the compile flags for this target's objects.
include CMakeFiles/mygamedynamic.dir/flags.make
CMakeFiles/mygamedynamic.dir/mygame.cpp.o: CMakeFiles/mygamedynamic.dir/flags.make
CMakeFiles/mygamedynamic.dir/mygame.cpp.o: ../mygame.cpp
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/mygamedynamic.dir/mygame.cpp.o"
/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mygamedynamic.dir/mygame.cpp.o -c "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp"
CMakeFiles/mygamedynamic.dir/mygame.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mygamedynamic.dir/mygame.cpp.i"
/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp" > CMakeFiles/mygamedynamic.dir/mygame.cpp.i
CMakeFiles/mygamedynamic.dir/mygame.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mygamedynamic.dir/mygame.cpp.s"
/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp" -o CMakeFiles/mygamedynamic.dir/mygame.cpp.s
CMakeFiles/mygamedynamic.dir/mygame.cpp.o.requires:
.PHONY : CMakeFiles/mygamedynamic.dir/mygame.cpp.o.requires
CMakeFiles/mygamedynamic.dir/mygame.cpp.o.provides: CMakeFiles/mygamedynamic.dir/mygame.cpp.o.requires
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/mygame.cpp.o.provides.build
.PHONY : CMakeFiles/mygamedynamic.dir/mygame.cpp.o.provides
CMakeFiles/mygamedynamic.dir/mygame.cpp.o.provides.build: CMakeFiles/mygamedynamic.dir/mygame.cpp.o
# Object files for target mygamedynamic
mygamedynamic_OBJECTS = \
"CMakeFiles/mygamedynamic.dir/mygame.cpp.o"
# External object files for target mygamedynamic
mygamedynamic_EXTERNAL_OBJECTS =
mygamedynamic: CMakeFiles/mygamedynamic.dir/mygame.cpp.o
mygamedynamic: CMakeFiles/mygamedynamic.dir/build.make
mygamedynamic: /usr/local/lib/libMyEngineDynamic.so
mygamedynamic: CMakeFiles/mygamedynamic.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable mygamedynamic"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/mygamedynamic.dir/link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
CMakeFiles/mygamedynamic.dir/build: mygamedynamic
.PHONY : CMakeFiles/mygamedynamic.dir/build
CMakeFiles/mygamedynamic.dir/requires: CMakeFiles/mygamedynamic.dir/mygame.cpp.o.requires
.PHONY : CMakeFiles/mygamedynamic.dir/requires
CMakeFiles/mygamedynamic.dir/clean:
$(CMAKE_COMMAND) -P CMakeFiles/mygamedynamic.dir/cmake_clean.cmake
.PHONY : CMakeFiles/mygamedynamic.dir/clean
CMakeFiles/mygamedynamic.dir/depend:
cd "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/mygamedynamic.dir/DependInfo.cmake" --color=$(COLOR)
.PHONY : CMakeFiles/mygamedynamic.dir/depend
file(REMOVE_RECURSE
"CMakeFiles/mygamedynamic.dir/mygame.cpp.o"
"mygamedynamic.pdb"
"mygamedynamic"
)
# Per-language clean rules from dependency scanning.
foreach(lang CXX)
include(CMakeFiles/mygamedynamic.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
CMakeFiles/mygamedynamic.dir/mygame.cpp.o
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
CMakeFiles/mygamedynamic.dir/mygame.cpp.o: ../mygame.cpp
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# compile CXX with /usr/bin/c++
CXX_FLAGS =
CXX_DEFINES =
CXX_INCLUDES =
/usr/bin/c++ CMakeFiles/mygamedynamic.dir/mygame.cpp.o -o mygamedynamic -L/usr/local/lib -rdynamic -lMyEngineDynamic -Wl,-rpath,/usr/local/lib
#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">])
#IncludeRegexScan: ^.*$
#IncludeRegexComplain: ^$
#IncludeRegexTransform:
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp
iostream
-
myengine.hpp
-
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
"CXX"
)
# The set of files for implicit dependencies of each language:
set(CMAKE_DEPENDS_CHECK_CXX
"/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/mygamestatic.dir/mygame.cpp.o"
)
set(CMAKE_CXX_COMPILER_ID "GNU")
# The include file search paths:
set(CMAKE_CXX_TARGET_INCLUDE_PATH
)
# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
)
# Fortran module output directory.
set(CMAKE_Fortran_TARGET_MODULE_DIR "")
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# Delete rule output on recipe failure.
.DELETE_ON_ERROR:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame"
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build"
# Include any dependencies generated for this target.
include CMakeFiles/mygamestatic.dir/depend.make
# Include the progress variables for this target.
include CMakeFiles/mygamestatic.dir/progress.make
# Include the compile flags for this target's objects.
include CMakeFiles/mygamestatic.dir/flags.make
CMakeFiles/mygamestatic.dir/mygame.cpp.o: CMakeFiles/mygamestatic.dir/flags.make
CMakeFiles/mygamestatic.dir/mygame.cpp.o: ../mygame.cpp
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/mygamestatic.dir/mygame.cpp.o"
/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/mygamestatic.dir/mygame.cpp.o -c "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp"
CMakeFiles/mygamestatic.dir/mygame.cpp.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/mygamestatic.dir/mygame.cpp.i"
/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp" > CMakeFiles/mygamestatic.dir/mygame.cpp.i
CMakeFiles/mygamestatic.dir/mygame.cpp.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/mygamestatic.dir/mygame.cpp.s"
/usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp" -o CMakeFiles/mygamestatic.dir/mygame.cpp.s
CMakeFiles/mygamestatic.dir/mygame.cpp.o.requires:
.PHONY : CMakeFiles/mygamestatic.dir/mygame.cpp.o.requires
CMakeFiles/mygamestatic.dir/mygame.cpp.o.provides: CMakeFiles/mygamestatic.dir/mygame.cpp.o.requires
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/mygame.cpp.o.provides.build
.PHONY : CMakeFiles/mygamestatic.dir/mygame.cpp.o.provides
CMakeFiles/mygamestatic.dir/mygame.cpp.o.provides.build: CMakeFiles/mygamestatic.dir/mygame.cpp.o
# Object files for target mygamestatic
mygamestatic_OBJECTS = \
"CMakeFiles/mygamestatic.dir/mygame.cpp.o"
# External object files for target mygamestatic
mygamestatic_EXTERNAL_OBJECTS =
mygamestatic: CMakeFiles/mygamestatic.dir/mygame.cpp.o
mygamestatic: CMakeFiles/mygamestatic.dir/build.make
mygamestatic: /usr/local/lib/libMyEngineStatic.a
mygamestatic: CMakeFiles/mygamestatic.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable mygamestatic"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/mygamestatic.dir/link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
CMakeFiles/mygamestatic.dir/build: mygamestatic
.PHONY : CMakeFiles/mygamestatic.dir/build
CMakeFiles/mygamestatic.dir/requires: CMakeFiles/mygamestatic.dir/mygame.cpp.o.requires
.PHONY : CMakeFiles/mygamestatic.dir/requires
CMakeFiles/mygamestatic.dir/clean:
$(CMAKE_COMMAND) -P CMakeFiles/mygamestatic.dir/cmake_clean.cmake
.PHONY : CMakeFiles/mygamestatic.dir/clean
CMakeFiles/mygamestatic.dir/depend:
cd "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/mygamestatic.dir/DependInfo.cmake" --color=$(COLOR)
.PHONY : CMakeFiles/mygamestatic.dir/depend
file(REMOVE_RECURSE
"CMakeFiles/mygamestatic.dir/mygame.cpp.o"
"mygamestatic.pdb"
"mygamestatic"
)
# Per-language clean rules from dependency scanning.
foreach(lang CXX)
include(CMakeFiles/mygamestatic.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
CMakeFiles/mygamestatic.dir/mygame.cpp.o
/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/mygame.cpp
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
CMakeFiles/mygamestatic.dir/mygame.cpp.o: ../mygame.cpp
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# compile CXX with /usr/bin/c++
CXX_FLAGS =
CXX_DEFINES =
CXX_INCLUDES =
/usr/bin/c++ CMakeFiles/mygamestatic.dir/mygame.cpp.o -o mygamestatic -rdynamic /usr/local/lib/libMyEngineStatic.a
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.5
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SUFFIXES: .hpux_make_needs_suffix_list
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /usr/bin/cmake
# The command to remove a file.
RM = /usr/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame"
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build"
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
/usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available.
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles/progress.marks"
$(MAKE) -f CMakeFiles/Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/CMakeFiles" 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -f CMakeFiles/Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) -f CMakeFiles/Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named mygamedynamic
# Build rule for target.
mygamedynamic: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 mygamedynamic
.PHONY : mygamedynamic
# fast build rule for target.
mygamedynamic/fast:
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/build
.PHONY : mygamedynamic/fast
#=============================================================================
# Target rules for targets named mygamestatic
# Build rule for target.
mygamestatic: cmake_check_build_system
$(MAKE) -f CMakeFiles/Makefile2 mygamestatic
.PHONY : mygamestatic
# fast build rule for target.
mygamestatic/fast:
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/build
.PHONY : mygamestatic/fast
mygame.o: mygame.cpp.o
.PHONY : mygame.o
# target to build an object file
mygame.cpp.o:
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/mygame.cpp.o
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/mygame.cpp.o
.PHONY : mygame.cpp.o
mygame.i: mygame.cpp.i
.PHONY : mygame.i
# target to preprocess a source file
mygame.cpp.i:
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/mygame.cpp.i
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/mygame.cpp.i
.PHONY : mygame.cpp.i
mygame.s: mygame.cpp.s
.PHONY : mygame.s
# target to generate assembly for a file
mygame.cpp.s:
$(MAKE) -f CMakeFiles/mygamedynamic.dir/build.make CMakeFiles/mygamedynamic.dir/mygame.cpp.s
$(MAKE) -f CMakeFiles/mygamestatic.dir/build.make CMakeFiles/mygamestatic.dir/mygame.cpp.s
.PHONY : mygame.cpp.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... edit_cache"
@echo "... rebuild_cache"
@echo "... mygamedynamic"
@echo "... mygamestatic"
@echo "... mygame.o"
@echo "... mygame.i"
@echo "... mygame.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
# Install script for directory: /media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/local")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Install shared libraries without execute permission?
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
set(CMAKE_INSTALL_SO_NO_EXE "1")
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
"${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "/media/smehtani83/41D913FC29D62F2B/pdfs/study/3rd semester/CS 251/Lab5/outlab5/Shashij Solutions/P1/mygame/build/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
#include <iostream>
#include <myengine.hpp>
using namespace std;
int main() {
printf("%d\n", generateRandomNumber());
}
helloworld: helloworld.cpp
g++ helloworld.cpp -o helloworld
usespthread: usespthread.cpp
g++ -pthread usespthread.cpp -o usespthread
libMyEngineDynamic.so: ./myengine/myengine.cpp ./myengine/myengine.hpp
g++ -c ./myengine/myengine.hpp ./myengine/myengine.cpp -fpic
g++ *.o -shared -o libMyEngineDynamic.so
libMyEngineStatic.a: ./myengine/myengine.cpp ./myengine/myengine.hpp
g++ -c ./myengine/myengine.hpp ./myengine/myengine.cpp -fPIC
ar rcs libMyEngineStatic.a *.o
.PHONY: installdynamic
installdynamic: libMyEngineDynamic.so myengine/myengine.hpp
sudo cp libMyEngineDynamic.so /usr/local/lib/
sudo cp myengine/myengine.hpp /usr/local/include/
.PHONY: installstatic
installstatic: libMyEngineStatic.a myengine/myengine.hpp
sudo cp libMyEngineStatic.a /usr/local/lib/
sudo cp myengine/myengine.hpp /usr/local/include/
.PHONY: mygamestatic
mygamestatic:
g++ -o mygamestatic ./mygame/mygame.cpp -L /usr/local/lib/ -lMyEngineStatic
.PHONY: mygamedynamic
mygamedynamic:
g++ -o mygamedynamic ./mygame/mygame.cpp -L /usr/local/lib/,-rpath=/usr/local/lib/ -lMyEngineDynamic
.PHONY: clean
clean:
rm -rf *.o *.a *.so helloworld mygamedynamic mygamestatic usespthread ./myengine/myengine.hpp.gch
helloworld: helloworld.cpp
g++ helloworld.cpp -o helloworld
usespthread: usespthread.cpp
g++ -pthread usespthread.cpp -o usespthread
libMyEngineDynamic.so: ./myengine/myengine.cpp ./myengine/myengine.hpp
g++ -c ./myengine/myengine.hpp ./myengine/myengine.cpp -fPIC
g++ *.o -shared -o libMyEngineDynamic.so
libMyEngineStatic.a: ./myengine/myengine.cpp ./myengine/myengine.hpp
g++ -c ./myengine/myengine.hpp ./myengine/myengine.cpp -fPIC
ar rcs libMyEngineStatic.a *.o
.PHONY: installdynamic
installdynamic: libMyEngineDynamic.so myengine/myengine.hpp
sudo cp libMyEngineDynamic.so /usr/local/lib/
sudo cp myengine/myengine.hpp /usr/local/include/
.PHONY: installstatic
installstatic: libMyEngineStatic.a myengine/myengine.hpp
sudo cp libMyEngineStatic.a /usr/local/lib/
sudo cp myengine/myengine.hpp /usr/local/include/
.PHONY: mygamestatic
mygamestatic:
g++ -o mygamestatic ./mygame/mygame.cpp -L /usr/local/lib/ -lMyEngineStatic
.PHONY: mygamedynamic
mygamedynamic:
g++ -o mygamedynamic ./mygame/mygame.cpp -L /usr/local/lib/ -lMyEngineDynamic
.PHONY: clean
clean:
rm -rf *.o *.a *.so helloworld mygamedynamic mygamestatic usespthread ./myengine/myengine.hpp.gch
#include <cstdlib>
#include <pthread.h>
#include <cstdio>
void *print_message_function(void *ptr);
int main() {
pthread_t thread1, thread2;
const char *message1 = "Hi! I am child thread1";
const char *message2 = "Hi! I am child thread2";
int iret1, iret2;
/* Create independent threads each of which will execute function */
iret1 = pthread_create(&thread1, NULL, print_message_function, (void *) message1);
if (iret1) {
fprintf(stderr, "Error - pthread_create() return code: %d\n", iret1);
exit(EXIT_FAILURE);
}
iret2 = pthread_create(&thread2, NULL, print_message_function, (void *) message2);
if (iret2) {
fprintf(stderr, "Error - pthread_create() return code: %d\n", iret2);
exit(EXIT_FAILURE);
}
/* Wait till threads are complete before main continues. Unless we */
/* wait we run the risk of executing an exit which will terminate */
/* the process and all threads before the threads have completed. */
printf("I am the parent thread. I have created two child threads and am waiting for them to complete\n");
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
exit(EXIT_SUCCESS);
}
void *print_message_function(void *ptr) {
char *message;
message = (char *) ptr;
printf("%s \n", message);
}
Category Name No. of students
B.Tech - I 0
B.Tech - II 125
B.Tech - III 128
B.Tech - IV 123
Dual Degree - V 97
M.Tech - I 108
M.Tech - II 111
M.Tech - III 115
Ph.D 197
import requests
import urllib.parse
from bs4 import BeautifulSoup as bsp
import csv
import re
r=requests.get('https://www.cse.iitb.ac.in/page222')
mainurl='https://www.cse.iitb.ac.in/page222'
soup=bsp(r.content,'html.parser')
inner=soup.find_all(id="right_side")
#inner2=(inner[0]).find(class_="intro")
links=inner[0].find_all('li')
#print(links.prettify())
#branch=["B.Tech - I","B.Tech - II","B.Tech - III","B.Tech - IV", "Dual Degree - V","M.Tech - I","M.Tech - II","M.Tech - III","Ph.D"]
with open("count.csv",'w') as csvfile:
csv.register_dialect('mydialect',delimiter='\t',lineterminator='\n')
csvwriter=csv.writer(csvfile,dialect='mydialect')
rows=[]
counter=-1
for link in links:
counter=counter+1
for slink in link.find_all('a'):
rlink=slink.get('href') #relative link to individual pages
alink=urllib.parse.urljoin(mainurl,rlink)
#print(alink)
d=requests.get(alink)
soup_d=bsp(d.content,'html.parser')
#print(list(soup_d.children))
data1=soup_d.find(class_="mpart")
data2=data1.find_all('tr' , class_="row1")
#print((list(data2)))
nooft=0
for d in data2:
if (re.match(r".*template.*",str(d))):
nooft=nooft+1
data3=data1.find_all('tr' , class_="row2")
for d in data3:
if (re.match(r".*template.*",str(d))):
nooft=nooft+1
#print(len(data2)+len(data3))
count=(len(data2)+len(data3)-nooft)
#print(slink)
rows.append([link.get_text(),count])
csvwriter.writerow(["Category Name", "No. of students"])
csvwriter.writerows(rows)
import requests
import urllib.parse
from bs4 import BeautifulSoup as bsp
import csv
r=requests.get('https://www.cse.iitb.ac.in/page222')
mainurl='https://www.cse.iitb.ac.in/page222'
soup=bsp(r.content,'html.parser')
inner=soup.find_all(id="right_side")
#inner2=(inner[0]).find(class_="intro")
links=inner[0].find_all('li')
#print(links.prettify())
#branch=["B.Tech - I","B.Tech - II","B.Tech - III","B.Tech - IV", "Dual Degree - V","M.Tech - I","M.Tech - II","M.Tech - III","Ph.D"]
with open("count.csv",'w') as csvfile:
csv.register_dialect('mydialect',delimiter='\t',lineterminator='\n')
csvwriter=csv.writer(csvfile,dialect='mydialect')
rows=[]
counter=-1
for link in links:
counter=counter+1
for slink in link.find_all('a'):
rlink=slink.get('href') #relative link to individual pages
alink=urllib.parse.urljoin(mainurl,rlink)
#print(alink)
d=requests.get(alink)
soup_d=bsp(d.content,'html.parser')
#print(list(soup_d.children))
data1=soup_d.find(class_="mpart")
data2=data1.find_all('tr' , class_="row1")
data3=data1.find_all('tr' , class_="row2")
#print(len(data2)+len(data3))
count=(len(data2)+len(data3))
#print(slink)
rows.append([link.get_text(),count])
csvwriter.writerow(["Category Name", "No. of students"])
csvwriter.writerows(rows)
import sqlite3
import csv
import os
os.remove("cse_students.sqlite")
def returnCount():
x=input()
conn=sqlite3.connect('cse_students.sqlite')
c=conn.cursor()
try:
nos=conn.execute("SELECT [No. of students] from Student_Data where [Category Name]='" + str(x) + "'")
return ((list(nos)[0])[0])
except:
return("INVALID")
def makesqlite():
conn=sqlite3.connect('cse_students.sqlite')
c=conn.cursor()
c.execute("CREATE TABLE Student_Data([Category Name] text,[No. of students] int)")
f=open("count.csv",'r')
sdata=csv.reader(f,delimiter="\t", quotechar=" ")
#print(list(sdata))
for sd in ((list(sdata))[1:]):
c.execute("INSERT INTO Student_Data VALUES('"+ str(sd[0]) + "'," + (sd[1]) +")")
conn.commit()
conn.close()
makesqlite()
while(True):
print(returnCount())
import sqlite3
import csv
import os
os.remove("cse_students.sqlite")
def returnCount():
x=input()
conn=sqlite3.connect('cse_students.sqlite')
c=conn.cursor()
try:
nos=conn.execute("SELECT [No. of students] from Student_Data where [Category Name]='" + str(x) + "'")
return ((list(nos)[0])[0])
except:
return("INVALID")
def makesqlite():
conn=sqlite3.connect('cse_students.sqlite')
c=conn.cursor()
c.execute("CREATE TABLE Student_Data([Category Name] text,[No. of students] int)")
f=open("count.csv",'r')
sdata=csv.reader(f,delimiter="\t", quotechar=" ")
#print(list(sdata))
for sd in ((list(sdata))[1:]):
c.execute("INSERT INTO Student_Data VALUES('"+ str(sd[0]) + "'," + (sd[1]) +")")
conn.commit()
conn.close()
makesqlite()
while(True):
print(returnCount())
import urllib.request, json,random,requests,time
# def rand_float(x):
# sign=random.randint(1,2)
# if (sign==1):
# return float(random.randint(0,x*10000))/10000
# else:
# return -float(random.randint(0,x*10000))/10000
def iss_location():
url="http://api.open-notify.org/iss-now.json"
response=urllib.request.urlopen(url)
data=json.loads(response.read().decode())
x=data["iss_position"]
print("Current Location of ISS:")
print("Latitude : "+x['latitude'])
print("Longitude : "+x['longitude'])
def pass_time():
#lati=rand_float(90)
#long=rand_float(180)
print("Enter Details to know when ISS will pass over a location:")
lati=input("Latitude : ")
long=input("Longitude : ")
#r=requests.get("http://api.open-notify.org/iss-pass.json")
payload={'lat':lati,'lon':long}
r1=requests.get('http://api.open-notify.org/iss-pass.json',params=payload)
url1=r1.url
response=urllib.request.urlopen(url1)
data1=json.loads(response.read().decode())
#print(data1)
data2=(data1['response'])[0]
dur=int(data2['duration'])
dt=time.strftime("%d/%m/%y %H:%M", time.localtime(int(data2['risetime'])))
dt2=dt.split()
#print("Latitude:"+str(lati))
#print("Longitude:"+str(long))
print("Date : "+str(dt2[0]))
print("Time : "+str(dt2[1]))
print("For : "+str(int(dur/60))+" minutes and "+str((dur%60))+" seconds")
def people_info():
url="http://api.open-notify.org/astros.json"
response=urllib.request.urlopen(url)
data=json.loads(response.read().decode())
x=data["people"] #people in space
y=(data["number"])
print("People currently in space:"+str(y))
count=0
for person in x:
print(str(count+1)+". "+(x[count])["name"])
count=count+1
iss_location()
pass_time()
people_info()
Problem2.
Task1.:
We have removed the "Template" students and counted everybody else.
Task3: We need to input Latitude and Longitutde from STDIN
Problem2.
Task1.:
We have removed the "Template" students and counted everybody else.
Task2: We need to manually delete the "cse_students.sqlite" file after running the program every time.
Task3: We need to input Latitude and Longitutde from STDIN
cmake_minimum_required (VERSION 3.5.1)
# Reference: http://derekmolloy.ie/hello-world-introductions-to-cmake/
project (outlab5-p8)
add_executable(helloworld helloworld.cpp)
add_executable(usespthread usespthread.cpp)
# Reference: https://stackoverflow.com/questions/1620918/cmake-and-libpthread
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(usespthread Threads::Threads)
file(GLOB shared_lib "myengine/myengine.cpp")
add_library(MyEngineDynamic SHARED ${shared_lib})
install(TARGETS MyEngineDynamic DESTINATION /usr/local/lib)
file(GLOB static_lib "myengine/myengine.cpp")
add_library(MyEngineStatic STATIC ${static_lib})
install(TARGETS MyEngineStatic DESTINATION /usr/local/lib)
install(FILES "myengine/myengine.hpp" DESTINATION /usr/local/include)
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
#include "myengine.hpp"
int generateRandomNumber() {
int iSecret;
srand(time(NULL));
return rand();
}
#include "myengine.hpp"
int generateRandomNumber() {
int iSecret;
srand(time(NULL));
return rand();
}
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h>
int generateRandomNumber();
\ No newline at end of file
cmake_minimum_required (VERSION 3.5.1)
# Reference: http://derekmolloy.ie/hello-world-introductions-to-cmake/
project (outlab5-p9)
add_executable(mygamestatic mygame.cpp)
target_link_libraries(mygamestatic /usr/local/lib/libMyEngineStatic.a)
add_executable(mygamedynamic mygame.cpp)
target_link_libraries(mygamedynamic /usr/local/lib/libMyEngineDynamic.so)
#include <iostream>
#include <myengine.hpp>
using namespace std;
int main() {
printf("%d\n", generateRandomNumber());
}
helloworld: helloworld.cpp
g++ helloworld.cpp -o helloworld -I.
usespthread: usespthread.cpp
g++ usespthread.cpp -pthread -o usespthread
libMyEngineDynamic.so: myengine/myengine.cpp myengine/myengine.hpp
g++ -fPIC -c myengine/myengine.cpp
g++ -fPIC -shared -o libMyEngineDynamic.so myengine.o
libMyEngineStatic.a: myengine/myengine.cpp myengine/myengine.hpp
g++ -c -fpic myengine/myengine.cpp
ar r libMyEngineStatic.a myengine.o
.PHONY: installdynamic
installdynamic: libMyEngineDynamic.so
sudo cp libMyEngineDynamic.so /usr/local/lib
sudo cp myengine/myengine.hpp /usr/local/include
.PHONY: installstatic
installstatic: libMyEngineStatic.a
sudo cp libMyEngineStatic.a /usr/local/lib
sudo cp myengine/myengine.hpp /usr/local/include
# Great thanks to the following:
# https://stackoverflow.com/questions/4623364/undefined-reference-when-linking-against-a-static-library
mygamestatic: installstatic
g++ -o mygamestatic mygame/mygame.cpp -l MyEngineStatic
mygamedynamic: installdynamic
g++ -o mygamedynamic mygame/mygame.cpp -l MyEngineDynamic
# Removes the intermediate files only
.PHONY: clean
clean:
for file in myengine.o libMyEngineDynamic.so libMyEngineStatic.a mygamestatic mygamedynamic usespthread helloworld ; \
do \
if [ -e "$$file" ] ;\
then \
rm "$$file" ;\
fi; \
done
#include <cstdlib>
#include <pthread.h>
#include <cstdio>
void *print_message_function(void *ptr);
int main() {
pthread_t thread1, thread2;
const char *message1 = "Hi! I am child thread1";
const char *message2 = "Hi! I am child thread2";
int iret1, iret2;
/* Create independent threads each of which will execute function */
iret1 = pthread_create(&thread1, NULL, print_message_function, (void *) message1);
if (iret1) {
fprintf(stderr, "Error - pthread_create() return code: %d\n", iret1);
exit(EXIT_FAILURE);
}
iret2 = pthread_create(&thread2, NULL, print_message_function, (void *) message2);
if (iret2) {
fprintf(stderr, "Error - pthread_create() return code: %d\n", iret2);
exit(EXIT_FAILURE);
}
/* Wait till threads are complete before main continues. Unless we */
/* wait we run the risk of executing an exit which will terminate */
/* the process and all threads before the threads have completed. */
printf("I am the parent thread. I have created two child threads and am waiting for them to complete\n");
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
exit(EXIT_SUCCESS);
}
void *print_message_function(void *ptr) {
char *message;
message = (char *) ptr;
printf("%s \n", message);
}
//#include "functions.h"
int factorial(int n){
if(n!=1){
return(n * factorial(n-1));
}
else return 1;
}
#include "functions.h"
int factorial(int n){
if(n!=1){
return(n * factorial(n-1));
}
else return 1;
}
void print_hello();
int factorial(int n);
#include <iostream>
using namespace std;
//#include "functions.h"
void print_hello(){
cout << "Hello World!";
}
#include <iostream>
using namespace std;
void print_hello(){
cout << "Hello World!";
}
#include <iostream>
using namespace std;
#include "functions.h"
int main(){
print_hello();
cout << endl;
cout << "The factorial of 5 is " << factorial(5) << endl;
return 0;
}
import requests
import getpass
import sys
ph='10.201.250.201'
ph='internet.iitb.ac.in'
if (len(sys.argv) == 2) and 'logout' == sys.argv[1]:
r = requests.get('https://'+ ph)
s = r.content.split('checked="checked"')
t = s[0].rsplit('value=', 1)
ip = t[1].strip(' "')
payload = {'ip':ip, 'button':'Logout'}
r1 = requests.post('https://' + ph + '/logout.php',
cookies=r.cookies, data=payload)
else:
r = requests.get('https://' + ph + '/index.php')
payload = {'uname':input('Username: '),
'passwd':getpass.getpass()}
r1 = requests.post('https: /' + ph + '/index.php',
cookies=r.cookies, data=payload)
cmake_intro
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
\ No newline at end of file
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/cmake-intro.iml" filepath="$PROJECT_DIR$/.idea/cmake-intro.iml" />
</modules>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
#include "myengine.hpp"
int generateRandomNumber() {
int iSecret;
srand(time(NULL));
return rand();
}
#include <stdio.h> /* printf, scanf, puts, NULL */
#include <stdlib.h> /* srand, rand */
#include <time.h>
int generateRandomNumber();
\ No newline at end of file
#include <iostream>
#include <myengine.hpp>
using namespace std;
int main() {
printf("%d\n", generateRandomNumber());
}
#include <cstdlib>
#include <pthread.h>
#include <cstdio>
void *print_message_function(void *ptr);
int main() {
pthread_t thread1, thread2;
const char *message1 = "Hi! I am child thread1";
const char *message2 = "Hi! I am child thread2";
int iret1, iret2;
/* Create independent threads each of which will execute function */
iret1 = pthread_create(&thread1, NULL, print_message_function, (void *) message1);
if (iret1) {
fprintf(stderr, "Error - pthread_create() return code: %d\n", iret1);
exit(EXIT_FAILURE);
}
iret2 = pthread_create(&thread2, NULL, print_message_function, (void *) message2);
if (iret2) {
fprintf(stderr, "Error - pthread_create() return code: %d\n", iret2);
exit(EXIT_FAILURE);
}
/* Wait till threads are complete before main continues. Unless we */
/* wait we run the risk of executing an exit which will terminate */
/* the process and all threads before the threads have completed. */
printf("I am the parent thread. I have created two child threads and am waiting for them to complete\n");
pthread_join(thread1, NULL);
pthread_join(thread2, NULL);
exit(EXIT_SUCCESS);
}
void *print_message_function(void *ptr) {
char *message;
message = (char *) ptr;
printf("%s \n", message);
}
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<Objective-C-extensions>
<file>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" />
</file>
<class>
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" />
<option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" />
</class>
<extensions>
<pair source="cpp" header="h" fileNamingConvention="NONE" />
<pair source="c" header="h" fileNamingConvention="NONE" />
</extensions>
</Objective-C-extensions>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/P1">
<contentRoot DIR="$PROJECT_DIR$" />
</component>
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/outlab5.iml" filepath="$PROJECT_DIR$/.idea/outlab5.iml" />
</modules>
</component>
</project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment