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 |
0
|
8 |
|
3
|
9 |
iswydt-bot: iswydt.vala config.vala muc.vala muc_log.vala |
0
|
10 |
$(VALAC) $(VFLAGS) $(VALALIBS) -o $@ $^ |
|
11 |
|
10
|
12 |
cfiles: iswydt.vala config.vala muc.vala muc_log.vala |
|
13 |
$(VALAC) $(VFLAGS) $(VALALIBS) -C $^ |
|
14 |
mkdir -p cfiles |
|
15 |
mv *.c cfiles/ |
|
16 |
cd cfiles |
|
17 |
echo 'LIBS := `pkg-config --libs $(LIBS)`' > cfiles/Makefile |
|
18 |
echo 'CFLAGS := `pkg-config --cflags $(LIBS)`' >> cfiles/Makefile |
|
19 |
echo "iswydt-bot: $(subst vala,c,$^)" >> cfiles/Makefile |
|
20 |
echo ' $$(CC) -o iswydt-bot $$(LIBS) $$(CFLAGS) $$^' >> cfiles/Makefile |
|
21 |
|
|
22 |
.PHONY: cfiles |