📄 makefile
字号:
#---------------------------------------------------------------------OU# Makefile for SVGAlib.## It's pretty unreadable, but just doing make install should be# enough. This will install the headerfiles and shared library first# (which is enough to compile things), after which the static version is# optionally compiled and installed (if it fails, the shared libraries# should still work fine).##----------------------------------------------------------------------# *** NO SERVICIBLE PARTS HERE!# All options are in Makefile.cfg.include Makefile.cfg#----------------------------------------------------------------------# Rules Section#----------------------------------------------------------------------JUMP_DIR=$(shell sh -c pwd)/jump/JUMP_LIB=libvgaexport JUMP_DIRexport JUMP_LIB# Search the old directories for mkimage and mkstubs.# Make sure mkimage get the right "as" assembler.ifeq (a.out, $(TARGET_FORMAT)) PATH := /usr/i486-linuxaout/bin:$(PATH):/usr/dll/bin export PATHendif # In case someone goes for the demos w/o installing svgalib make# the static libs first.ifdef INSTALLSHAREDLIB PREDEMO =else PREDEMO = staticendif# A flag if this is a distribution:DISTRIBUTION = $(shell sh -c "echo sharedlib/DIST*")INSTALLAOUTDIR = ifeq (elf, $(TARGET_FORMAT))ifdef INSTALLAOUTLIBifeq ($(DISTRIBUTION), sharedlib/DISTRIBUTION) OBSOLETEAOUTDIRS = $(shell sed 's?\#.*$$??' /etc/ld.so.conf 2>/dev/null | \ sed 's?\([^/]\)[ ]*$$?\1/ ?' | grep aout/ ) INSTALLAOUTDIR = $(word 1, $(OBSOLETEAOUTDIRS))endifendifendifUTILS = restorefont runx restorepalette restoretextmode textmode \ savetextmode dumpreg fix132x43OBSOLETEHDIRS = /usr/include/ /usr/include/vga/ /usr/local/include/ /usr/local/include/vga/OBSOLETEBDIRS = /usr/bin/ /usr/local/bin/OBSOLETEHEADERS = /inc/vga.h /inc/vgakeyboard.h /inc/vgamouse.h /inc/vgagl.h /inc/vgajoystick.hOBSOLETELIBLINKS = /lib/libvga.so /lib/libvga.so.1 /lib/libvgagl.so /lib/libvgagl.so.1OBSOLETESHAREDIMAGES = /lib/libvgagl.so.* /lib/libvga.so.*ifeq (a.out, $(TARGET_FORMAT)) OBSOLETELDIRS = /lib/ /usr/lib/ /usr/local/lib/ /usr/share/lib/ \ $(shell sed 's?\#.*$$??' /etc/ld.so.conf 2>/dev/null | \ sed 's?\([^/]\)[ ]*$$?\1/ ?' ) SHAREDLIBS = sharedlib/libvga.so.$(VERSION) SVGALIBSHAREDSTUBS = sharedlib/libvga.sa sharedlib/libvgagl.sa JUMP = jumpelse OBSOLETELDIRS = /lib/ /usr/lib/ /usr/local/lib/ /usr/share/lib/ \ $(shell sed 's?\#.*$$??' /etc/ld.so.conf 2>/dev/null | \ sed 's?\([^/]\)[ ]*$$?\1/ ?' | grep -v aout/ ) SHAREDAOUTLIBS = sharedlib/libvga.so.$(VERSION) SVGALIBSHAREDAOUTSTUBS = sharedlib/libvga.sa sharedlib/libvgagl.sa SHAREDLIBS = sharedlib/libvga.so.$(VERSION) sharedlib/libvgagl.so.$(VERSION) SVGALIBSHAREDSTUBS = JUMP =endif BACKUP = ../svgalib-$(VERSION).tar.gzdefault: @echo "To install SVGAlib, do one of the following:" @echo "" @echo " make clean - clean every thing. Do this after every change" @echo " of Makefile.cfg! Esp. when changing from a.out" @echo " to ELF and vice versa" @echo " make install - compile & install components specified in Makefile.cfg" @echo " make demoprogs - make demo programs in demo/ and threeDKit/" @echo "" @echo " make uninstall - remove an existing installation from various" @echo " common places. (old traces often confuse the" @echo " compiler even when svgalib is not installed anew)" @echo " (make install includes an uninstall first)" @echo "" @echo " Be sure to read the file 0-INSTALL!" @echo "".PHONY: default all install installheaders installconfig.PHONY: clean distclean indent uninstall.PHONY: force_remake remake_shared shared static.PHONY: indent-gnu configaoutinstallheaders: @echo Installing header files in $(includedir). @if [ -f /usr/include/vga.h ]; then \ rm -f /usr/include/vga.h /usr/include/vgagl.h; \ echo Old header files in /usr/include removed.; \ fi mkdir -p $(includedir) @cp $(srcdir)/src/vga.h $(includedir)/vga.h @chmod a+r $(includedir)/vga.h @cp $(srcdir)/gl/vgagl.h $(includedir)/vgagl.h @chmod a+r $(includedir)/vgagl.h @cp $(srcdir)/src/mouse/vgamouse.h $(includedir)/vgamouse.h @chmod a+r $(includedir)/vgamouse.h @cp $(srcdir)/src/joystick/vgajoystick.h $(includedir)/vgajoystick.h @chmod a+r $(includedir)/vgajoystick.h @cp $(srcdir)/src/keyboard/vgakeyboard.h $(includedir)/vgakeyboard.h @chmod a+r $(includedir)/vgakeyboard.hinstallsharedlib: $(SHAREDLIBS) $(SVGALIBSHAREDSTUBS)ifeq (a.out, $(TARGET_FORMAT)) @echo Installing shared library stubs in $(libdir). -@for foo in $(notdir $(SVGALIBSHAREDSTUBS)); do \ $(INSTALL_DATA) sharedlib/$$foo $(libdir)/$$foo; \ chmod a+r $(libdir)/$$foo; \ doneendif @if [ -f /usr/lib/libvga.sa ]; then \ rm -f /usr/lib/libvga.sa /usr/lib/libvgagl.sa; \ echo Old stubs in /usr/lib removed.; \ fi @rm -f $(OBSOLETESHAREDIMAGES)ifndef KEEPSHAREDLIBS @echo "Removing shared library images (old & current)..." @for i in $(OBSOLETELDIRS); do \ rm -f `echo $(OBSOLETESHAREDIMAGES) | sed s?/lib/?$$i?g`; \ doneendif mkdir -p $(sharedlibdir) @echo Installing shared library image as \ $(addprefix $(sharedlibdir)/,$(notdir $(SHAREDLIBS))). @for foo in $(notdir $(SHAREDLIBS)); do \ $(INSTALL_SHLIB) sharedlib/$$foo $(sharedlibdir)/$$foo; \ (cd $(sharedlibdir); \ ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \ done @ldconfigifdef INSTALLAOUTDIRinstallaoutcompat: @echo Installing shared a.out compatibility library in $(TOPDIR)/$(INSTALLAOUTDIR). @for foo in $(notdir $(SVGALIBSHAREDAOUTSTUBS)); do \ $(INSTALL_DATA) sharedlib/$$foo $(TOPDIR)/$(INSTALLAOUTDIR)$$foo; \ done @echo Installing shared a.out library compat image as \ $(addprefix $(INSTALLAOUTDIR),$(notdir $(SHAREDLIBS))). @for foo in $(notdir $(SHAREDAOUTLIBS)); do \ $(INSTALL_SHLIB) sharedlib/$$foo $(TOPDIR)/$(INSTALLAOUTDIR)$$foo; \ (cd $(TOPDIR)/$(INSTALLAOUTDIR); \ ln -sf $$foo `echo $$foo | sed 's/\.so\..*/.so/'` ); \ done @ldconfigelseinstallaoutcompat: @trueendifinstallstaticlib: static @echo Installing static libraries in $(libdir). @rm -f /usr/lib/libvga.a @$(INSTALL_DATA) staticlib/libvga.a $(libdir)/libvga.a @chmod a+r $(libdir)/libvga.a @rm -f /usr/lib/libvgagl.a @$(INSTALL_DATA) staticlib/libvgagl.a $(libdir)/libvgagl.a @chmod a+r $(libdir)/libvgagl.ainstallutils: textutils lrmi @if [ ! -d $(bindir) ]; then \ echo No $(bindir) directory, creating it.; \ mkdir $(bindir); \ fi @if [ -f /usr/bin/restorefont ]; then \ echo Removing old utilities in /usr/bin.; \ for x in $(UTILS); do rm -f /usr/bin/$$x; done; \ fi @if [ -f /usr/bin/convfont ]; then \ echo Removing inappropriate utilities in /usr/bin.; \ rm -f /usr/bin/convfont /usr/bin/setmclk; \ fi @echo Installing textmode utilities in $(bindir): @echo "restorefont: Save/restore textmode font." @cp utils/restorefont $(bindir) @echo "restorepalette: Set standard VGA palette." @cp utils/restorepalette $(bindir) @echo "dumpreg: Write ASCII dump of SVGA registers." @cp utils/dumpreg $(bindir) @echo "restoretextmode: Save/restore textmode registers." @cp utils/restoretextmode $(bindir) @echo "textmode: Script that tries to restore textmode." @cp utils/textmode $(bindir) @echo "savetextmode: Script that saves textmode information used by 'textmode'." @cp utils/savetextmode $(bindir) @echo "mode3: Restore textmode by setting VESA mode 3." @cp lrmi-0.6m/mode3 $(bindir) @echo "Installing keymap utilities in $(bindir):" @echo "svgakeymap: Perl script that generates scancode conversion maps." @cp utils/svgakeymap $(bindir)installconfig: @if [ ! -d $(datadir) ]; then \ echo Creating configuration directory $(datadir).; \ mkdir $(datadir); \ chmod go-w $(datadir); \ fi @if [ \( -f /usr/local/lib/libvga.config -a ! -f $(datadir)/libvga.config \) ]; then \ echo "Moving old config file /usr/local/lib/libvga.config to $(datadir)." ; \ mv -f /usr/local/lib/libvga.config $(datadir)/libvga.config; \ fi @if [ \( -f /usr/local/lib/libvga.et4000 -a ! -f $(datadir)/libvga.et4000 \) ]; then \ echo "Moving old config file /usr/local/lib/libvga.et4000 to $(datadir)." ; \ mv -f /usr/local/lib/libvga.et4000 $(datadir)/libvga.et4000; \ fi @if [ \( -f /usr/local/lib/libvga.ega -a ! -f $(datadir)/libvga.ega \) ]; then \ echo "Moving old config file /usr/local/lib/libvga.ega to $(datadir)." ; \ mv -f /usr/local/lib/libvga.ega $(datadir)/libvga.ega; \ fi @if [ \( -f /etc/mach32.eeprom -a ! -f $(datadir)/mach32.eeprom \) ]; then \ echo Consider moving your /etc/mach32.eeprom file to $(datadir) ; \ echo and changing $(datadir)/libvga.config appropriately. ; \ fi @if [ ! -f $(datadir)/libvga.config ]; then \ echo Installing default configuration file in $(datadir).; \ cp $(confdir)/libvga.config $(datadir)/libvga.config; \ fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -