ifneq ("$(wildcard $(PATH_TO_FILE))","")
FILE_EXISTS = 1
else
FILE_EXISTS = 0
endif
This solution posted above works best. But make sure that you do not stringify the PATH_TO_FILE assignment E.g.,
PATH_TO_FILE = "/usr/local/lib/libhl++.a" # WILL NOT WORK
It must be
PATH_TO_FILE = /usr/local/lib/libhl++.a