only print debug output when XCHATDEBUG env variable is set
[rofl0r-ixchat.git] / Makefile
blobd1f54d3f17a2f708bc2467492cdde78389cd8001
1 # Use config.mak to override any of the following variables.
2 # Do not make changes here.
5 exec_prefix = /usr/local
6 bindir = $(exec_prefix)/bin
8 prefix = /usr/local/
9 includedir = $(prefix)/include
10 libdir = $(prefix)/lib
12 SRCS = $(sort $(wildcard src/common/*.c src/fe-gtk/*.c))
13 OBJS = $(SRCS:.c=.o)
15 CFLAGS += -Os
17 ALL_TOOLS=ixchat
19 PIXMAP=src/pixmaps/inline_pngs.h
20 _PNGS = message.png highlight.png fileoffer.png book.png hop.png op.png purple.png red.png voice.png
21 pixsrcdir=src/pixmaps
22 PNGS = $(pixsrcdir)/message.png $(pixsrcdir)/highlight.png $(pixsrcdir)/fileoffer.png \
23 $(pixsrcdir)/book.png $(pixsrcdir)/hop.png $(pixsrcdir)/op.png $(pixsrcdir)/purple.png \
24 $(pixsrcdir)/red.png $(pixsrcdir)/voice.png
26 PIXMAPLIST = traymsgpng $(pixsrcdir)/message.png \
27 trayhilightpng $(pixsrcdir)/highlight.png \
28 trayfilepng $(pixsrcdir)/fileoffer.png \
29 bookpng $(pixsrcdir)/book.png \
30 hoppng $(pixsrcdir)/hop.png \
31 oppng $(pixsrcdir)/op.png \
32 purplepng $(pixsrcdir)/purple.png \
33 redpng $(pixsrcdir)/red.png \
34 voicepng $(pixsrcdir)/voice.png \
35 xchatpng $(pixsrcdir)/../../xchat.png
37 PERL_HEADERS = plugins/perl/irc.pm.h plugins/perl/xchat.pm.h
39 -include config.mak
41 all: $(ALL_TOOLS) $(PLUGINS)
43 install: $(ALL_TOOLS:%=$(DESTDIR)$(bindir)/%) install-plugins
45 install-plugins: $(PLUGINS:%=$(DESTDIR)$(libdir)/xchat/plugins/%)
47 $(DESTDIR)$(libdir)/xchat/plugins/%: %
48 install -D $< $@
50 $(PERL_HEADERS):
51 plugins/perl/generate_header
53 tcl.so: plugins/tcl/tcl.o
54 $(CC) $< -shared -rdynamic -o $@ $(LDFLAGS) $(TCL_LDFLAGS)
56 plugins/tcl/tcl.o: plugins/tcl/tclplugin.c
57 $(CC) $(CFLAGS) $(TCL_CFLAGS) -fPIC -c $< -o $@
59 python.so: plugins/python/python.o
60 $(CC) $< -shared -rdynamic -o $@ $(LDFLAGS) $(PY_LDFLAGS)
62 plugins/python/python.o: plugins/python/python.c
63 $(CC) $(CFLAGS) $(PY_CFLAGS) -fPIC -c $< -o $@
65 perl.so: plugins/perl/perl.o
66 $(CC) $< -shared -rdynamic -o $@ $(LDFLAGS) $(PERL_LDFLAGS)
68 plugins/perl/perl.o: plugins/perl/perl.c $(PERL_HEADERS)
69 $(CC) $(CFLAGS) $(PERL_CFLAGS) -fPIC -c $< -o $@
71 ixchat: $(OBJS)
72 $(CC) $(LDFLAGS) -o ixchat $(OBJS)
74 clean:
75 rm -f $(OBJS)
76 rm -f $(PIXMAP)
77 rm -f $(ALL_TOOLS)
78 rm -f $(PERL_HEADERS)
79 rm -f $(PLUGINS)
80 rm -f plugins/perl/*.o
81 rm -f plugins/python/*.o
82 rm -f plugins/tcl/*.o
84 $(PIXMAP): $(PNGS)
85 $(PIXMAPCONVERT) --raw --build-list $(PIXMAPLIST) > $(PIXMAP)
87 %.o: %.c $(PIXMAP)
88 $(CC) $(CFLAGS) -c -o $@ $<
90 $(DESTDIR)$(bindir)/%: %
91 install -D $< $@
93 $(DESTDIR)$(prefix)/%: %
94 install -D -m 644 $< $@
96 .PHONY: all clean install