Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Štvrtok, 28. marec 2024

Súbor: [Platon] / games / pexeso / Makefile (stiahnutie)

Revízia 1.17, Thu Sep 16 13:44:23 2004 UTC (19 years, 6 months ago) by nepto


Zmeny od 1.16: +3 -1 [lines]

Added MS-Dos and Win32 makefiles into distribution.

#
# $Platon: games/pexeso/Makefile,v 1.16 2004/09/16 13:41:08 nepto Exp $
#

PACKAGE = pexeso
VERSION = 4.3

# Directories {{{

srcdir       = .
top_srcdir   = .
distdir      = $(PACKAGE)-$(VERSION)
top_distdir  = $(distdir)
top_builddir = .

# }}} Directories

# Programs {{{

TAR      = tar
ZIP      = zip
ZIP_ENV  = -r9
GZIP_ENV = --best

CC       = gcc
CPP      =
CXX      =
#DEBUG_FLAGS = -g -ggdb -DDEBUG=1
CFLAGS   = -O3 -pedantic -Wall $(DEBUG_FLAGS)
CPPFLAGS =
LDFLAGS  =
INCLUDES = -I_shared

SVGALIB_DEFS    = -DPLATON_SYSTEM_SVGALIB -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(VERSION)-svgalib"'
SVGALIB_LIBS    = -lvgagl -lvga -lm
SVGALIB_COMPILE = $(CC) $(SVGALIB_DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
SVGALIB_CCLD    = $(CC)
SVGALIB_LINK    = $(SVGALIB_CCLD) $(CFLAGS) $(LDFLAGS) -o $@

X11_DEFS    = -DPLATON_SYSTEM_X11 -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(VERSION)-x11"'
X11_LIBS    = -L/usr/X11R6/lib -lX11
X11_COMPILE = $(CC) $(X11_DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
X11_CCLD    = $(CC)
X11_LINK    = $(X11_CCLD) $(CFLAGS) $(LDFLAGS) -o $@

# }}} Programs

SVGALIB_OBJECTS = cursors.o data.o pexeso.o dos2linux.o my-graph.o mouse.o standart.o menu.o
X11_OBJECTS = cursors.xo data.xo pexeso.xo dos2linux.xo my-graph.xo mouse.xo standart.xo menu.xo x11-bgi.xo

prefix = /usr/local
bindir = $(prefix)/games

DISTFILES = Makefile \
            Makefile.dos \
            Makefile.win \
            cursors.c \
            cursors.h \
            data.c \
            data.h \
            pexeso.c \
            doc/ \
            doc/file_id.diz \
            doc/pexeso.sig \
            _shared/ \
            _shared/dos2linux.c \
            _shared/dos2linux.h \
            _shared/dos2win32.c \
            _shared/dos2win32.h \
            _shared/fontlib.c \
            _shared/macros.h \
            _shared/menu.c \
            _shared/menu.h \
            _shared/mouse-svgalib.c \
            _shared/mouse-win32.c \
            _shared/mouse-x11.c \
            _shared/mouse.c \
            _shared/mouse.h \
            _shared/my-graph.c \
            _shared/my-graph.h \
            _shared/standart-linux.c \
            _shared/standart-win32.c \
            _shared/standart.c \
            _shared/standart.h \
            _shared/stshared.c \
            _shared/system.h \
            _shared/typedef.h \
            _shared/winbgim.cpp \
            _shared/winbgim.h \
            _shared/x11-bgi.c \
            _shared/x11-bgi.h

all:
    @echo Available targets:
    @echo - msdos: makes MS-Dos executable
    @echo - msdos-clean: cleans MS-Dos working files
    @echo - win32: makes MS-Windows 32-bit executable
    @echo - win32-clean: cleans MS-Windows working files
    @echo - svgalib: makes SVGAlib Linux binary
    @echo - svgalib-clean: cleans SVGAlib Linux working files
    @echo - x11: makes X Windows System binary
    @echo - x11-clean: cleans X Windows System working files

msdos:
    make -DPACKAGE="$(PACKAGE)" -DVERSION="$(VERSION)-msdos" -f Makefile.dos

msdos-clean:
    make -DPACKAGE="$(PACKAGE)" -DVERSION="$(VERSION)-msdos" -f Makefile.dos clean

win32:
    nmake -D PACKAGE="$(PACKAGE)" -D VERSION="$(VERSION)-win32" -f Makefile.win

win32-clean:
    nmake -D PACKAGE="$(PACKAGE)" -D VERSION="$(VERSION)-win32" -f Makefile.win clean

svgalib: unix-shared-test $(SVGALIB_OBJECTS)
    $(CC) $(CFLAGS) -o pexeso $(SVGALIB_OBJECTS) $(SVGALIB_LIBS)

svgalib-clean:
    -rm -f pexeso $(SVGALIB_OBJECTS)

x11: unix-shared-test $(X11_OBJECTS)
    $(CC) $(CFLAGS) -o xpexeso $(X11_OBJECTS) $(X11_LIBS)

x11-clean:
    -rm -f xpexeso $(X11_OBJECTS)

unix-shared-test:
    @if test ! -d _shared; then                                                \
        if test -d ../_shared; then                                            \
            ln -s ../_shared _shared;                                        \
            echo -n "warning: ";                                            \
            echo "shared directory did not exist, thus it was symlinked";    \
        else                                                                \
            echo -n "error: ";                                                \
            echo "shared directory does not exist and cannot be symlinked";    \
            exit 1;                                                            \
        fi;                                                                    \
    fi

#
# svgalib target objects
#

cursors.o: Makefile cursors.c cursors.h
    $(SVGALIB_COMPILE) -c cursors.c -o cursors.o

data.o: Makefile data.c data.h
    $(SVGALIB_COMPILE) -c data.c -o data.o

pexeso.o: Makefile pexeso.c
    $(SVGALIB_COMPILE) -c pexeso.c -o pexeso.o

dos2linux.o: Makefile _shared/dos2linux.c _shared/dos2linux.h
    $(SVGALIB_COMPILE) -c _shared/dos2linux.c -o dos2linux.o

my-graph.o: Makefile _shared/my-graph.c _shared/my-graph.h
    $(SVGALIB_COMPILE) -c _shared/my-graph.c -o my-graph.o

mouse.o: Makefile _shared/mouse-svgalib.c _shared/mouse.h
    $(SVGALIB_COMPILE) -c _shared/mouse-svgalib.c -o mouse.o

standart.o: Makefile _shared/stshared.c _shared/standart-linux.c _shared/standart.h
    $(SVGALIB_COMPILE) -c _shared/standart-linux.c -o standart.o

menu.o: Makefile _shared/menu.c _shared/menu.h
    $(SVGALIB_COMPILE) -c _shared/menu.c -o menu.o

#
# x11 target objects
#

cursors.xo: Makefile cursors.c cursors.h
    $(X11_COMPILE) -c cursors.c -o cursors.xo

data.xo: Makefile data.c data.h
    $(X11_COMPILE) -c data.c -o data.xo

pexeso.xo: Makefile pexeso.c
    $(X11_COMPILE) -c pexeso.c -o pexeso.xo

x11-bgi.xo: Makefile _shared/x11-bgi.c _shared/x11-bgi.h
    $(X11_COMPILE) -c _shared/x11-bgi.c -o x11-bgi.xo

dos2linux.xo: Makefile _shared/dos2linux.c _shared/dos2linux.h
    $(X11_COMPILE) -c _shared/dos2linux.c -o dos2linux.xo

my-graph.xo: Makefile _shared/my-graph.c _shared/my-graph.h
    $(X11_COMPILE) -c _shared/my-graph.c -o my-graph.xo

mouse.xo: Makefile _shared/mouse-x11.c _shared/mouse.h
    $(X11_COMPILE) -c _shared/mouse-x11.c -o mouse.xo

standart.xo: Makefile _shared/stshared.c _shared/standart-linux.c _shared/standart.h
    $(X11_COMPILE) -c _shared/standart-linux.c -o standart.xo

menu.xo: Makefile _shared/menu.c _shared/menu.h
    $(X11_COMPILE) -c _shared/menu.c -o menu.xo

# Distribution targets {{{
dist: unix-shared-test distdir
    GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
    ZIP=$(ZIP_ENV) $(ZIP) $(distdir).zip $(distdir)
    -rm -rf $(distdir)

dist-all: distdir
    GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
    ZIP=$(ZIP_ENV) $(ZIP) $(distdir).zip $(distdir)
    -rm -rf $(distdir)

distdir: $(DISTFILES)
    -rm -rf $(distdir)
    mkdir $(distdir)
    @here=`cd $(top_builddir) && pwd`; \
    top_distdir=`cd $(distdir) && pwd`; \
    distdir=`cd $(distdir) && pwd`;
    @FILES=`echo "$(DISTFILES)" | awk 'BEGIN{RS=" "}{print}' | sort -u`; \
    for file in $$FILES; do \
      d=$(srcdir); \
      if test -d $$d/$$file; then \
        mkdir $(distdir)/$$file; \
      else \
        test -f $(distdir)/$$file \
        || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
        || cp -p $$d/$$file $(distdir)/$$file || :; \
      fi; \
    done

# }}}

# vim600: fdm=marker fdc=3


Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok