### This Makefile can be used as a template for writing MessageAPI compatible C/C++ conditions that extend the
# NativeCondition.
# Note that the goal of native condition production is to create a shared library,
# as shared libraries are used by the Java code. Once produced, the fully-qualified shared library should just be referenced in the
# config map for the condition itself. If you are reading this, you most likely understand what is necessary, but if not, see the example
# 'native condition' in the MessageAPI source code 'test' namespace with associated parameter map.
# The majority of this Makefile is standard, with only six user specified variables. These are denoted by the comment USER SPECIFIED.
# All user specified variables are at the top of this makefile. The build process is standardized to automatically include MessageAPI resources,
# So if there is an issue at first, make sure you have installed the library correctly (need $MESSAGEAPI_SRC and $MESSAGEAPI_HEADERS env vars).
# There are a few other system-specific requirements and other notable things to keep in mind when using this Makefile:
## 1. You must have a JDK installed (not JRE). This library requires the jni.h and jnimd.h headers included in your jdk.
## 2. JAVA_HOME must be set to your JDK home directory (one level above the java binary). This Makefile references JAVA_HOME in looking for jni.h and jnimd.h
#USER SPECIFIED - Specify where the library will build to. The library itself will be placed in $BUILD_DIR/compile
BUILD_DIR=
#USER SPECIFIED - Specify the base name of the lib (e.g., if lib to be built as libMyCondition.so, put MyCondition here)
LIBRARY_NAME=
#USER SPECIFIED - Specify The next two lines with Fully Qualified paths to your C source (if any) and headers (if any) in dependency order.
#he last C file should correspond to the Messageapi endpoint wrapper (the header is in the $MESSAGEAPI_HEADERS dir and is auto-included).
#This C file is the entry point for the library. See $MESSAGEAPI_HEADERS/gov_noaa_messageapi_conditions_NativeCondition.h for the signature of
#the class that must be wrapped.
USER_C_SRC_FILES=
USER_C_H_FILES=
#USER SPECIFIED - Specify The next two lines with Fully Qualified paths to your C++ source (if any) and headers (if any) in dependency order.
USER_CPP_SRC_FILES=
USER_CPP_H_FILES=
############### The next sections are usually default. You can also contact the MessageAPI maintainers for help if there are issues. ###################
COMPILE_DIR=$(BUILD_DIR)/compile#.o and .so files produced here
HEADER_DIR=$(BUILD_DIR)/headers#.h files copied here before build (for central include path)
SO_NAME=lib$(LIBRARY_NAME).so
#The following represent directories for JNI Libraries that must be included during C and CPP compilation.
#The following represent a standard RHEL 7/8 system with OpenJDK.
### This Makefile can be used as a template for writing MessageAPI compatible C/C++ conditions that extend the
# NativeCondition.
# Note that the goal of native condition production is to create a shared library,
# as shared libraries are used by the Java code. Once produced, the fully-qualified shared library should just be referenced in the
# config map for the condition itself. If you are reading this, you most likely understand what is necessary, but if not, see the example
# 'native condition' in the MessageAPI source code 'test' namespace with associated parameter map.
# The majority of this Makefile is standard, with only six user specified variables. These are denoted by the comment USER SPECIFIED.
# All user specified variables are at the top of this makefile. The build process is standardized to automatically include MessageAPI resources,
# So if there is an issue at first, make sure you have installed the library correctly (need $MESSAGEAPI_SRC and $MESSAGEAPI_HEADERS env vars).
# There are a few other system-specific requirements and other notable things to keep in mind when using this Makefile:
## 1. You must have a JDK installed (not JRE). This library requires the jni.h and jnimd.h headers included in your jdk.
## 2. JAVA_HOME must be set to your JDK home directory (one level above the java binary). This Makefile references JAVA_HOME in looking for jni.h and jnimd.h
#The following is used to bootstrap the PROJECT_ROOT
CURRENT_DIR=$(PWD)
#The following represents the root project path. In this tailored example, we use a relative path to the project root.
#In your own Makefile, this variable can be set directly.