Portable (Linux, Cygwin,...) Makefile for my own Shell OpenSSL file en-/decryption scripts
The check target always succeeds (because the last command in the pipeline is echo).  We'd like it to fail if any of the tests fail, so we should just write them one per line.  Instead of testing for the existence of the files, we should make the check target depend on them:
check: $(script_name_1)  $(script_name_2)
    sha512sum --check SHA512SUMS
    @echo &quot;OK: Files are prepared. You may use make install command now.&quot;

BTW, script_name_1 and script_name_2 are completely unhelpful variable names.  How about encrypt and decrypt, for example?

I think the install target should depend on check - we really don't want to install if the check fails:
install: check


I'm not convinced that this is a good thing:
user_id=$(shell whoami)
group_id=$(shell id -gn)

When we install software, we normally make it owned by an appropriate user on the system, not the person doing the installing.  In most cases, programs are owned by root, so that no ordinary user can accidentally overwrite them (or any other harmful action).

Make provides a $(RM) definition to give you a more portable command for deleting files.

It's great that you've thought about install location and about overridability of such parameters.  You probably ought to know the conventional variables that are used for these:

DESTDIR specifies where the root directory is.  This is usually empty, but packaging tools set this to a suitable working directory to build a (partial) filesystem image that can be archived.
PREFIX works somewhat like your DESTDIR or install_path (I'm not sure why you have two names for the same thing).


This is a rare Makefile that doesn't need .DELETE_ON_ERROR: (since it contains no non-PHONY targets).

Modified code
This is what I ended up with:
PREFIX = /usr/local

install_path = $(DESTDIR)$(PREFIX)/bin

encrypt = encrypt-file-aes256
decrypt = decrypt-file-aes256

check: $(encrypt)  $(decrypt)
    sha512sum --check SHA512SUMS
    @echo &quot;OK: Files are prepared. You may use make install command now.&quot;

install: check
    install --d -D $(install_path)
    install -m 0755 -t $(install_path) $(encrypt) $(decrypt)

uninstall:
    $(RM) $(install_path)/$(encrypt) $(install_path)/$(decrypt)


.PHONY: check install uninstall

Note that Make variables specified on the command line will override those in the Makefile, so you can write
make install PREFIX=&quot;$(HOME)/testing&quot;

to install to your test directory, for example.