|
1 # |
|
2 # For conditions of distribution and use, see copyright notice in libmng.h |
|
3 # |
|
4 # makefile for libmng - THE MNG library |
|
5 # this makefile is for MinGW32, it have been tested with gcc 2.95.3, |
|
6 # binutils 2.11.90 and mingw-runtime 1.0 |
|
7 # |
|
8 # By Benoit Blanchon - benoit.blanchon@laposte.net |
|
9 # |
|
10 # Note : this makefile builds a static library; although it's seems to be |
|
11 # possible to build working DLL and import lib, I didn't manage do to it. |
|
12 # If you do, please let me know. |
|
13 |
|
14 # outputs |
|
15 LIBMNG_A = libmng.a |
|
16 INSTALL_PREFIX = C:/MinGW/ |
|
17 # maybe you sould replace with anti-slashes |
|
18 |
|
19 # default build options |
|
20 OPTIONS = -DMNG_NO_CMS -DMNG_ACCESS_CHUNKS -DMNG_STORE_CHUNKS |
|
21 |
|
22 # Where the zlib library and include files are located |
|
23 ZLIBLIB=-lz |
|
24 #ZLIBLIB=-L../zlib -lz |
|
25 #ZLIBINC=-I../zlib |
|
26 |
|
27 # Where the jpeg library and include files are located |
|
28 JPEGLIB=-ljpeg |
|
29 #JPEGLIB=-L../jpgsrc -ljpeg |
|
30 #JPEGINC=-I../jpgsrc |
|
31 |
|
32 # Where the lcms library and include files are located |
|
33 #LCMSLIB=-llcms |
|
34 #LCMSLIB=-L../lcms/lib -llcms |
|
35 #LCMSINC=-I../lcms/source |
|
36 |
|
37 # file deletion command |
|
38 RM=rm -f |
|
39 #RM=del |
|
40 |
|
41 # directory creation command |
|
42 MKDIR=mkdir -p |
|
43 |
|
44 # file copy command |
|
45 COPY=cp |
|
46 #COPY=copy |
|
47 |
|
48 # compiler |
|
49 CC=gcc |
|
50 |
|
51 ALIGN= |
|
52 # for i386: |
|
53 #ALIGN=-malign-loops=2 -malign-functions=2 |
|
54 |
|
55 CFLAGS=$(ZLIBINC) $(JPEGINC) $(LCMSINC) -Wall -O3 -funroll-loops $(OPTIONS) $(ALIGN) |
|
56 LDFLAGS=-L. -lmng $(ZLIBLIB) $(JPEGLIB) $(LCMSLIB) -lm |
|
57 |
|
58 # library (.a) file creation command |
|
59 AR= ar rc |
|
60 # second step in .a creation (use "touch" if not needed) |
|
61 AR2= ranlib |
|
62 |
|
63 INCPATH=$(prefix)/include |
|
64 LIBPATH=$(prefix)/lib |
|
65 |
|
66 OBJS = \ |
|
67 libmng_callback_xs.o \ |
|
68 libmng_chunk_io.o \ |
|
69 libmng_chunk_descr.o \ |
|
70 libmng_chunk_prc.o \ |
|
71 libmng_chunk_xs.o \ |
|
72 libmng_cms.o \ |
|
73 libmng_display.o \ |
|
74 libmng_dither.o \ |
|
75 libmng_error.o \ |
|
76 libmng_filter.o \ |
|
77 libmng_hlapi.o \ |
|
78 libmng_jpeg.o \ |
|
79 libmng_object_prc.o \ |
|
80 libmng_pixels.o \ |
|
81 libmng_prop_xs.o \ |
|
82 libmng_read.o \ |
|
83 libmng_trace.o \ |
|
84 libmng_write.o \ |
|
85 libmng_zlib.o |
|
86 |
|
87 .SUFFIXES: .c .o |
|
88 |
|
89 .c.o: |
|
90 $(CC) -c $(CFLAGS) -o $@ $*.c |
|
91 |
|
92 all: $(LIBMNG_A) |
|
93 |
|
94 $(LIBMNG_A) : $(OBJS) |
|
95 $(RM) $@ |
|
96 $(AR) $@ $(OBJS) |
|
97 $(AR2) $@ |
|
98 |
|
99 install : $(LIBMNG_A) |
|
100 $(MKDIR) $(INSTALL_PREFIX)include |
|
101 $(COPY) libmng.h $(INSTALL_PREFIX)include |
|
102 $(COPY) libmng_conf.h $(INSTALL_PREFIX)include |
|
103 $(COPY) libmng_types.h $(INSTALL_PREFIX)include |
|
104 $(MKDIR) $(INSTALL_PREFIX)lib |
|
105 $(COPY) $(LIBMNG_A) $(INSTALL_PREFIX)lib |
|
106 |
|
107 clean: |
|
108 $(RM) *.o |
|
109 |
|
110 # DO NOT DELETE THIS LINE -- make depend depends on it. |
|
111 |
|
112 libmng_hlapi.o : libmng_hlapi.c libmng.h libmng_conf.h libmng_types.h \ |
|
113 libmng_data.h libmng_objects.h libmng_object_prc.h \ |
|
114 libmng_chunks.h libmng_memory.h libmng_error.h libmng_trace.h libmng_read.h \ |
|
115 libmng_write.h libmng_display.h libmng_zlib.h libmng_cms.h libmng_zlib.h |
|
116 libmng_callback_xs.o : libmng_callback_xs.c libmng.h \ |
|
117 libmng_conf.h libmng_types.h libmng_data.h libmng_error.h libmng_trace.h |
|
118 libmng_prop_xs.o : libmng_prop_xs.c libmng.h libmng_conf.h \ |
|
119 libmng_types.h libmng_data.h libmng_error.h libmng_trace.h libmng_cms.h |
|
120 libmng_chunk_xs.o : libmng_chunk_xs.c libmng.h libmng_conf.h \ |
|
121 libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h \ |
|
122 libmng_error.h libmng_trace.h |
|
123 libmng_read.o : libmng_read.c libmng.h libmng_conf.h libmng_types.h \ |
|
124 libmng_data.h libmng_objects.h libmng_object_prc.h \ |
|
125 libmng_chunks.h libmng_chunk_prc.h libmng_chunk_io.h libmng_memory.h \ |
|
126 libmng_error.h libmng_trace.h libmng_read.h libmng_display.h |
|
127 libmng_write.o : libmng_write.c libmng.h libmng_conf.h libmng_types.h \ |
|
128 libmng_data.h libmng_error.h libmng_trace.h libmng_write.h |
|
129 libmng_display.o : libmng_display.c libmng.h libmng_conf.h \ |
|
130 libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \ |
|
131 libmng_error.h libmng_trace.h libmng_zlib.h libmng_cms.h libmng_pixels.h \ |
|
132 libmng_display.h |
|
133 libmng_object_prc.o : libmng_object_prc.c libmng.h libmng_conf.h \ |
|
134 libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \ |
|
135 libmng_error.h libmng_trace.h libmng_display.h libmng_pixels.h |
|
136 libmng_chunk_descr.o : libmng_chunk_descr.c libmng.h libmng_conf.h \ |
|
137 libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_descr.h \ |
|
138 libmng_chunk_prc.h libmng_memory.h libmng_error.h libmng_trace.h |
|
139 libmng_chunk_prc.o : libmng_chunk_prc.c libmng.h libmng_conf.h \ |
|
140 libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h libmng_memory.h \ |
|
141 libmng_error.h libmng_trace.h |
|
142 libmng_chunk_io.o : libmng_chunk_io.c libmng.h libmng_conf.h \ |
|
143 libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h \ |
|
144 libmng_chunks.h libmng_chunk_io.h libmng_chunk_prc.h libmng_memory.h libmng_error.h \ |
|
145 libmng_trace.h libmng_display.h libmng_zlib.h libmng_pixels.h |
|
146 libmng_error.o : libmng_error.c libmng.h libmng_conf.h libmng_types.h \ |
|
147 libmng_data.h libmng_error.h libmng_trace.h |
|
148 libmng_trace.o : libmng_trace.c libmng.h libmng_conf.h libmng_types.h \ |
|
149 libmng_data.h libmng_error.h libmng_trace.h |
|
150 libmng_pixels.o : libmng_pixels.c libmng.h libmng_conf.h libmng_types.h \ |
|
151 libmng_data.h libmng_objects.h libmng_memory.h libmng_error.h libmng_trace.h \ |
|
152 libmng_cms.h libmng_filter.h libmng_pixels.h |
|
153 libmng_filter.o : libmng_filter.c libmng.h libmng_conf.h libmng_types.h \ |
|
154 libmng_data.h libmng_error.h libmng_trace.h libmng_filter.h |
|
155 libmng_dither.o : libmng_dither.c libmng.h libmng_conf.h libmng_types.h \ |
|
156 libmng_data.h libmng_error.h libmng_trace.h libmng_dither.h |
|
157 libmng_zlib.o : libmng_zlib.c libmng.h libmng_conf.h libmng_types.h \ |
|
158 libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h \ |
|
159 libmng_filter.h libmng_zlib.h |
|
160 libmng_jpeg.o : libmng_jpeg.c libmng.h libmng_conf.h libmng_types.h \ |
|
161 libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h libmng_jpeg.h |
|
162 libmng_cms.o : libmng_cms.c libmng.h libmng_conf.h libmng_types.h \ |
|
163 libmng_data.h libmng_objects.h libmng_error.h libmng_trace.h libmng_cms.h |
|
164 |