17a192d395ce5d7e5945afa684146d5b0abc53480mblighBINDIR=/usr/bin
27a192d395ce5d7e5945afa684146d5b0abc53480mblighLOCALESDIR=/usr/share/locale
37a192d395ce5d7e5945afa684146d5b0abc53480mblighMANDIR=/usr/share/man/man1
47a192d395ce5d7e5945afa684146d5b0abc53480mblighWARNFLAGS=-Wall  -W -Wshadow
57a192d395ce5d7e5945afa684146d5b0abc53480mblighCFLAGS?=-O1 -g ${WARNFLAGS}
67a192d395ce5d7e5945afa684146d5b0abc53480mblighCC?=gcc
77a192d395ce5d7e5945afa684146d5b0abc53480mbligh
87a192d395ce5d7e5945afa684146d5b0abc53480mbligh
97a192d395ce5d7e5945afa684146d5b0abc53480mbligh# 
107a192d395ce5d7e5945afa684146d5b0abc53480mbligh# The w in -lncursesw is not a typo; it is the wide-character version
117a192d395ce5d7e5945afa684146d5b0abc53480mbligh# of the ncurses library, needed for multi-byte character languages
127a192d395ce5d7e5945afa684146d5b0abc53480mbligh# such as Japanese and Chinese etc.
137a192d395ce5d7e5945afa684146d5b0abc53480mbligh#
147a192d395ce5d7e5945afa684146d5b0abc53480mbligh# On Debian/Ubuntu distros, this can be found in the
157a192d395ce5d7e5945afa684146d5b0abc53480mbligh# libncursesw5-dev package. 
167a192d395ce5d7e5945afa684146d5b0abc53480mbligh#
177a192d395ce5d7e5945afa684146d5b0abc53480mbligh
187a192d395ce5d7e5945afa684146d5b0abc53480mblighOBJS = powertop.o config.o process.o misctips.o bluetooth.o display.o suggestions.o wireless.o cpufreq.o \
197a192d395ce5d7e5945afa684146d5b0abc53480mbligh	sata.o xrandr.o ethernet.o cpufreqstats.o usb.o urbnum.o intelcstates.o
207a192d395ce5d7e5945afa684146d5b0abc53480mbligh	
217a192d395ce5d7e5945afa684146d5b0abc53480mbligh
227a192d395ce5d7e5945afa684146d5b0abc53480mblighpowertop: $(OBJS) Makefile powertop.h
237a192d395ce5d7e5945afa684146d5b0abc53480mbligh	$(CC) ${CFLAGS}  $(OBJS) -lncursesw -o powertop
247a192d395ce5d7e5945afa684146d5b0abc53480mbligh	@(cd po/ && $(MAKE))
257a192d395ce5d7e5945afa684146d5b0abc53480mbligh
267a192d395ce5d7e5945afa684146d5b0abc53480mblighpowertop.1.gz: powertop.1
277a192d395ce5d7e5945afa684146d5b0abc53480mbligh	gzip -c $< > $@
287a192d395ce5d7e5945afa684146d5b0abc53480mbligh
297a192d395ce5d7e5945afa684146d5b0abc53480mblighinstall: powertop powertop.1.gz
307a192d395ce5d7e5945afa684146d5b0abc53480mbligh	mkdir -p ${DESTDIR}${BINDIR}
317a192d395ce5d7e5945afa684146d5b0abc53480mbligh	cp powertop ${DESTDIR}${BINDIR}
327a192d395ce5d7e5945afa684146d5b0abc53480mbligh	mkdir -p ${DESTDIR}${MANDIR}
337a192d395ce5d7e5945afa684146d5b0abc53480mbligh	cp powertop.1.gz ${DESTDIR}${MANDIR}
347a192d395ce5d7e5945afa684146d5b0abc53480mbligh	@(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@)
357a192d395ce5d7e5945afa684146d5b0abc53480mbligh
367a192d395ce5d7e5945afa684146d5b0abc53480mbligh# This is for translators. To update your po with new strings, do :
377a192d395ce5d7e5945afa684146d5b0abc53480mbligh# svn up ; make uptrans LG=fr # or de, ru, hu, it, ...
387a192d395ce5d7e5945afa684146d5b0abc53480mblighuptrans:
397a192d395ce5d7e5945afa684146d5b0abc53480mbligh	xgettext -C -s -k_ -o po/powertop.pot *.c *.h
407a192d395ce5d7e5945afa684146d5b0abc53480mbligh	@(cd po/ && env LG=$(LG) $(MAKE) $@)
417a192d395ce5d7e5945afa684146d5b0abc53480mbligh
427a192d395ce5d7e5945afa684146d5b0abc53480mblighclean:
437a192d395ce5d7e5945afa684146d5b0abc53480mbligh	rm -f *~ powertop powertop.1.gz po/powertop.pot DEADJOE svn-commit* *.o *.orig 
447a192d395ce5d7e5945afa684146d5b0abc53480mbligh	@(cd po/ && $(MAKE) $@)
457a192d395ce5d7e5945afa684146d5b0abc53480mbligh
467a192d395ce5d7e5945afa684146d5b0abc53480mbligh
477a192d395ce5d7e5945afa684146d5b0abc53480mblighdist:
487a192d395ce5d7e5945afa684146d5b0abc53480mbligh	rm -rf .svn po/.svn DEADJOE po/DEADJOE todo.txt Lindent svn-commit.* dogit.sh git/ *.rej *.orig
49