| version 1.8, 2003/07/09 18:44:44 |
version 1.9, 2003/07/25 19:03:54 |
|
|
| |
# |
| |
# $Platon: games/mines/Makefile,v 1.8 2003/07/09 18:44:44 nepto Exp $ |
| |
# |
| |
|
| PACKAGE = mines |
PACKAGE = mines |
| VERSION = 4.3 |
VERSION = 4.3 |
| |
|
| # $Platon: games/mines/Makefile,v 1.7 2003/06/27 21:53:22 nepto Exp $ |
export PACKAGE |
| |
export VERSION |
| |
|
| |
# 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 |
| |
CFLAGS = -O3 -pedantic -Wall $(DEBUG_FLAGS) |
| |
CPPFLAGS = |
| |
LDFLAGS = |
| |
DEFS = -DPLATON_SYSTEM_SVGALIB -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(VERSION)-svgalib"' |
| |
INCLUDES = -I_shared |
| |
LIBS = -lvgagl -lvga |
| |
|
| |
|
| |
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) |
| |
CCLD = $(CC) |
| |
LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ |
| |
|
| |
# }}} Programs |
| |
|
| |
|
| CC = gcc |
|
| CFLAGS = -DPLATON_SYSTEM_SVGALIB -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(VERSION)-svgalib"' -I_shared -O3 -pedantic -Wall |
|
| OBJECTS = hiscore.o mines.o dos2linux.o my-graph.o mouse.o standart.o menu.o |
OBJECTS = hiscore.o mines.o dos2linux.o my-graph.o mouse.o standart.o menu.o |
| LIBS = -lvgagl -lvga |
|
| RM = rm -f |
|
| prefix = /usr/local |
prefix = /usr/local |
| bindir = $(prefix)/games |
bindir = $(prefix)/games |
| |
|
| |
DISTFILES = Makefile \ |
| |
hiscore.c \ |
| |
hiscore.h \ |
| |
mines.c \ |
| |
doc/ \ |
| |
doc/file_id.diz \ |
| |
doc/mines.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.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 \ |
| |
|
| |
|
| all: |
all: |
| @echo Available targets: |
@echo Available targets: |
| @echo - msdos: makes MS-Dos executable |
@echo - msdos: makes MS-Dos executable |
|
|
| svgalib: unix-shared-test $(OBJECTS) |
svgalib: unix-shared-test $(OBJECTS) |
| $(CC) $(CFLAGS) -o mines $(OBJECTS) $(LIBS) |
$(CC) $(CFLAGS) -o mines $(OBJECTS) $(LIBS) |
| |
|
| |
clean: svgalib-clean |
| svgalib-clean: |
svgalib-clean: |
| $(RM) mines $(OBJECTS) |
-rm -f mines $(OBJECTS) |
| |
-rm -rf $(distdir) |
| |
|
| unix-shared-test: |
unix-shared-test: |
| @if test ! -d _shared; then \ |
@if test ! -d _shared; then \ |
| Line 55 unix-shared-test: |
|
| Line 128 unix-shared-test: |
|
| # install -m 4755 -o root -g root -s mines $(bindir) |
# install -m 4755 -o root -g root -s mines $(bindir) |
| |
|
| hiscore.o: hiscore.c hiscore.h |
hiscore.o: hiscore.c hiscore.h |
| $(CC) $(CFLAGS) -c hiscore.c -o hiscore.o |
$(COMPILE) -c hiscore.c -o hiscore.o |
| |
|
| mines.o: mines.c |
mines.o: mines.c |
| $(CC) $(CFLAGS) -c mines.c -o mines.o |
$(COMPILE) -c mines.c -o mines.o |
| |
|
| dos2linux.o: _shared/dos2linux.c _shared/dos2linux.h |
dos2linux.o: _shared/dos2linux.c _shared/dos2linux.h |
| $(CC) $(CFLAGS) -c _shared/dos2linux.c -o dos2linux.o |
$(COMPILE) -c _shared/dos2linux.c -o dos2linux.o |
| |
|
| my-graph.o: _shared/my-graph.c _shared/my-graph.h |
my-graph.o: _shared/my-graph.c _shared/my-graph.h |
| $(CC) $(CFLAGS) -c _shared/my-graph.c -o my-graph.o |
$(COMPILE) -c _shared/my-graph.c -o my-graph.o |
| |
|
| mouse.o: _shared/mouse-svgalib.c _shared/mouse.h |
mouse.o: _shared/mouse-svgalib.c _shared/mouse.h |
| $(CC) $(CFLAGS) -c _shared/mouse-svgalib.c -o mouse.o |
$(COMPILE) -c _shared/mouse-svgalib.c -o mouse.o |
| |
|
| standart.o: _shared/stshared.c _shared/standart-linux.c _shared/standart.h |
standart.o: _shared/stshared.c _shared/standart-linux.c _shared/standart.h |
| $(CC) $(CFLAGS) -c _shared/standart-linux.c -o standart.o |
$(COMPILE) -c _shared/standart-linux.c -o standart.o |
| |
|
| menu.o: _shared/menu.c _shared/menu.h |
menu.o: _shared/menu.c _shared/menu.h |
| $(CC) $(CFLAGS) -c _shared/menu.c -o menu.o |
$(COMPILE) -c _shared/menu.c -o menu.o |
| |
|
| |
# 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 |
| |
|