From 09d84cd0872283d47dc9c6c763d505d37f58eff8 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Sun, 15 Sep 2024 22:53:45 +0300 Subject: [PATCH] Makefile respect variables which is already set --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c079598..edf6104 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -TARGET = ciadpi +TARGET ?= ciadpi -CPPFLAGS = -D_DEFAULT_SOURCE +CPPFLAGS ?= -D_DEFAULT_SOURCE CFLAGS += -I. -std=c99 -Wall -Wno-unused -O2 WIN_LDFLAGS = -lws2_32 -lmswsock @@ -10,8 +10,8 @@ WIN_SRC = win_service.c OBJ = $(SRC:.c=.o) WIN_OBJ = $(WIN_SRC:.c=.o) -PREFIX := /usr/local -INSTALL_DIR := $(DESTDIR)$(PREFIX)/bin/ +PREFIX ?= /usr/local +INSTALL_DIR ?= $(DESTDIR)$(PREFIX)/bin/ all: $(TARGET)