You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/no-more-secrets/files/no-more-secrets-0.3.3-respe...

49 lines
1.4 KiB

--- a/Makefile 2020-11-05 09:12:07.420199828 +0200
+++ b/Makefile 2020-11-05 09:13:08.652973506 +0200
@@ -1,5 +1,5 @@
# Installation directories following GNU conventions
-prefix ?= /usr/local
+prefix = /usr
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
sbindir = $(exec_prefix)/sbin
@@ -12,29 +12,30 @@
OBJ=obj
SRC=src
-CC ?= gcc
-CFLAGS ?= -Wextra -Wall
+export CC
+export CFLAGS
+export LDFLAGS
.PHONY: all install uninstall clean
nms: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
- $(CC) $(CFLAGS) -o $(BIN)/$@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/$@ $^
sneakers: $(OBJ)/nmscharset.o $(OBJ)/nmstermio.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
- $(CC) $(CFLAGS) -o $(BIN)/$@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/$@ $^
all: nms sneakers
all-ncurses: nms-ncurses sneakers-ncurses
nms-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/nms.o | $(BIN)
- $(CC) $(CFLAGS) -o $(BIN)/nms $^ -lncurses
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/nms $^ -lncurses
sneakers-ncurses: $(OBJ)/nmscharset.o $(OBJ)/nmstermio_ncurses.o $(OBJ)/nmseffect.o $(OBJ)/sneakers.o | $(BIN)
- $(CC) $(CFLAGS) -o $(BIN)/sneakers $^ -lncurses
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/sneakers $^ -lncurses
$(OBJ)/%.o: $(SRC)/%.c | $(OBJ)
- $(CC) $(CFLAGS) -o $@ -c $<
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -c $<
$(BIN):
mkdir $(BIN)