1CROSS	=
2CC	= $(CROSS)gcc
3
4DLLNAME = libtiff-5.dll
5LIBNAME = libtiff.dll.a
6INCLUDES= -I. -Iexternal/include
7CPPFLAGS= -DDLL_EXPORT
8CFLAGS	= -O2 -Wall
9LDFLAGS = -Wl,--enable-auto-image-base -Wl,--no-undefined
10LDLIBS	= -Lexternal/lib -ljpeg -lz
11
12OBJ =	tif_aux.o \
13	tif_close.o \
14	tif_codec.o \
15	tif_color.o \
16	tif_compress.o \
17	tif_dir.o \
18	tif_dirinfo.o \
19	tif_dirread.o \
20	tif_dirwrite.o \
21	tif_dumpmode.o \
22	tif_error.o \
23	tif_extension.o \
24	tif_fax3.o \
25	tif_fax3sm.o \
26	tif_flush.o \
27	tif_getimage.o \
28	tif_jbig.o \
29	tif_jpeg.o \
30	tif_jpeg_12.o \
31	tif_luv.o \
32	tif_lzma.o \
33	tif_lzw.o \
34	tif_next.o \
35	tif_ojpeg.o \
36	tif_open.o \
37	tif_packbits.o \
38	tif_pixarlog.o \
39	tif_predict.o \
40	tif_print.o \
41	tif_read.o \
42	tif_strip.o \
43	tif_swab.o \
44	tif_thunder.o \
45	tif_tile.o \
46	tif_version.o \
47	tif_warning.o \
48	tif_write.o \
49	tif_zip.o \
50	tif_win32.o
51
52all: $(DLLNAME)
53
54.PHONY: clean distclean
55.SUFFIXES:
56.SUFFIXES: .o .c
57
58%.o: ../%.c
59	$(CC) -c $(CPPFLAGS) $(INCLUDES) $(CFLAGS) -o $@ $<
60
61$(DLLNAME): $(OBJ)
62	$(CC) -shared -o $(DLLNAME) ../libtiff.def $(OBJ) $(LDFLAGS) $(LDLIBS) \
63		-Xlinker --out-implib -Xlinker $(LIBNAME)
64
65distclean: clean
66	$(RM) *.dll *.a
67clean:
68	$(RM) *.o
69