This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
forked from nark/wirebot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
137 lines (107 loc) · 3.73 KB
/
Makefile.in
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Makefile.in
abs_top_srcdir = @abs_top_srcdir@
datarootdir = @datarootdir@
exec_prefix = @exec_prefix@
objdir = @objdir@
rundir = @rundir@
bindir = @bindir@
docdir = @docdir@
mandir = @mandir@
prefix = @prefix@
WR_VERSION = @WR_VERSION@
WR_MAINTAINER = @WR_MAINTAINER@
DISTFILES = INSTALL LICENSE NEWS README Makefile Makefile.in \
config.guess config.status config.h.in config.sub configure \
configure.in install-sh libwired man run wirebot
SUBDIRS = libwired
WIREOBJECTS = $(addprefix $(objdir)/wirebot/,$(notdir $(patsubst %.c,%.o,$(shell find $(abs_top_srcdir)/wirebot -name "[a-z]*.c"))))
DEFS = @DEFS@
CC = @CC@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = -L$(rundir)/libwired/lib @LDFLAGS@
LIBS = -lwired @LIBS@ -lcurl
INCLUDES = -I$(abs_top_srcdir) -I$(rundir)/libwired/include
INSTALL = @INSTALL@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
PREPROCESS = $(CC) -E $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
DEPEND = $(CC) -MM $(INCLUDES)
LINK = $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
ARCHIVE = ar rcs $@
.PHONY: all all-recursive clean-recursive distclean-recursive install install-only install-wirebot install-man dist clean distclean scmclean
.NOTPARALLEL:
all: all-recursive $(rundir)/wirebot
ifeq ($(WR_MAINTAINER), 1)
all: Makefile configure config.h.in
Makefile: Makefile.in config.status
./config.status
configure: configure.in
autoconf
config.h.in: configure.in
autoheader
touch $@
rm -f $@~
endif
all-recursive clean-recursive distclean-recursive:
@list='$(SUBDIRS)'; \
for subdir in $$list; do \
target=`echo $@ | sed s/-recursive//`; \
(cd $$subdir && $(MAKE) -e $$target) || exit 1; \
done
$(rundir)/wirebot: $(abs_top_srcdir)/wirebot/wired.xml.h $(WIREOBJECTS) $(rundir)/libwired/lib/libwired.a
@test -d $(@D) || mkdir -p $(@D)
$(LINK) $(WIREOBJECTS) $(LIBS)
$(objdir)/wirebot/%.o: $(abs_top_srcdir)/wirebot/%.c
@test -d $(@D) || mkdir -p $(@D)
$(COMPILE) -I$(<D) -c $< -o $@
$(objdir)/wirebot/%.d: $(abs_top_srcdir)/wirebot/%.c
@test -d $(@D) || mkdir -p $(@D)
($(DEPEND) $< | sed 's,$*.o,$(@D)/&,g'; echo "$@: $<") > $@
$(abs_top_srcdir)/wirebot/wired.xml.h: $(rundir)/wired.xml
sed -e 's/\"/\\\"/g' -e 's/^/\"/g' -e 's/$$/\"/g' $< > $@
install: all install-man install-wirebot
install-only: install-man install-wirebot
install-wirebot:
$(INSTALL) -m 755 -d $(bindir)
$(INSTALL) -m 755 -d $(docdir)/wirebot
$(INSTALL) -m 755 run/wirebot $(bindir)
$(INSTALL) -m 755 wirebot.xml $(docdir)/wirebot/wirebot.xml
@echo ""
@echo "Installation complete!"
@echo ""
@echo "wirebot has been installed as $(bindir)/wirebot."
@echo ""
@echo "Manual pages have been installed into $(mandir)."
@echo ""
@echo "Default dictionnary stored in $(docdir)."
install-man:
$(INSTALL) -m 755 -d $(mandir)/man1/
$(INSTALL) -m 644 man/wirebot.1 $(mandir)/man1/
dist:
rm -rf wirebot-$(WR_VERSION)
rm -f wirebot-$(WR_VERSION).tar.gz
mkdir wirebot-$(WR_VERSION)
@for i in $(DISTFILES); do \
if [ -e $$i ]; then \
echo cp -LRp $$i wirebot-$(WR_VERSION)/$$i; \
cp -LRp $$i wirebot-$(WR_VERSION)/$$i; \
fi \
done
$(SHELL) -ec "cd wirebot-$(WR_VERSION) && WR_MAINTAINER=0 WI_MAINTAINER=0 $(MAKE) -e distclean scmclean"
tar -czf wirebot-$(WR_VERSION).tar.gz wirebot-$(WR_VERSION)
rm -rf wirebot-$(WR_VERSION)
clean: clean-recursive
rm -f $(objdir)/wirebot/*.o
rm -f $(objdir)/*.d
rm -f $(rundir)/wirebot
distclean: clean distclean-recursive
rm -rf $(objdir)
rm -f Makefile config.h config.log config.status
rm -f wirebot-$(WR_VERSION).tar.gz
scmclean:
find . -name .DS_Store -print0 | xargs -0 rm -f
find . -name CVS -print0 | xargs -0 rm -rf
find . -name .svn -print0 | xargs -0 rm -rf
ifeq ($(WR_MAINTAINER), 1)
-include $(WIREOBJECTS:.o=.d)
endif