# makefile for 3dpong

# by Bill Kendrick
# kendrick@zippy.sonoma.edu

# New Breed Software
# http://zippy.sonoma.edu/kendrick/nbs/

# December 9, 1997 - January 26, 1998


# Makefile user-definable variables

CC=gcc
MATHLIB=-lm

# adjust according to target
XLIB=-lX11

# uncomment for sunos/solaris
#XLIB=-L/usr/openwin/lib -lX11

# uncomment for FreeBSD
#XLIB=-L /usr/X11R6/lib -lX11 -lcompat


# Makefile other variables

OBJECTS=3dpong.o window.o connect.o hints.o visual.o gc.o color.o randnum.o \
	text.o


# Makefile commands: 

all:	3dpong
	chmod 755 go handball sounds
	chmod 644 *.c *.h makefile sounds/*.au *.txt

clean:
	rm *.o


# Application:

3dpong:	$(OBJECTS)
	$(CC)	$(OBJECTS) $(XLIB) $(MATHLIB) -o 3dpong
	chmod 755 3dpong
	strip 3dpong


# Application object:

3dpong.o:	3dpong.c window.h connect.h hints.h visual.h gc.h color.h \
		randnum.h text.h
	$(CC)	3dpong.c -c


# Library objects:

window.o:	window.c window.h
	$(CC)	window.c -c

connect.o:	connect.c connect.h
	$(CC)	connect.c -c

hints.o:	hints.c hints.h
	$(CC)	hints.c -c

visual.o:	visual.c visual.h
	$(CC)	visual.c -c

gc.o:	gc.c gc.h
	$(CC)	gc.c -c

color.o:	color.c color.h
	$(CC)	color.c -c

randnum.o:	randnum.c randnum.h
	$(CC)	randnum.c -c

text.o:		text.c text.h
	$(CC)	text.c -c
