| version 1.10, 2003/07/31 13:24:24 |
version 1.11, 2003/08/12 17:20:54 |
|
|
| # |
# |
| # $Platon: games/mines/Makefile,v 1.9 2003/07/25 19:03:54 rajo Exp $ |
# $Platon: games/mines/Makefile,v 1.10 2003/07/31 13:24:24 nepto Exp $ |
| # |
# |
| |
|
| PACKAGE = mines |
PACKAGE = mines |
|
|
| CFLAGS = -O3 -pedantic -Wall $(DEBUG_FLAGS) |
CFLAGS = -O3 -pedantic -Wall $(DEBUG_FLAGS) |
| CPPFLAGS = |
CPPFLAGS = |
| LDFLAGS = |
LDFLAGS = |
| DEFS = -DPLATON_SYSTEM_SVGALIB -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(VERSION)-svgalib"' |
|
| INCLUDES = -I_shared |
INCLUDES = -I_shared |
| LIBS = -lvgagl -lvga |
|
| |
|
| |
SVGALIB_DEFS = -DPLATON_SYSTEM_SVGALIB -DPACKAGE='"$(PACKAGE)"' -DVERSION='"$(VERSION)-svgalib"' |
| COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) |
SVGALIB_LIBS = -lvgagl -lvga -lm |
| CCLD = $(CC) |
SVGALIB_COMPILE = $(CC) $(SVGALIB_DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) |
| LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ |
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 |
# }}} Programs |
| |
|
| |
|
| OBJECTS = hiscore.o mines.o dos2linux.o my-graph.o mouse.o standart.o menu.o |
SVGALIB_OBJECTS = hiscore.o mines.o dos2linux.o my-graph.o mouse.o standart.o menu.o |
| |
X11_OBJECTS = hiscore.xo mines.xo dos2linux.xo my-graph.xo mouse.xo standart.xo menu.xo x11-graph.xo |
| |
|
| prefix = /usr/local |
prefix = /usr/local |
| bindir = $(prefix)/games |
bindir = $(prefix)/games |
| Line 79 DISTFILES = Makefile \ |
|
| Line 85 DISTFILES = Makefile \ |
|
| _shared/system.h \ |
_shared/system.h \ |
| _shared/typedef.h \ |
_shared/typedef.h \ |
| _shared/winbgim.cpp \ |
_shared/winbgim.cpp \ |
| _shared/winbgim.h \ |
_shared/winbgim.h |
| |
|
| |
|
| all: |
all: |
| @echo Available targets: |
@echo Available targets: |
|
|
| @echo - win32: makes MS-Windows 32-bit executable |
@echo - win32: makes MS-Windows 32-bit executable |
| @echo - win32-clean: cleans MS-Windows working files |
@echo - win32-clean: cleans MS-Windows working files |
| @echo - svgalib: makes SVGAlib Linux binary |
@echo - svgalib: makes SVGAlib Linux binary |
| @echo - svgalib-clean: cleans Linux working files |
@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: |
msdos: |
| make -DPACKAGE="$(PACKAGE)" -DVERSION="$(VERSION)-msdos" -f Makefile.dos |
make -DPACKAGE="$(PACKAGE)" -DVERSION="$(VERSION)-msdos" -f Makefile.dos |
|
|
| win32-clean: |
win32-clean: |
| nmake -D PACKAGE="$(PACKAGE)" -D VERSION="$(VERSION)-win32" -f Makefile.win clean |
nmake -D PACKAGE="$(PACKAGE)" -D VERSION="$(VERSION)-win32" -f Makefile.win clean |
| |
|
| svgalib: unix-shared-test $(OBJECTS) |
svgalib: unix-shared-test $(SVGALIB_OBJECTS) |
| $(CC) $(CFLAGS) -o mines $(OBJECTS) $(LIBS) |
$(CC) $(CFLAGS) -o mines $(SVGALIB_OBJECTS) $(SVGALIB_LIBS) |
| |
|
| clean: |
|
| -rm -rf $(distdir) |
|
| |
|
| svgalib-clean: |
svgalib-clean: |
| -rm -f mines $(OBJECTS) |
-rm -f mines $(SVGALIB_OBJECTS) |
| |
|
| |
x11: unix-shared-test $(X11_OBJECTS) |
| |
$(CC) $(CFLAGS) -o xmines $(X11_OBJECTS) $(X11_LIBS) |
| |
|
| |
x11-clean: |
| |
-rm -f xmines $(X11_OBJECTS) |
| |
|
| unix-shared-test: |
unix-shared-test: |
| @if test ! -d _shared; then \ |
@if test ! -d _shared; then \ |
| Line 125 unix-shared-test: |
|
| Line 135 unix-shared-test: |
|
| fi; \ |
fi; \ |
| fi |
fi |
| |
|
| #install: all |
# |
| # install -m 4755 -o root -g root -s mines $(bindir) |
# svgalib target objects |
| |
# |
| |
|
| hiscore.o: hiscore.c hiscore.h |
hiscore.o: hiscore.c hiscore.h |
| $(COMPILE) -c hiscore.c -o hiscore.o |
$(SVGALIB_COMPILE) -c hiscore.c -o hiscore.o |
| |
|
| mines.o: mines.c |
mines.o: mines.c |
| $(COMPILE) -c mines.c -o mines.o |
$(SVGALIB_COMPILE) -c mines.c -o mines.o |
| |
|
| dos2linux.o: _shared/dos2linux.c _shared/dos2linux.h |
dos2linux.o: _shared/dos2linux.c _shared/dos2linux.h |
| $(COMPILE) -c _shared/dos2linux.c -o dos2linux.o |
$(SVGALIB_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 |
| $(COMPILE) -c _shared/my-graph.c -o my-graph.o |
$(SVGALIB_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 |
| $(COMPILE) -c _shared/mouse-svgalib.c -o mouse.o |
$(SVGALIB_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 |
| $(COMPILE) -c _shared/standart-linux.c -o standart.o |
$(SVGALIB_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 |
| $(COMPILE) -c _shared/menu.c -o menu.o |
$(SVGALIB_COMPILE) -c _shared/menu.c -o menu.o |
| |
|
| |
# |
| |
# x11 target objects |
| |
# |
| |
|
| # Distribution targets {{{ |
# Distribution targets {{{ |
| dist: unix-shared-test distdir |
dist: unix-shared-test distdir |