File: Makefile

package info (click to toggle)
wmshutdown 0.2-9
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 176 kB
  • sloc: ansic: 408; makefile: 64
file content (37 lines) | stat: -rw-r--r-- 1,155 bytes parent folder | download
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

LDFLAGS += -Wl,--no-add-needed -Wl,--no-undefined
INCFLAGS = -I/usr/include/gtk-2.0
LIBS	 = -lX11

# The listing "pkg-config --libs gtk+-2.0" can be trimmed down to needed libs
GTKLIBS  =  $(shell perl -e' print join qq( ), grep /(-x11|gobject|glib)/, @ARGV' -- $$(pkg-config --libs gtk+-2.0) )
GTKFLAGS = `pkg-config --cflags gtk+-2.0`

all: dock shutdown

help:
	@echo "wmShutdown version 0.1 - Rafael V. Aroca <rafael@linuxqos.cjb.net>"
	@echo "Order of makes to install: dock, shutdown, install"

clean:
	rm -f wmShutdown.o  
	rm -f wmShutdown
	rm -f Shutdown

install:
	install -m 755 wmShutdown $(DESTDIR)/usr/bin/wmshutdown
	install -m 644 wmShutdown.xpm $(DESTDIR)/usr/share/pixmaps/wmshutdown.xpm
	install -m 755 Shutdown $(DESTDIR)/usr/bin/wmshutdown-run

uninstall:
	rm -f /bin/wmShutdown
	rm -f /bin/Shutdown
	rm -f /usr/share/pixmaps/wmShutdown.xpm
	@echo ":-( Uninstalled."

dock: wmShutdown.c
	$(CC) $(CFLAGS) $(CPPFLAGS) $(INCFLAGS) $(GTKFLAGS) -c -o wmShutdown.o wmShutdown.c
	$(CC) $(LDFLAGS) -o wmShutdown wmShutdown.o $(GTKLIBS) $(LIBS)

shutdown: shutdown.c
	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(INCFLAGS) -o Shutdown shutdown.c