blob: cd8b97df08a8413bd849cfce02e2a17f1a572be3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# vim: tabstop=4 shiftwidth=4 noexpandtab
TARGET_EXEC := build/xbot
PREFIX=/usr
INSTALL=install
INSTALL_PROGRAM=$(INSTALL) -m 755
bindir=$(DESTDIR)$(PREFIX)/bin
SRCS := $(wildcard src/*.c)
OBJS := $(patsubst src/%.c, build/%.o, $(SRCS))
LDFLAGS := -lstrophe -liniparser
all: $(TARGET_EXEC)
$(TARGET_EXEC): build/xbot.o
mkdir -p build
$(CC) $(LDFLAGS) -o $@ $<
build/%.o: src/%.c
mkdir -p build
$(CC) -c $< -o $@
install: all
$(INSTALL_PROGRAM) $(TARGET_EXEC) $(bindir)/xbot
uninstall:
rm -f $(bindir)/xbot
.PHONY: clean uninstall
clean:
rm -r build
|