lunabot/Makefile

32 lines
515 B
Makefile
Raw Normal View History

2019-04-27 05:37:22 +00:00
.POSIX:
.SUFFIXES:
CC=cc
CFLAGS=-W -O
LDFLAGS=
LDLIBS=
all: journal
install: journal
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f bin/journal $(DESTDIR)$(PREFIX)/bin
uninstall:
rm $(DESTDIR)$(PREFIX)/bin/journal
# builds for the journal only, other utils might come on later
journal: src/journal/main.o
mkdir -p bin
$(CC) $(LDFLAGS) -o bin/journal src/journal/main.o $(LDLIBS)
src/journal/main.o: src/journal/main.c
clean:
rm bin/journal src/journal/*.o
.SUFFIXES: .c .o
.c.o:
$(CC) $(CFLAGS) -c $< -o $@