From a1234aac8a1fc48672d94fbc04b25313a9dc5d1b Mon Sep 17 00:00:00 2001 From: Nikola Maric <3995223+maricn@users.noreply.github.com> Date: Sat, 12 Sep 2020 23:16:48 +0200 Subject: [PATCH] Simplifying makefile --- Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f3a808a..57f7021 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,24 @@ -CFLAGS += -std=c99 -D_POSIX_C_SOURCE=199309L -O3 -g -Wall -Wextra -Werror -Wno-type-limits +CFLAGS += -c -std=c99 -D_POSIX_C_SOURCE=199309L -O3 -g -Wall -Wextra -Werror -Wno-type-limits TIMEOUT ?= 10 -INSTALL_DIR := /opt/interception +INSTALL_FILE := /opt/interception/interception-pipe-maricn-remap -.PHONY: all -all: $(TARGETS) +# the build target executable: +TARGET = remap -remap: remap.c - $(CC) $(CFLAGS) $< -o interception-pipe-maricn-remap +all: $(TARGET) + +$(TARGET): $(TARGET).c + $(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c .PHONY: clean clean: - rm -f interception-pipe-maricn-remap + rm -f $(TARGET) .PHONY: install install: # If you have run `make test` then do not forget to run `make clean` after. Otherwise you may install with debug logs on. - install -D --strip -t $(INSTALL_DIR) interception-pipe-maricn-remap + install -D --strip -T $(INSTALL_FILE) $(TARGET) .PHONY: test test: