It looks like the install prefix is: /usr/local/
The binaries go into bin/, and include files go into include/, hence the paths:
/usr/local/bin/
/usr/local/include/
Based on both the /usr/local/ prefix, and the version 2.0.8 tag, I'd say it looks like you're seeing a system wide source install. That matches up with what you've said you tried earlier, so probably a good thing.
You should aim for a source install rather than a package manager install. This is because Ubuntu 16.04 has outdated package manager packages, which aren't recent enough. But, since there is a potential for both versions to be installed at the same time, which can lead to confusing situations, I'm going to include info on the package manager packages too, so you can understand your own setup a little better, and debug any problems you might encounter.
Now to the package manager.
I'm afraid I got the package name wrong for the last command. I played around with user generated packaged using
checkinstall on my system, hence I ended up with a self-created "sdl2" package. That had confused me when I was posting earlier.
If you want to see a list of packages matching the pattern "sdl2", use:
The result should include the main development package:
libsdl2-dev - Simple DirectMedia Layer development files
You can get package details with:
For Ubuntu 16.04, it should list version 2.0.4 available, and tell you if it is installed or not. If it is installed, you can get the installed contents of the package with:
Typically that will list a bunch of files under the prefix: /usr/
Hence you should have stuff like:
/usr/bin/sdl2-config
/usr/include/SDL2/SDL.h
/usr/lib/x86_64-linux-gnu/libSDL2.so
There should be many files listed, but only if you have the package manager's package installed, not if you have only a source install.
The prefix and the include folder is the important part for the -I option to g++ or clang, and is returned by
sdl2-config (which exists at separate locations for the package install versus the source install, so you might have both available).
/usr/local/bin/sdl2-config --version
/usr/bin/sdl2-config --version
You may also note there are multiple sdl2 packages listed by
apt-cache search. There are various optional components involved with SDL. There are also binary versus development versions of packages. You need the development versions, which include the source header files to compile against. The development packages have the "-dev" suffix.
Note the development packages include the binary packages as dependencies, so installing the development packages will automatically install the binary packages too. If you just want to run the game, and already have a compiled game executable file, installing the binary packages would be sufficient. That would satisfy the executable's dependencies, and allow it to run.
For OutpostHD the relevant (outdated on Ubuntu 16.04) packages needed to compile are:
libsdl2-dev
libsdl2-mixer-dev
libsdl2-image-dev
libsdl2-ttf-dev
libglew-dev
libphysfs-dev
The last 2 are not SDL related.
If you are doing a source install of SDL, you may need to do a source install of all those SDL packages.
As for the makefile install script, I mean part of the NAS2D library's makefile. It depends on these same packages, and has some code appended to the makefile to build the core SDL2 dependency. In particular, look for the last rule
install-deps-source-sdl2. It shows the download, untar, configure, and make steps for a source build. It just builds locally in a subfolder. It doesn't try to install system wide, though you could do so with
sudo make install. You could adapt this to download and build the other SDL2 packages.