# CVS: Last edit by $Author: rr9 $ on $Date: 2000/05/28 15:07:47 $
# File: Makefile.ibm

# Purpose: Makefile support for "main-ibm.c" and Gnu C

# Note: Rename to "Makefile" before using
# Added extra targets: mrmarcel@eos.ncsu.edu (Mike Marcelais)

OBJS = \
	main.o main-ibm.o \
	artifact.o avatar.o birth.o bldg.o \
	cave.o cmd1.o cmd2.o cmd3.o \
	cmd4.o cmd5.o cmd6.o dungeon.o \
	effects.o files.o flavor.o generate.o \
	grid.o init1.o init2.o load.o \
	melee1.o melee2.o mind.o monster1.o \
	monster2.o mspells1.o mspells2.o mutation.o \
	notes.o \
	obj_kind.o object1.o object2.o racial.o \
	rooms.o save.o scores.o script.o \
	spells1.o spells2.o spells3.o store.o \
	streams.o tables.o util.o variable.o \
	wild.o wizard1.o wizard2.o xtra1.o \
	xtra2.o z-form.o z-rand.o z-term.o \
	z-util.o z-virt.o \

# Compiler

CC = gcc

# Compiler flags

CFLAGS = -Wall -O2 -fno-strength-reduce -DUSE_IBM

# Libraries

LIBS = -lpc
GLIBS= -lgrx20

#
# Targets
#

default: zangband.exe
	copy zangband.exe ..
	del zangband.exe

install: zangband.exe
	copy zangband.exe ..

all: zangband.exe
	@echo All done.  Use 'make install' to install.

#
# Link Executables
#

zangband.exe: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)

# Compile source files

.c.o:
	$(CC) $(CFLAGS) -c $*.c


#
# Clean up
#

clean:
	del *.o

cleanall: clean
	del *.exe

