#
# Makefile for musserver 0.9
#

#ULTRA_PROJECT=
ULTRA_PROJECT=1

ifndef ARCH_COPTS
ARCH_COPTS = -O2
endif

# Change these to fit your system
CC     = gcc

# Uncomment this line for extra debugging output
ifndef ULTRA_PROJECT
#CFLAGS = -g -DDEBUG -I. -Wall -O2 -m486
CFLAGS = -g -I. -Wall -O2 -m486
#CFLAGS = -I. -Wall
LIBS   = -s
else
#CFLAGS = -Wall $(ARCH_COPTS) -pipe -I. -I/usr/local/include -DULTRA_PROJECT -DSERVER_DEBUG
CFLAGS = -Wall $(ARCH_COPTS) -pipe -I. -I/usr/local/include -DULTRA_PROJECT
LIBS = -L../../lib -lgus
endif

SHELL = /bin/sh

#############################################
# Nothing below this line should be changed #
#############################################

ifndef ULTRA_PROJECT
OBJS = musserver.o readwad.o playmus.o sequencer.o
else
OBJS = musserver.o readwad.o playmus.o ultra_midi.o
endif

gcompile: musserver

musserver: $(OBJS)
	$(CC) -o $@ $(OBJS) $(LIBS)
#	cp musserver /usr/local/doom

clean:
	rm -f $(OBJS) musserver *~

all: musserver
