Simplifying makefile

This commit is contained in:
Nikola Maric
2020-09-12 23:16:48 +02:00
committed by Nikola Marić
parent 364c825c58
commit a1234aac8a

View File

@@ -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 TIMEOUT ?= 10
INSTALL_DIR := /opt/interception INSTALL_FILE := /opt/interception/interception-pipe-maricn-remap
.PHONY: all # the build target executable:
all: $(TARGETS) TARGET = remap
remap: remap.c all: $(TARGET)
$(CC) $(CFLAGS) $< -o interception-pipe-maricn-remap
$(TARGET): $(TARGET).c
$(CC) $(CFLAGS) -o $(TARGET) $(TARGET).c
.PHONY: clean .PHONY: clean
clean: clean:
rm -f interception-pipe-maricn-remap rm -f $(TARGET)
.PHONY: install .PHONY: install
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. # 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 .PHONY: test
test: test: