Update CFLAGS
This commit is contained in:
parent
ebcb013ab0
commit
7a123fba97
3 changed files with 38 additions and 2 deletions
36
1
Normal file
36
1
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
.POSIX:
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
VERSION = 1.0
|
||||||
|
TARGET = lcc
|
||||||
|
PREFIX ?= /usr/local
|
||||||
|
BINDIR = $(PREFIX)/bin
|
||||||
|
|
||||||
|
CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall
|
||||||
|
|
||||||
|
SRC = lcc.c
|
||||||
|
|
||||||
|
$(TARGET): $(SRC)
|
||||||
|
$(CC) $(SRC) -o $@ $(CFLAGS)
|
||||||
|
|
||||||
|
dist:
|
||||||
|
mkdir -p $(TARGET)-$(VERSION)
|
||||||
|
cp -R README.md $(TARGET) $(TARGET)-$(VERSION)
|
||||||
|
tar -cf $(TARGET)-$(VERSION).tar $(TARGET)-$(VERSION)
|
||||||
|
gzip $(TARGET)-$(VERSION).tar
|
||||||
|
rm -rf $(TARGET)-$(VERSION)
|
||||||
|
|
||||||
|
install: $(TARGET)
|
||||||
|
mkdir -p $(DESTDIR)$(BINDIR)
|
||||||
|
cp -p $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||||
|
chmod 755 $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
rm $(DESTDIR)$(BINDIR)/$(TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm $(TARGET)
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
|
||||||
|
.PHONY: all dist install uninstall clean
|
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ TARGET = lcc
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
BINDIR = $(PREFIX)/bin
|
BINDIR = $(PREFIX)/bin
|
||||||
|
|
||||||
CFLAGS = -O3 -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall
|
CFLAGS = -Os -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall
|
||||||
|
|
||||||
SRC = lcc.c
|
SRC = lcc.c
|
||||||
|
|
||||||
|
|
2
lcc.c
2
lcc.c
|
@ -5,7 +5,7 @@
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <limits.h>
|
#include <linux/limits.h>
|
||||||
|
|
||||||
#include "lcc.h"
|
#include "lcc.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue