lunabot/Makefile

38 lines
660 B
Makefile
Raw Normal View History

2019-04-27 05:37:22 +00:00
.POSIX:
.SUFFIXES:
CC=cc
CFLAGS=-W -O
LDFLAGS=
LDLIBS=
PREFIX=/usr/local
all: ensure_bin journal
ensure_bin: bin
mkdir -p bin
2019-04-27 05:37:22 +00:00
install: journal
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f bin/journal $(DESTDIR)$(PREFIX)/bin
uninstall:
rm $(DESTDIR)$(PREFIX)/bin/journal
# currently we only have one journal util, others may come later
2019-04-27 06:49:04 +00:00
journal: src/journal/main.o src/journal/emotion.o
$(CC) $(LDFLAGS) -o bin/journal \
src/journal/main.o src/journal/emotion.o $(LDLIBS)
2019-04-27 05:37:22 +00:00
2019-04-27 06:49:04 +00:00
src/journal/emotion.o: src/journal/emotion.c
2019-04-27 05:37:22 +00:00
src/journal/main.o: src/journal/main.c
clean:
rm bin/journal src/journal/*.o
.SUFFIXES: .c .o
.c.o:
$(CC) $(CFLAGS) -c $< -o $@