From 0be02f3954c180e6a7799bbe92cff71981d6e6a3 Mon Sep 17 00:00:00 2001 From: night0721 Date: Wed, 18 Sep 2024 08:33:51 +0100 Subject: [PATCH] Makefile compile for specific username --- Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 130729e..fc56a37 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ MANPAGE = $(TARGET).1 PREFIX ?= /usr/local BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man/man1 +username ?= default # Flags LDFLAGS = $(shell pkg-config --libs libsodium libnotify ncurses sqlite3) @@ -28,7 +29,7 @@ $(SERVER): $(SERVERSRC) $(LIBSRC) $(CLIENT): $(CLIENTSRC) $(LIBSRC) mkdir -p bin - $(CC) $(CLIENTSRC) $(LIBSRC) $(INCLUDE) -o bin/$@ $(CFLAGS) $(LDFLAGS) + $(CC) $(CLIENTSRC) $(LIBSRC) $(INCLUDE) -DUSERNAME=\"$(username)\" -o bin/$@-$(username) $(CFLAGS) $(LDFLAGS) dist: mkdir -p $(TARGET)-$(VERSION) @@ -55,7 +56,4 @@ uninstall: clean: $(RM) $(SERVER) $(CLIENT) -run: - ./bin/zen - .PHONY: all dist install uninstall clean