#
# xrick/src/Makefile
#
# This source code file is part of the xrick distribution, and as such is
# copyrighted. Please read the README file in the root directory of the
# distribution for information about copyrights, trademarks, license,
# disclaimers, etc.
#

#
# includes
#
#
ifeq (.depend, $(wildcard .depend))
include .depend
endif

include ../Makefile.global

#
# defs
#
#
TARGET = ../xrick
OBJECTS = scr_xrick.o scr_pause.o scr_imain.o scr_imap.o scr_gameover.o scr_getname.o dat_pics.o dat_screens.o dat_tiles.o dat_maps.o dat_ents.o dat_sprites.o ents.o e_bullet.o e_bomb.o e_rick.o e_sbonus.o e_them.o e_bonus.o e_box.o rects.o util.o game.o xrick.o draw.o maps.o sysvid.o syskbd.o control.o system.o scroller.o sysevt.o sysarg.o
LINKS = dat_pics.c dat_sprites.c dat_tiles.c xrick.ico

#
# rules
#
#

all: $(TARGET)

$(TARGET): $(OBJECTS) $(XTRAOBJ)
	$(CC) $(OBJECTS) $(XTRAOBJ) $(LDFLAGS) -o $(TARGET)

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@

xrick.res: xrick.rc
	windres $< -O coff -o $@

clean:
	rm -f *~ *.o core .depend $(TARGET)
	rm -f *.exe *.core *.res
	rm -f $(LINKS)

depend:
	for i in *.c; do $(CPP) $(CFLAGS) -I$(ROOTDIR)/include -MM $$i; done > .depend

# eof




