File: Makefile

package info (click to toggle)
latencytop 0.4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 96 kB
  • ctags: 83
  • sloc: ansic: 910; makefile: 20
file content (29 lines) | stat: -rw-r--r-- 935 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
DESTDIR =
SBINDIR = /usr/sbin
XCFLAGS = -W `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare 
LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 

#
# The w in -lncursesw is not a typo; it is the wide-character version
# of the ncurses library, needed for multi-byte character languages
# such as Japanese and Chinese etc.
#
# On Debian/Ubuntu distros, this can be found in the
# libncursesw5-dev package. 
#

# We write explicity this "implicit rule"
%.o : %.c
	gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@

latencytop: latencytop.o display.o latencytop.h translate.o Makefile
	gcc $(CFLAGS) latencytop.o display.o translate.o $(LDF) -o latencytop 


clean:
	rm -f *~ latencytop DEADJOE *.o

install: latencytop
	mkdir -p $(DESTDIR)/usr/share/latencytop $(DESTDIR)$(SBINDIR)/
	install -m 0644 latencytop.trans latencytop.block $(DESTDIR)/usr/share/latencytop/
	install -m 0755 latencytop $(DESTDIR)$(SBINDIR)/