# ximage makefile #
CC	= gcc
CFLAGS	= -O2 -Wall
LDFLAGS = -lz -lm

OBJS	= 	ximage_mrf.o ximage_xpm.o  ximage_pcx.o \
	   		ximage_png.o ximage_prf.o ximage_tiff.o \
			ximage_pnm.o  ximage_bmp.o  ximage_gif.o\
			ximage_other_xpm.o ximage_other_gif.o	\
			chunks.o ximage.o ximage_main.o
IMG_TYPES = *.png *.mrf *.prf *.tiff *.xpm *.gif *.pnm \
			*.bmp *.pcx

all: xmtool command

xmtool: $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)

command: command_shell.c
	$(CC) $(CFLAGS) -o $@ $^

clean:
	rm -f *~ $(OBJS) $(IMG_TYPES) xmtool command core *.core

cleanimg:
	rm -f $(IMG_TYPES)
