Make Makefile more compliant with conventions

CC is now assigned with `?=` to gcc, added install target,
PREFIX is respected in install target
and assigned with ?= to default to /usr/local/bin/.
tranquillity-codes 2 weeks ago
parent 08b3868de1
commit 74806f38d2

@ -1,9 +1,11 @@
.PHONY: all clean
CC = gcc
CC ?= gcc
CLIBS = -lwayland-client
CFLAGS = $(CLIBS)
PREFIX ?= /usr/local/bin/
SRC = main.c
OUT = wl-globals
@ -12,5 +14,8 @@ all: $(OUT)
clean:
rm -f $(OUT)
install:
cp $(OUT) $(PREFIX)
$(OUT): $(SRC)
$(CC) $(SRC) $(CFLAGS) -o $(OUT)

Loading…
Cancel
Save