Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Sobota, 20. apríl 2024

Súbor: [Platon] / games / 3do-view / Makefile (stiahnutie)

Revízia 1.18, Thu Sep 16 13:44:20 2004 UTC (19 years, 7 months ago) by nepto


Zmeny od 1.17: +3 -1 [lines]

Added MS-Dos and Win32 makefiles into distribution.

#
# $Platon: games/3do-view/Makefile,v 1.17 2004/09/16 13:41:03 nepto Exp $
#

PACKAGE = 3do-view
VERSION = 1.4

# 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 -lm
X11_COMPILE = $(CC) $(X11_DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
X11_CCLD    = $(CC)
X11_LINK    = $(X11_CCLD) $(CFLAGS) $(LDFLAGS) -o $@

# }}} Programs

SVGALIB_OBJECTS = dir.o 3do-view.o dos2linux.o my-graph.o mouse.o standart.o
X11_OBJECTS = dir.xo 3do-view.xo dos2linux.xo my-graph.xo mouse.xo standart.xo x11-bgi.xo

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

DISTFILES = Makefile \
            Makefile.dos \
            Makefile.win \
            dir.c \
            dir.h \
            3do-view.c \
            doc/ \
            doc/readme.txt \
            data/ \
            data/char-l.3do \
            data/char-r.3do \
            data/char-r2.3do \
            data/cube-x.3do \
            data/cube.3do \
            data/pyramid.3do \
            data/rocket.3do \
            data/stand.3do \
            data/strange1.3do \
            data/strange2.3do \
             _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 3do-view $(SVGALIB_OBJECTS) $(SVGALIB_LIBS)

svgalib-clean:
    -rm -f 3do-view $(SVGALIB_OBJECTS)

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

x11-clean:
    -rm -f x3do-view $(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
#

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

3do-view.o: Makefile 3do-view.c
    $(SVGALIB_COMPILE) -c 3do-view.c -o 3do-view.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

#
# x11 target objects
#

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

3do-view.xo: Makefile 3do-view.c
    $(X11_COMPILE) -c 3do-view.c -o 3do-view.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

# 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