File: Makefile

package info (click to toggle)
wmbattery 2.41
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 240 kB
  • sloc: ansic: 1,182; sh: 152; makefile: 37
file content (42 lines) | stat: -rw-r--r-- 968 bytes parent folder | download | duplicates (3)
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
include makeinfo

all: wmbattery

clean:
	rm -f wmbattery *.o

distclean: clean
	rm -f config.status config.cache config.log makeinfo config.h configure

install: all
	$(INSTALL) -d $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) $(DESTDIR)$(icondir)
	$(INSTALL_PROGRAM) wmbattery $(DESTDIR)$(bindir)
	$(INSTALL_DATA) $(srcdir)/wmbattery.1x $(DESTDIR)$(man1dir)/wmbattery.1x
	$(INSTALL_DATA) $(srcdir)/*.xpm $(DESTDIR)$(icondir)

uninstall:
	rm -rf $(bindir)/wmbattery $(man1dir)/wmbattery.1x $(icondir)

OBJS=wmbattery.o acpi.o sonypi.o

ifdef USE_HAL
LIBS+=$(shell pkg-config --libs hal)
OBJS+=simplehal.o
CFLAGS+=-DHAL
simplehal.o: simplehal.c
	$(CC) $(CFLAGS) $(shell pkg-config --cflags hal) -c simplehal.c -o simplehal.o
endif

wmbattery: $(OBJS)
	$(CC) -o wmbattery $(LDFLAGS) $(OBJS) $(LIBS)

wmbattery.o: wmbattery.c wmbattery.h

configure: configure.ac
	autoconf

config.status: configure
	./configure

makeinfo: autoconf/makeinfo.in config.status
	./config.status