From 561d3a681d264404ed7c43dc9556d81f04938a4e Mon Sep 17 00:00:00 2001 From: night0721 Date: Sat, 12 Oct 2024 22:04:02 +0100 Subject: [PATCH] Makefile don't take username parameter anymore and fix dist --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d2e19ca..9412f79 100644 --- a/Makefile +++ b/Makefile @@ -10,11 +10,10 @@ 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) -CFLAGS = -O3 -mtune=native -march=native -pipe -g -std=c99 -Wno-pointer-sign -pedantic -Wall -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 $(shell pkg-config --cflags libsodium libnotify ncurses sqlite3) -lpthread +CFLAGS = -O3 -mtune=native -march=native -pipe -s -std=c99 -Wno-pointer-sign -pedantic -Wall -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 $(shell pkg-config --cflags libsodium libnotify ncurses sqlite3) -lpthread SERVERSRC = src/zmr/*.c CLIENTSRC = src/zen/*.c @@ -25,15 +24,15 @@ all: $(SERVER) $(CLIENT) $(SERVER): $(SERVERSRC) $(LIBSRC) mkdir -p bin - $(CC) $(SERVERSRC) $(LIBSRC) $(INCLUDE) -DUSERNAME=\"$(username)\" -o bin/$@ $(CFLAGS) $(LDFLAGS) + $(CC) $(SERVERSRC) $(LIBSRC) $(INCLUDE) -o bin/$@ $(CFLAGS) $(LDFLAGS) $(CLIENT): $(CLIENTSRC) $(LIBSRC) mkdir -p bin - $(CC) $(CLIENTSRC) $(LIBSRC) $(INCLUDE) -DUSERNAME=\"$(username)\" -o bin/$@-$(username) $(CFLAGS) $(LDFLAGS) + $(CC) $(CLIENTSRC) $(LIBSRC) $(INCLUDE) -o bin/$@ $(CFLAGS) $(LDFLAGS) dist: mkdir -p $(TARGET)-$(VERSION) - cp -R README.md $(MANPAGE) $(SERVER) $(CLIENT) $(TARGET)-$(VERSION) + cp -R README.md $(MANPAGE) bin/$(SERVER) bin/$(CLIENT) $(TARGET)-$(VERSION) tar -cf $(TARGET)-$(VERSION).tar $(TARGET)-$(VERSION) gzip $(TARGET)-$(VERSION).tar rm -rf $(TARGET)-$(VERSION)