# Makefile for   drax

# -Wall -Wwrite-strings -Wpointer-arith -Wconversion -Wstrict-prototypes -Wmissing-prototypes
#WARNINGS = -Wall

LIBS = -lfli -lgif -ltiff -ljpeg -lalleg
CC = gcc
#CFLAGS = -s -O3 -ffast-math -fomit-frame-pointer $(WARNINGS)
CFLAGS = -O3 -s $(WARNINGS)
#CFLAGS = -O3 $(WARNINGS)
LINK = $(CC) $(CFLAGS) -o exa.exe -I. -mwindows $(OBJ) $(LIBS)

# I have removed dxe.o, gbminit.o, gbmalleg.o and fsel.o (must replace these)
# added comdlg.c for common dialogs, using windows dialog.
OBJ = btn.o btnsub.o butil.o clip.o comdlg.o coord.o data.o dlg.o \
      dlg_prj.o dll.o dll2.o ed.o fill.o fnt.o gbmalleg.o \
      gbminit.o grey.o jpeg.o link.o ll.o lod.o main.o md.o md2.o mtd.o    \
      pal.o rect.o subs.o tb.o tif.o windib.o zoom.o exa.o




all: $(OBJ)
	$(LINK)
link:
	$(LINK)



exa.o : exa.rc
	windres $< -O COFF -o $@


btn.o: btn.c data.h types.h global.h fnt.h method.h btnsub.h butil.h \
 fill.h ll.h tb.h md2.h subs.h clip.h dlg.h zoom.h md.h ed.h btn.h \
 dlg_prj.h
btnsub.o: btnsub.c data.h types.h global.h fnt.h method.h fill.h ll.h \
 tb.h md2.h btn.h subs.h clip.h dlg.h zoom.h md.h ed.h main.h
butil.o: butil.c data.h types.h global.h fnt.h butil.h
clip.o: clip.c data.h types.h global.h fnt.h method.h grey.h clip.h \
 dlg.h fsel.h zoom.h butil.h ll.h coord.h subs.h btn.h rect.h pal.h \
 md2.h mtd.h tb.h md.h
comdlg.o: comdlg.c comdlg.h
coord.o: coord.c data.h types.h global.h fnt.h coord.h
data.o: data.c ed.h tb.h global.h fnt.h btn.h data.h types.h btnsub.h \
 windib.h
dlg.o: dlg.c global.h fnt.h data.h types.h zoom.h ll.h ed.h comdlg.h \
 btn.h dlg.h subs.h butil.h libfli/fli.h libfli/flilib.h \
 libgif/gif_lib.h
dlg_prj.o: dlg_prj.c global.h fnt.h data.h types.h subs.h comdlg.h \
 ed.h dlg.h
dll.o: dll.c types.h data.h global.h fnt.h btn.h dlg.h clip.h ll.h \
 tb.h ed.h subs.h butil.h lod.h dllbtn/mtds.h dll2.h
dll2.o: dll2.c dllbtn/mtds.h gbminit.h dllgbm/gbmerr.h
ed.o: ed.c ed.h
fill.o: fill.c data.h types.h global.h fnt.h ll.h ed.h dlg.h butil.h \
 grey.h subs.h
fnt.o: fnt.c fnt.h ed.h subs.h dlg.h data.h types.h global.h butil.h
gbmalleg.o: gbmalleg.c data.h types.h global.h fnt.h dllgbm/gbminit.h \
 dllgbm/standard.h dllgbm/gbmerr.h gbminit.h butil.h subs.h
gbminit.o: gbminit.c dllgbm/gbminit.h dllgbm/standard.h \
 dllgbm/gbmerr.h butil.h dll2.h gbminit.h
grey.o: grey.c data.h types.h global.h fnt.h grey.h dlg.h subs.h ll.h
jpeg.o: jpeg.c butil.h subs.h
link.o: link.c link.h
ll.o: ll.c data.h types.h global.h fnt.h ll.h
lod.o: lod.c types.h lod.h dllbtn/mtds.h global.h fnt.h link.h butil.h
main.o: main.c method.h types.h data.h global.h fnt.h btn.h ll.h tb.h \
 ed.h jpeg.h subs.h butil.h gbminit.h dllgbm/gbmerr.h \
 dllgbm/gbmalleg.h tif.h fnt8x16.h fnt8x8b.h fnt23b.h fnt6x8.h
md.o: md.c data.h types.h global.h fnt.h method.h md.h ll.h tb.h md2.h \
 dlg.h subs.h btn.h zoom.h coord.h main.h butil.h
md2.o: md2.c data.h types.h global.h fnt.h method.h ll.h subs.h btn.h \
 zoom.h coord.h md.h tb.h ed.h
mtd.o: mtd.c data.h types.h global.h fnt.h ll.h mtd.h butil.h
pal.o: pal.c data.h types.h global.h fnt.h dlg.h comdlg.h zoom.h \
 subs.h tb.h md.h butil.h libfli/fli.h libfli/flilib.h \
 libgif/gif_lib.h
rect.o: rect.c rect.h
subs.o: subs.c data.h types.h global.h fnt.h ll.h dlg.h comdlg.h \
 fsel.h zoom.h ed.h btnsub.h method.h butil.h tb.h btn.h md.h subs.h \
 libfli/fli.h libfli/flilib.h libgif/gif_lib.h
tb.o: tb.c tb.h global.h fnt.h data.h types.h method.h clip.h zoom.h \
 grey.h md.h ed.h btn.h ll.h butil.h subs.h
tif.o: tif.c tif.h data.h types.h global.h fnt.h
windib.o: windib.c data.h types.h global.h fnt.h windib.h ll.h tb.h \
 btnsub.h ed.h
zoom.o: zoom.c data.h types.h global.h fnt.h ll.h subs.h coord.h \
 rect.h zoom.h butil.h
exa.o : exa.rc


