Makefile compile for specific username

This commit is contained in:
Night Kaly 2024-09-18 08:33:51 +01:00
parent 47fd0968cb
commit 0be02f3954
Signed by: night0721
GPG key ID: 957D67B8DB7A119B

View file

@ -10,6 +10,7 @@ MANPAGE = $(TARGET).1
PREFIX ?= /usr/local PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man/man1 MANDIR = $(PREFIX)/share/man/man1
username ?= default
# Flags # Flags
LDFLAGS = $(shell pkg-config --libs libsodium libnotify ncurses sqlite3) LDFLAGS = $(shell pkg-config --libs libsodium libnotify ncurses sqlite3)
@ -28,7 +29,7 @@ $(SERVER): $(SERVERSRC) $(LIBSRC)
$(CLIENT): $(CLIENTSRC) $(LIBSRC) $(CLIENT): $(CLIENTSRC) $(LIBSRC)
mkdir -p bin mkdir -p bin
$(CC) $(CLIENTSRC) $(LIBSRC) $(INCLUDE) -o bin/$@ $(CFLAGS) $(LDFLAGS) $(CC) $(CLIENTSRC) $(LIBSRC) $(INCLUDE) -DUSERNAME=\"$(username)\" -o bin/$@-$(username) $(CFLAGS) $(LDFLAGS)
dist: dist:
mkdir -p $(TARGET)-$(VERSION) mkdir -p $(TARGET)-$(VERSION)
@ -55,7 +56,4 @@ uninstall:
clean: clean:
$(RM) $(SERVER) $(CLIENT) $(RM) $(SERVER) $(CLIENT)
run:
./bin/zen
.PHONY: all dist install uninstall clean .PHONY: all dist install uninstall clean