Update Makefile and fix headers
This commit is contained in:
parent
c3f494817e
commit
8b60efea3c
2 changed files with 7 additions and 10 deletions
15
Makefile
15
Makefile
|
@ -1,19 +1,16 @@
|
||||||
.POSIX:
|
.POSIX:
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
||||||
CC = cc
|
|
||||||
VERSION = 1.0
|
VERSION = 1.0
|
||||||
TARGET = ccc
|
TARGET = log
|
||||||
MANPAGE = $(TARGET).1
|
MANPAGE = $(TARGET).1
|
||||||
CONF = config.h
|
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
BINDIR = $(PREFIX)/bin
|
BINDIR = $(PREFIX)/bin
|
||||||
MANDIR = $(PREFIX)/share/man/man1
|
MANDIR = $(PREFIX)/share/man/man1
|
||||||
|
|
||||||
# Flags
|
CFLAGS = -O3 -march=native -mtune=native -pipe -s -flto -std=c99 -pedantic -Wall
|
||||||
CFLAGS = -O3 -march=native -mtune=native -pipe -s -flto -std=c99 -pedantic -Wall -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600
|
|
||||||
|
|
||||||
SRC = $(TARGET).c
|
SRC = log.c
|
||||||
|
|
||||||
$(TARGET): $(SRC) $(CONF)
|
$(TARGET): $(SRC) $(CONF)
|
||||||
$(CC) $(SRC) -o $@ $(CFLAGS)
|
$(CC) $(SRC) -o $@ $(CFLAGS)
|
||||||
|
@ -34,11 +31,11 @@ install: $(TARGET)
|
||||||
chmod 644 $(DESTDIR)$(MANDIR)/$(MANPAGE)
|
chmod 644 $(DESTDIR)$(MANDIR)/$(MANPAGE)
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
$(RM) $(DESTDIR)$(BINDIR)/$(TARGET)
|
rm $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||||
$(RM) $(DESTDIR)$(MANDIR)/$(MANPAGE)
|
rm $(DESTDIR)$(MANDIR)/$(MANPAGE)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) $(TARGET)
|
rm $(TARGET)
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
|
|
2
log.c
2
log.c
|
@ -8,7 +8,7 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <linux/limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue