wmcore: use CPPFLAGS and LDFLAGS.
[dockapps.git] / wmbattery / Makefile.in
blob5b9a3a32b340444c48f4a4de30188522dce6f85c
1 # Info for make, this will be preprocessed by autoconf.
2 prefix = @prefix@
3 exec_prefix = @exec_prefix@
4 datarootdir = @datarootdir@
5 bindir = @bindir@
6 icondir = @datadir@/icons/wmbattery
7 man1dir = @mandir@/man1
8 srcdir = @srcdir@
10 PACKAGE_NAME = @PACKAGE_NAME@
11 PACKAGE_TARNAME = @PACKAGE_TARNAME@
12 PACKAGE_VERSION = @PACKAGE_VERSION@
14 CC = @CC@
15 CFLAGS = @CFLAGS@ -Wall @Xlib_CFLAGS@ @Xext_CFLAGS@ @libXpm_CFLAGS@
16 CPPFLAGS = @CPPFLAGS@ -DACPI_APM -DICONDIR=\"$(icondir)\"
17 INSTALL = @INSTALL@
18 INSTALL_DATA = @INSTALL_DATA@
19 INSTALL_PROGRAM = @INSTALL_PROGRAM@
20 LDFLAGS = @LDFLAGS@
21 LIBS = @LIBS@ @Xlib_LIBS@ @Xext_LIBS@ @libXpm_LIBS@
22 USE_HAL = @USE_HAL@
23 USE_UPOWER = @USE_UPOWER@
25 all: wmbattery
27 clean:
28 rm -f wmbattery *.o
30 distclean: clean
31 rm -rf autom4te.cache config.status config.cache config.log config.h \
32 Makefile
34 install: all
35 $(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(icondir)
36 $(INSTALL_PROGRAM) wmbattery $(DESTDIR)$(bindir)
37 $(INSTALL_DATA) $(srcdir)/wmbattery.1 $(DESTDIR)$(man1dir)/wmbattery.1
38 $(INSTALL_DATA) $(srcdir)/*.xpm $(DESTDIR)$(icondir)
40 uninstall:
41 rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1 $(icondir)
43 dist:
44 @test -d $(PACKAGE_NAME)-$(PACKAGE_VERSION) \
45 && rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION) || :
46 @$(INSTALL) -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)
47 @$(INSTALL) -d $(PACKAGE_NAME)-$(PACKAGE_VERSION)/autoconf
48 @find . -type f \
49 ! -name autogen ! -name configure ! -name .gitignore \
50 ! -name config.status ! -name config.cache ! -name config.log \
51 ! -name config.h ! -name Makefile \
52 ! -name $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz \
53 ! -path './autoconf/*' \
54 ! -path './autom4te.cache/*' \
55 ! -path './$(PACKAGE_NAME)-$(PACKAGE_VERSION)/*' \
56 -exec $(INSTALL_DATA) '{}' $(PACKAGE_NAME)-$(PACKAGE_VERSION) \;
57 @$(INSTALL_PROGRAM) autogen configure $(PACKAGE_NAME)-$(PACKAGE_VERSION)
58 @$(INSTALL_PROGRAM) autoconf/install-sh $(PACKAGE_NAME)-$(PACKAGE_VERSION)/autoconf
59 @tar cf - $(PACKAGE_NAME)-$(PACKAGE_VERSION) \
60 | gzip >$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz
61 @rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION)
63 OBJS=wmbattery.o acpi.o sonypi.o
65 ifdef USE_HAL
66 CPPFLAGS += -DHAL
67 CFLAGS += @hal_CFLAGS@
68 LIBS += @hal_LIBS@
69 OBJS += simplehal.o
70 simplehal.o: simplehal.c
71 $(CC) $(CPPFLAGS) $(CFLAGS) -c simplehal.c -o simplehal.o
72 endif
74 ifdef USE_UPOWER
75 CPPFLAGS += -DUPOWER
76 CFLAGS += @upower_CFLAGS@
77 LIBS += @upower_LIBS@
78 OBJS += upower.o
79 upower.o: upower.c
80 $(CC) $(CPPFLAGS) $(CFLAGS) -c upower.c -o upower.o
81 endif
83 wmbattery: $(OBJS)
84 $(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)
86 wmbattery.o: wmbattery.c wmbattery.h