Subject: pkg/5941: galaxa doesnt build on alpha
To: None <gnats-bugs@gnats.netbsd.org>
From: Tim Rightnour <root@polaris.garbled.net>
List: netbsd-bugs
Date: 08/09/1998 04:23:16
>Number:         5941
>Category:       pkg
>Synopsis:       galaxa doesnt build on alpha
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug  9 04:35:01 1998
>Last-Modified:
>Originator:     Tim Rightnour
>Organization:
Tim Rightnour    -  root@garbled.net
http://www.zynetwc.com/~garbled/garbled.html
>Release:        6/10/98<NetBSD-current source date>
>Environment:
	
System: NetBSD polaris 1.3 NetBSD 1.3 (POLARIS) #0: Thu Mar 26 13:17:18 MST 1998 root@polaris:/usr/src/sys/arch/i386/compile/POLARIS i386


>Description:
Once again beavis.. I flubbed the rpath..
	
>How-To-Repeat:
Blame it on someone else, then reference PR 5846 in your own defence.. 
	
>Fix:
$NetBSD: patch-aa,v 1.2 1998/08/07 10:40:40 agc Exp $

--- makefile.orig	Wed Apr 22 22:41:21 1998
+++ makefile	Fri Jul 24 04:39:58 1998
@@ -16,6 +16,11 @@
 POSTPROCESS=strip
+INSTALLROOT=$(PREFIX)
+SOUNDS=$(INSTALLROOT)/share/galaxa/sounds
+IMAGES=$(INSTALLROOT)/share/galaxa/images
+DATA=$(INSTALLROOT)/share/galaxa
 
+DIRS= -DSOUNDS=\"$(SOUNDS)\" -DIMAGES=\"$(IMAGES)\" -DDATA=\"$(DATA)\"
 
-XLIB=-lX11
-CFLAGS=
+#XLIB=-lX11
+#CFLAGS=
 
@@ -24,4 +29,4 @@
 
-# XLIB=-L /usr/X11R6/lib -lX11 -lcompat
-# CFLAGS=-I/usr/X11/include
+XLIB=	-Wl,-R$(INSTALLROOT)/lib -L$(INSTALLROOT)/lib -lX11 #-lcompat
+CFLAGS=	-I$(INSTALLROOT)/include $(DIRS)
 
@@ -41,3 +46,3 @@
 galaxa:	$(OBJECTS)
-	$(CC)	$(OBJECTS) $(XLIB) $(MATHLIB) $(CFLAGS) $(OPTFLAG) -o galaxa
+	$(CC) $(XLIB) $(MATHLIB) $(CFLAGS) $(OPTFLAG) -o $@ $(OBJECTS)
 	chmod 755 galaxa
@@ -45,24 +50,18 @@
 
+install: galaxa
+	install -g games -o bin -m 2755 galaxa $(INSTALLROOT)/bin
+	mkdir -p $(DATA)
+	mkdir -p $(SOUNDS)
+	mkdir -p $(IMAGES)
+	install -g bin -o bin -m 0644 sounds/* $(SOUNDS)
+	install -g bin -o bin -m 0644 images/* $(IMAGES)
+	install -g games -o bin -m 0664 galaxa-highs.dat $(DATA)
 
-#-- App object--#
+#-- Dependencies --#
 
 galaxa.o:	galaxa.c hints.h randnum.h setup.h text.h soundmgr.h
-	$(CC)	galaxa.c -c
-
-
-#-- Lib objects--#
-
 hints.o:	hints.c hints.h
-	$(CC)	hints.c -c
-
-text.o:	text.c text.h
-	$(CC)	text.c -c
-
+text.o:		text.c text.h
 soundmgr.o:	soundmgr.c soundmgr.h
-	$(CC)	soundmgr.c -c
-
 randnum.o:	randnum.c randnum.h
-	$(CC)	randnum.c -c
-
 setup.o:	setup.c setup.h hints.h text.h soundmgr.h randnum.h
-	$(CC)	setup.c -c

	
>Audit-Trail:
>Unformatted: