da03056b5f
supported in gcc4. While here, fix a glitch in the man page and add destdir support. PKGREVISION++.
75 lines
3 KiB
Text
75 lines
3 KiB
Text
$NetBSD: patch-aa,v 1.6 2008/09/21 08:17:40 dholland Exp $
|
|
|
|
--- Makefile.orig 1998-03-05 17:06:19.000000000 -0500
|
|
+++ Makefile 2008-09-21 02:02:55.000000000 -0400
|
|
@@ -21,14 +21,15 @@
|
|
### GENERAL OPTIONS ###
|
|
|
|
# Compiler to use (C++ compiler _please_)
|
|
- CC = g++
|
|
+ CC = ${CXX}
|
|
|
|
# Directory for XNibbles specific data
|
|
# This must be set correctly at compile time
|
|
- DATADIR = /usr/local/games/xnibbles
|
|
+ DATADIR=$(PREFIX)/share/xnibbles
|
|
+ CPPFLAGS+=-DDATADIR=\"$(DATADIR)\" $(SDEV)
|
|
+ #CFLAGS+=-fwritable-strings
|
|
|
|
# Prefix to find bin and man directories for installation
|
|
- PREFIX = /usr/local
|
|
|
|
# Install program
|
|
INSTALL = /usr/bin/install
|
|
@@ -41,10 +42,10 @@
|
|
|
|
# Requires kernel sound support, change from 0 to 1 if you want it
|
|
SOUND = 1
|
|
- SOUNDDEV = /dev/dsp
|
|
+ SOUNDDEV = /dev/audio
|
|
|
|
# Requires kernel joystick support, change from 0 to 1 if you want it
|
|
- JOYSTICK = 1
|
|
+ JOYSTICK = 0
|
|
JOYSTICK0DEV = /dev/js0
|
|
JOYSTICK1DEV = /dev/js1
|
|
|
|
@@ -90,7 +91,7 @@ xnibbles: bodyPart.o boni.o bonus.o dead
|
|
$(CC) $(CFLAGS) $(LDFLAGS) \
|
|
bodyPart.o boni.o bonus.o levels.o people.o statusBar.o ticker.o \
|
|
timer.o walls.o worm.o xnibbles.o xpms.o $(OBJECTS) deadWorm.o counter.o \
|
|
- -o xnibbles -lm -lXpm -lX11
|
|
+ -o xnibbles -lm -lXpm -lX11 ${LIBOSSAUDIO}
|
|
|
|
xnleditor: xnleditor/level.o xnleditor/newWalls.o xnleditor/sideBar.o xnleditor/walls.o xnleditor/xnleditor.o xnleditor/xpms.o xnleditor/numericDisplay.o
|
|
$(CC) $(CFLAGS) $(LDFLAGS) \
|
|
@@ -115,20 +116,15 @@ tar: pristine
|
|
(cd ..; tar -cvzf xnibbles.tgz xnibbles/ ; chmod 644 xnibbles.tgz)
|
|
|
|
install:
|
|
- $(INSTALL) -d $(DATADIR) -g $(GROUP) -m 755 -o $(USER)
|
|
- $(INSTALL) -d $(DATADIR)/levels -g $(GROUP) -m 755 -o $(USER)
|
|
- $(INSTALL) -d $(DATADIR)/sounds -g $(GROUP) -m 755 -o $(USER)
|
|
- $(INSTALL) -d $(PREFIX) -g $(GROUP) -m 755 -o $(USER)
|
|
- $(INSTALL) -d $(PREFIX)/bin -g $(GROUP) -m 755 -o $(USER)
|
|
- $(INSTALL) -d $(PREFIX)/man -g $(GROUP) -m 755 -o $(USER)
|
|
- $(INSTALL) -d $(PREFIX)/man/man6 -g $(GROUP) -m 755 -o $(USER)
|
|
- $(INSTALL) -g $(GROUP) -m 644 -o $(USER) levels/*.xnl $(DATADIR)/levels
|
|
- $(INSTALL) -g $(GROUP) -m 644 -o $(USER) levels/README $(DATADIR)/levels
|
|
- $(INSTALL) -g $(GROUP) -m 644 -o $(USER) sounds/*.ub $(DATADIR)/sounds
|
|
- $(INSTALL) -g $(GROUP) -m 755 -o $(USER) xnibbles $(PREFIX)/bin
|
|
- $(INSTALL) -g $(GROUP) -m 755 -o $(USER) xnleditor/xnleditor $(PREFIX)/bin
|
|
- $(INSTALL) -g $(GROUP) -m 644 -o $(USER) xnibbles.6 $(PREFIX)/man/man6
|
|
- ./make-LEVELS $(DATADIR) OOGA
|
|
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(DATADIR)/levels
|
|
+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(DATADIR)/sounds
|
|
+ $(BSD_INSTALL_DATA) levels/*.xnl $(DESTDIR)$(DATADIR)/levels
|
|
+ $(BSD_INSTALL_DATA) levels/README $(DESTDIR)$(DATADIR)/levels
|
|
+ $(BSD_INSTALL_DATA) sounds/*.ub $(DESTDIR)$(DATADIR)/sounds
|
|
+ $(BSD_INSTALL_PROGRAM) xnibbles $(DESTDIR)$(PREFIX)/bin
|
|
+ $(BSD_INSTALL_PROGRAM) xnleditor/xnleditor $(DESTDIR)$(PREFIX)/bin
|
|
+ $(BSD_INSTALL_MAN) xnibbles.6 $(DESTDIR)$(PREFIX)/$(PKGMANDIR)/man6
|
|
+ ./make-LEVELS $(DESTDIR)$(DATADIR) $(DATADIR) OOGA
|
|
|
|
bodyPart.o: common.h bodyPart.h
|
|
boni.o: common.h boni.h
|