0
|
1 |
all: iswydt-bot |
|
2 |
|
|
3 |
VALAC = valac |
10
|
4 |
LIBS := gee-1.0 loudmouth-1.0 |
|
5 |
VALAONLYLIBS := posix |
|
6 |
VALALIBS := $(patsubst %, --pkg %, $(LIBS) $(VALAONLYLIBS)) |
3
|
7 |
VFLAGS = -g |
12
|
8 |
SOURCES = iswydt.vala config.vala simple_iq.vala muc.vala muc_log.vala muc_commands.vala version.vala |
0
|
9 |
|
12
|
10 |
version.vala: . |
|
11 |
echo "static const string IswydtVersion = \"$$(hg id -bnit)\";" > version.vala |
|
12 |
iswydt-bot: $(SOURCES) |
0
|
13 |
$(VALAC) $(VFLAGS) $(VALALIBS) -o $@ $^ |
|
14 |
|
12
|
15 |
cfiles: $(SOURCES) |
10
|
16 |
$(VALAC) $(VFLAGS) $(VALALIBS) -C $^ |
|
17 |
mkdir -p cfiles |
|
18 |
mv *.c cfiles/ |
|
19 |
cd cfiles |
|
20 |
echo 'LIBS := `pkg-config --libs $(LIBS)`' > cfiles/Makefile |
|
21 |
echo 'CFLAGS := `pkg-config --cflags $(LIBS)`' >> cfiles/Makefile |
|
22 |
echo "iswydt-bot: $(subst vala,c,$^)" >> cfiles/Makefile |
|
23 |
echo ' $$(CC) -o iswydt-bot $$(LIBS) $$(CFLAGS) $$^' >> cfiles/Makefile |
|
24 |
|
|
25 |
.PHONY: cfiles |