CC = gcc
CFLAGS = -Wall -O2

ifdef DJDIR
	# djgpp.
	PROGRAM = surround.exe
	LIBS = -ljgmod -lalleg
else
	# Assume Unix.
	PROGRAM = surround
	LIBS = -ljgmod `allegro-config --libs`
endif

OBJ = surround.o

$(PROGRAM): $(OBJ)
	$(CC) -o $@ $< $(LIBS)

suidroot:
	chown root.games $(PROGRAM)
	chmod 4750 $(PROGRAM)

clean:
	rm -f $(OBJ) $(PROGRAM)
