Update Makefile
This commit is contained in:
parent
4b08e74c3a
commit
21c264c0a1
3 changed files with 78 additions and 79 deletions
13
Makefile
13
Makefile
|
@ -1,7 +1,6 @@
|
||||||
.POSIX:
|
.POSIX:
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
|
|
||||||
CC = cc
|
|
||||||
VERSION = 1.0
|
VERSION = 1.0
|
||||||
TARGET = slr
|
TARGET = slr
|
||||||
MANPAGE = $(TARGET).1
|
MANPAGE = $(TARGET).1
|
||||||
|
@ -9,14 +8,12 @@ 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 -std=c99 -pedantic -Wall
|
||||||
LDFLAGS =
|
|
||||||
CFLAGS = -O3 -march=native -mtune=native -pipe -s -std=c99 -pedantic -Wall -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600
|
|
||||||
|
|
||||||
SRC = slr.c lexer.c parser.c
|
SRC = slr.c lexer.c parser.c
|
||||||
|
|
||||||
$(TARGET): $(SRC)
|
$(TARGET): $(SRC)
|
||||||
$(CC) $(SRC) -o $@ $(CFLAGS) $(LDFLAGS)
|
$(CC) $(SRC) -o $@ $(CFLAGS)
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
mkdir -p $(TARGET)-$(VERSION)
|
mkdir -p $(TARGET)-$(VERSION)
|
||||||
|
@ -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
slr.c
2
slr.c
|
@ -35,3 +35,5 @@ int main(int argc, char **argv)
|
||||||
print_token(tokens[i]);
|
print_token(tokens[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* https://github.com/CobbCoding1/unnamed-lang/commit/10ecba484a0b47110c19b2604500c9ae49f84c52 */
|
||||||
|
|
Loading…
Reference in a new issue