vipre-cryptor/Makefile
2025-12-28 19:43:22 +04:00

57 lines
1.5 KiB
Makefile

#
# Makefile
#
# Copyright 2025
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
#
CC=gcc
OPTIONS=-O2 -Wall -ansi
OUTPUT_NAME=vipre-cryptor
COPY=cp
INPUT_NAME=vipre-cryptor.c
REMOVE=rm
INSTALL_NAME=/usr/local/bin/vipre-cryptor
MODE=chmod +x
RUN_OF=./
API_NAME=api_example.c
API_OUT_NAME=api_example
.PHONY: clear run install uninstall update api run-api $(OUTPUT_NAME)
$(OUTPUT_NAME): $(INPUT_NAME)
$(CC) $(OPTIONS) $(INPUT_NAME) -o $(OUTPUT_NAME)
api:
$(CC) $(OPTIONS) $(API_NAME) -o $(API_OUT_NAME)
clear:
$(REMOVE) -f $(OUTPUT_NAME)
$(REMOVE) -f $(API_OUT_NAME)
run:
$(MODE) $(OUTPUT_NAME)
$(RUN_OF)$(OUTPUT_NAME)
run-api:
$(MODE) $(API_OUT_NAME)
$(RUN_OF)$(API_OUT_NAME)
install:
$(COPY) $(OUTPUT_NAME) $(INSTALL_NAME)
uninstall:
$(REMOVE) $(INSTALL_NAME)
update:
$(REMOVE) -f $(INSTALL_NAME)
$(COPY) $(OUTPUT_NAME) $(INSTALL_NAME)