INSTALLDIR=/usr/local/bin


PROG=qlaunch
CC=gcc
CFLAGS = -I. -O2 -Wall -fomit-frame-pointer
#CFLAGS = -g -I. -Wall
LIBS = -lm -lncurses

# Change this to install somewhere else
INSTALLDIR=/usr/local/bin
INSTALLUSER=root
INSTALLGROUP=root
INSTALLMODE=0755

all:	$(PROG)

OBJS = main.o qstat.o misc.o utils.o browse.o sort.o init.o readconfig.o cache.o windows.o

$(PROG): $(OBJS) $(COPTS) 
	$(CC) -o qlaunch $(OBJS) $(LIBS)
	strip qlaunch
	@echo
	@echo Type \"make install\" to install it.  
	@echo
	@echo psst!  I\'m trying to get some usage data from my users,
	@echo so if you have a free second, please send a message to:
	@echo
	@echo     deyes@san.rr.com
	@echo     Subject: QuakeLaunch User
	@echo
	@echo The rest of the message can be blank.  I appreciate it!
	@echo 
	@echo - Mark
	@echo

clean:
	rm -f $(OBJS) *~ $(PROG) DEADJOE *.bak

install: all
	install -g $(INSTALLGROUP) -o $(INSTALLUSER) -m $(INSTALLMODE) $(PROG) $(INSTALLDIR)
	@echo ==================================
	@echo Now edit qlaunch.conf and copy it
	@echo to ~/.qlaunchrc
	@echo
	@echo Type qlaunch to run the browser
	@echo ==================================
		
