makefile: install the appdata file and fix $appdir only used in uninstall