# File: Makefile.ibm

#
# Makefile support for "main-ibm.c"
#
# See "main-ibm.c" for more information.
#


#
# Basic definitions
#

# Objects
OBJS = \
  main.o \
  main-ibm.o \
  birth.o \
  cave.o \
  cmd-attk.o \
  cmd-book.o \
  cmd-item.o \
  cmd-know.o \
  cmd-misc.o \
  cmd-util.o \
  dungeon.o \
  effects.o \
  files.o \
  generate.o \
  info.o \
  init1.o \
  init2.o \
  load.o \
  melee1.o \
  melee2.o \
  monster1.o \
  monster2.o \
  monster3.o \
  object1.o \
  object2.o \
  object3.o \
  powers.o \
  quest.o \
  save.o \
  spells1.o \
  spells2.o \
  squelch.o \
  store.o \
  traps.o \
  tables.o \
  util.o \
  variable.o \
  wizard.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 -pedantic -O2 -fno-strength-reduce -s -DUSE_IBM

# Libraries
LIBS = -lpc


#
# Targets
#

default: angband.exe
	copy angband.exe ..
	del angband.exe

install: angband.exe
	copy angband.exe ..

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


#
# Link executables
#

angband.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

