This file holds instructions to build this application.

First build the DRM library as described:
   sudo apt install -y git make g++ libcurl4-openssl-dev libjsoncpp-dev cmake
   git clone https://github.com/Accelize/drm.git --recursive --depth 1
   cd drm
   mkdir build
   cd build
   # jsoncpp doesn't have a pkg-config file so you need to provide
   # the include dir setting by hand
   cmake .. -DJSONCPP_INCLUDEDIR=/usr/include/jsoncpp
   make -j 8
   sudo make install

Now the dyplo-accelize-drm-app can be build using the DRM library. 
Build the application by running "make".

Note: The current Makefile will not work when cross-compiled because of the 'hard' CXXFLAGS needed for the JSON library.

To run the application, 2 JSON files are required in the same directory as the executable:
- conf.json : Configuration file, delivered with the package (ex: Dyplo on Alveo package).
- cred.json : Credentials file, downloadable after purchase at the Xilinx App Store.

If you installed the accelize_drm library in its default location
(/usr/local/lib) you'll need to run the application like this:

LD_LIBRARY_PATH=/usr/local/lib ./dyplo-accelize-drm-app

To make sure the application run at boot time, run:
  sudo make install

This installs a udev rule and shell scripts to run the application when the
Dyplo DRM device registers itself.

Note that this requires the "at" command to work.
