$NetBSD: patch-aa,v 1.6 2010/01/31 23:45:58 joerg Exp $ --- makefile.orig Wed Apr 22 22:41:21 1998 +++ makefile Sun Sep 13 23:25:17 1998 @@ -14,16 +14,21 @@ OPTFLAG= 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= # XLIB=-L/usr/openwin/lib -lX11 # CFLAGS=-I/usr/openwin/include -# XLIB=-L /usr/X11R6/lib -lX11 -lcompat -# CFLAGS=-I/usr/X11/include +XLIB= -Wl,-R$(X11BASE)/lib -L$(X11BASE)/lib -lX11 #-lcompat +CFLAGS= -I$(X11BASE)/include $(DIRS) OBJECTS=galaxa.o hints.o randnum.o setup.o text.o soundmgr.o @@ -39,30 +44,24 @@ galaxa: $(OBJECTS) - $(CC) $(OBJECTS) $(XLIB) $(MATHLIB) $(CFLAGS) $(OPTFLAG) -o galaxa + $(CC) $(XLIB) $(MATHLIB) $(CFLAGS) $(OPTFLAG) -o $@ $(OBJECTS) chmod 755 galaxa $(POSTPROCESS) galaxa +install: galaxa + ${BSD_INSTALL_PROGRAM} galaxa $(INSTALLROOT)/bin + mkdir -p $(DATA) + mkdir -p $(SOUNDS) + mkdir -p $(IMAGES) + ${BSD_INSTALL_DATA} sounds/* $(SOUNDS) + ${BSD_INSTALL_DATA} images/* $(IMAGES) + ${BSD_INSTALL_DATA} galaxa-highs.dat ${INSTALLROOT}/share/examples/galaxa -#-- 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