# 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) -o $@ $< $(LDFLAGS) build/%.o: src/%.c mkdir -p build $(CC) -c $< -o $@ install: all mkdir -p $(HOME)/.config/xbot/ touch $(HOME)/.config/xbot/profile.ini chmod 600 $(HOME)/.config/xbot/profile.ini $(INSTALL_PROGRAM) $(TARGET_EXEC) $(bindir)/xbot uninstall: rm -f $(bindir)/xbot clean: rm -r build .PHONY: all install uninstall clean