# makefile for GalaXa

# A space shoot-up game for X-Window

# by Bill Kendrick
# kendrick@zippy.sonoma.edu
# http://zippy.sonoma.edu/kendrick/

# April 6, 1998 - April 22, 1998


CC=gcc
MATHLIB=-lm
OPTFLAG=

POSTPROCESS=strip


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


OBJECTS=galaxa.o hints.o randnum.o setup.o text.o soundmgr.o

#-- Makefile commands--#

all:	galaxa
	chmod 755 sounds images
	chmod 644 *.c *.h *.txt sounds/*.au images/*.ppm

clean:
	rm *.o galaxa galaxa-highs.dat


galaxa:	$(OBJECTS)
	$(CC)	$(OBJECTS) $(XLIB) $(MATHLIB) $(CFLAGS) $(OPTFLAG) -o galaxa
	chmod 755 galaxa
	$(POSTPROCESS) galaxa


#-- App object--#

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

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
