fbset: fix build system
Subsystems (2)
PATCH 6/7 fbset: fix build system
Hi,
This one fixes the build system by splitting CFLAGS from CC so that the user can override it from command-line, using DESTDIR so that it can be installed in a staging area for packaging, splitting the device creation from the install target and by using the "semi-standard" INSTALL_foo variables.
Those changes are needed by distributions.
regards,
guillem
Makefile renamed from Makefile.orig +25 -13
@@ -2,10 +2,14 @@ # Linux Frame Buffer Device Configuration # -CC = gcc -Wall -O2 -I. +CC = gcc +CFLAGS = -Wall -O2 BISON = bison -d FLEX = flex INSTALL = install +INSTALL_DIR = $(INSTALL) -d +INSTALL_PROGRAM = $(INSTALL) -m 755 +INSTALL_DATA = $(INSTALL) -m 644 RM = rm -f All: fbset
@@ -24,18 +28,26 @@ modes.tab.c: modes.y $(BISON) modes.y install: fbset - if [ -f /sbin/fbset ]; then rm /sbin/fbset; fi - $(INSTALL) fbset /usr/sbin - $(INSTALL) fbset.8 /usr/man/man8 - $(INSTALL) fb.modes.5 /usr/man/man5 - if [ ! -c /dev/fb0 ]; then mknod /dev/fb0 c 29 0; fi - if [ ! -c /dev/fb1 ]; then mknod /dev/fb1 c 29 32; fi - if [ ! -c /dev/fb2 ]; then mknod /dev/fb2 c 29 64; fi - if [ ! -c /dev/fb3 ]; then mknod /dev/fb3 c 29 96; fi - if [ ! -c /dev/fb4 ]; then mknod /dev/fb4 c 29 128; fi - if [ ! -c /dev/fb5 ]; then mknod /dev/fb5 c 29 160; fi - if [ ! -c /dev/fb6 ]; then mknod /dev/fb6 c 29 192; fi - if [ ! -c /dev/fb7 ]; then mknod /dev/fb7 c 29 224; fi + $(INSTALL_DIR) $(DESTDIR)/etc + $(INSTALL_DATA) etc/fb.modes.ATI $(DESTDIR)/etc/fb.modes + $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man5 + $(INSTALL_DATA) fb.modes.5 $(DESTDIR)/usr/share/man/man5 + $(INSTALL_DIR) $(DESTDIR)/bin + $(INSTALL_PROGRAM) fbset $(DESTDIR)/bin + $(INSTALL_DIR) $(DESTDIR)/usr/share/man/man1 + $(INSTALL_DATA) fbset.8 $(DESTDIR)/usr/share/man/man1/fbset.1 + $(INSTALL_PROGRAM) modeline2fb $(DESTDIR)/bin + $(INSTALL_DATA) modeline2fb.1 $(DESTDIR)/usr/share/man/man1 + +install-devices: + if [ ! -c /dev/fb0 ]; then mknod $(DESTDIR)/dev/fb0 c 29 0; fi + if [ ! -c /dev/fb1 ]; then mknod $(DESTDIR)/dev/fb1 c 29 32; fi + if [ ! -c /dev/fb2 ]; then mknod $(DESTDIR)/dev/fb2 c 29 64; fi + if [ ! -c /dev/fb3 ]; then mknod $(DESTDIR)/dev/fb3 c 29 96; fi + if [ ! -c /dev/fb4 ]; then mknod $(DESTDIR)/dev/fb4 c 29 128; fi + if [ ! -c /dev/fb5 ]; then mknod $(DESTDIR)/dev/fb5 c 29 160; fi + if [ ! -c /dev/fb6 ]; then mknod $(DESTDIR)/dev/fb6 c 29 192; fi + if [ ! -c /dev/fb7 ]; then mknod $(DESTDIR)/dev/fb7 c 29 224; fi clean: $(RM) *.o fbset lex.yy.c modes.tab.c modes.tab.h
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel