From 8b60efea3c692a1ed67aea1ce65656281958662d Mon Sep 17 00:00:00 2001 From: night0721 Date: Tue, 22 Oct 2024 01:18:18 +0100 Subject: [PATCH] Update Makefile and fix headers --- Makefile | 15 ++++++--------- log.c | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 92a202c..5bdacd0 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,16 @@ .POSIX: .SUFFIXES: -CC = cc VERSION = 1.0 -TARGET = ccc +TARGET = log MANPAGE = $(TARGET).1 -CONF = config.h PREFIX ?= /usr/local BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man/man1 -# Flags -CFLAGS = -O3 -march=native -mtune=native -pipe -s -flto -std=c99 -pedantic -Wall -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 +CFLAGS = -O3 -march=native -mtune=native -pipe -s -flto -std=c99 -pedantic -Wall -SRC = $(TARGET).c +SRC = log.c $(TARGET): $(SRC) $(CONF) $(CC) $(SRC) -o $@ $(CFLAGS) @@ -34,11 +31,11 @@ install: $(TARGET) chmod 644 $(DESTDIR)$(MANDIR)/$(MANPAGE) uninstall: - $(RM) $(DESTDIR)$(BINDIR)/$(TARGET) - $(RM) $(DESTDIR)$(MANDIR)/$(MANPAGE) + rm $(DESTDIR)$(BINDIR)/$(TARGET) + rm $(DESTDIR)$(MANDIR)/$(MANPAGE) clean: - $(RM) $(TARGET) + rm $(TARGET) all: $(TARGET) diff --git a/log.c b/log.c index a4af351..88f28cd 100644 --- a/log.c +++ b/log.c @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include "config.h"