0
|
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 has been tested with gcc 3.1,
|
|
6 |
# binutils 2.12.90 and mingw-runtime 2.0
|
|
7 |
#
|
|
8 |
# By Benoit Blanchon - benoit.blanchon@laposte.net
|
|
9 |
# DLL mods by F. Richter <frichter@gmx.li>
|
|
10 |
#
|
|
11 |
|
|
12 |
# outputs
|
|
13 |
LIBMNG_A = libmng.a
|
|
14 |
LIBMNG_DLL = libmng.1.dll
|
|
15 |
INSTALL_PREFIX = C:/MinGW/
|
|
16 |
# maybe you sould replace with anti-slashes
|
|
17 |
|
|
18 |
# default build options
|
|
19 |
OPTIONS = -DMNG_BUILD_DLL -DMNG_ACCESS_CHUNKS -DMNG_STORE_CHUNKS
|
|
20 |
|
|
21 |
# Where the zlib library and include files are located
|
|
22 |
ZLIBLIB=-lz
|
|
23 |
#ZLIBLIB=-L../zlib -lz
|
|
24 |
#ZLIBINC=-I../zlib
|
|
25 |
|
|
26 |
# Where the jpeg library and include files are located
|
|
27 |
JPEGLIB=-ljpeg
|
|
28 |
#JPEGLIB=-L../jpgsrc -ljpeg
|
|
29 |
#JPEGINC=-I../jpgsrc
|
|
30 |
|
|
31 |
# Where the lcms library and include files are located
|
|
32 |
#LCMSLIB=-llcms
|
|
33 |
LCMSLIB=-L../lcms/lib -llcms
|
|
34 |
LCMSINC=-I../lcms/source
|
|
35 |
|
|
36 |
# file deletion command
|
|
37 |
RM=rm -f
|
|
38 |
#RM=del
|
|
39 |
|
|
40 |
# directory creation command
|
|
41 |
MKDIR=mkdir -p
|
|
42 |
|
|
43 |
# file copy command
|
|
44 |
COPY=cp
|
|
45 |
#COPY=copy
|
|
46 |
|
|
47 |
# compiler
|
|
48 |
CC=gcc
|
|
49 |
|
|
50 |
ALIGN=
|
|
51 |
# for i386:
|
|
52 |
#ALIGN=-malign-loops=2 -malign-functions=2
|
|
53 |
|
|
54 |
CFLAGS=$(ZLIBINC) $(JPEGINC) $(LCMSINC) -Wall -O3 -funroll-loops $(OPTIONS) $(ALIGN) -s
|
|
55 |
LDFLAGS=-L. -lmng $(ZLIBLIB) $(JPEGLIB) $(LCMSLIB) -lm -s
|
|
56 |
|
|
57 |
INCPATH=$(prefix)/include
|
|
58 |
LIBPATH=$(prefix)/lib
|
|
59 |
|
|
60 |
OBJS = \
|
|
61 |
libmng_callback_xs.o \
|
|
62 |
libmng_chunk_io.o \
|
|
63 |
libmng_chunk_descr.o \
|
|
64 |
libmng_chunk_prc.o \
|
|
65 |
libmng_chunk_xs.o \
|
|
66 |
libmng_cms.o \
|
|
67 |
libmng_display.o \
|
|
68 |
libmng_dither.o \
|
|
69 |
libmng_error.o \
|
|
70 |
libmng_filter.o \
|
|
71 |
libmng_hlapi.o \
|
|
72 |
libmng_jpeg.o \
|
|
73 |
libmng_object_prc.o \
|
|
74 |
libmng_pixels.o \
|
|
75 |
libmng_prop_xs.o \
|
|
76 |
libmng_read.o \
|
|
77 |
libmng_trace.o \
|
|
78 |
libmng_write.o \
|
|
79 |
libmng_zlib.o
|
|
80 |
|
|
81 |
.SUFFIXES: .c .o
|
|
82 |
|
|
83 |
.c.o:
|
|
84 |
$(CC) -c $(CFLAGS) -o $@ $*.c
|
|
85 |
|
|
86 |
all: $(LIBMNG_A)
|
|
87 |
|
|
88 |
$(LIBMNG_A): $(LIBMNG_DLL)
|
|
89 |
|
|
90 |
$(LIBMNG_DLL) : $(OBJS)
|
|
91 |
dllwrap --implib=$(LIBMNG_A) --dllname=$(LIBMNG_DLL) $(OBJS) $(LDFLAGS)
|
|
92 |
|
|
93 |
install : $(LIBMNG_A)
|
|
94 |
$(MKDIR) $(INSTALL_PREFIX)include
|
|
95 |
$(COPY) libmng.h $(INSTALL_PREFIX)include
|
|
96 |
$(COPY) libmng_conf.h $(INSTALL_PREFIX)include
|
|
97 |
$(COPY) libmng_types.h $(INSTALL_PREFIX)include
|
|
98 |
$(MKDIR) $(INSTALL_PREFIX)lib
|
|
99 |
$(COPY) $(LIBMNG_A) $(INSTALL_PREFIX)lib
|
|
100 |
|
|
101 |
clean:
|
|
102 |
$(RM) *.o
|
|
103 |
|
|
104 |
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
105 |
|
|
106 |
libmng_hlapi.o : libmng_hlapi.c libmng.h libmng_conf.h libmng_types.h \
|
|
107 |
libmng_data.h libmng_objects.h libmng_object_prc.h \
|
|
108 |
libmng_chunks.h libmng_memory.h libmng_error.h libmng_trace.h libmng_read.h \
|
|
109 |
libmng_write.h libmng_display.h libmng_zlib.h libmng_cms.h libmng_zlib.h
|
|
110 |
libmng_callback_xs.o : libmng_callback_xs.c libmng.h \
|
|
111 |
libmng_conf.h libmng_types.h libmng_data.h libmng_error.h libmng_trace.h
|
|
112 |
libmng_prop_xs.o : libmng_prop_xs.c libmng.h libmng_conf.h \
|
|
113 |
libmng_types.h libmng_data.h libmng_error.h libmng_trace.h libmng_cms.h
|
|
114 |
libmng_chunk_xs.o : libmng_chunk_xs.c libmng.h libmng_conf.h \
|
|
115 |
libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h \
|
|
116 |
libmng_error.h libmng_trace.h
|
|
117 |
libmng_read.o : libmng_read.c libmng.h libmng_conf.h libmng_types.h \
|
|
118 |
libmng_data.h libmng_objects.h libmng_object_prc.h \
|
|
119 |
libmng_chunks.h libmng_chunk_prc.h libmng_chunk_io.h libmng_memory.h \
|
|
120 |
libmng_error.h libmng_trace.h libmng_read.h libmng_display.h
|
|
121 |
libmng_write.o : libmng_write.c libmng.h libmng_conf.h libmng_types.h \
|
|
122 |
libmng_data.h libmng_error.h libmng_trace.h libmng_write.h
|
|
123 |
libmng_display.o : libmng_display.c libmng.h libmng_conf.h \
|
|
124 |
libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
|
|
125 |
libmng_error.h libmng_trace.h libmng_zlib.h libmng_cms.h libmng_pixels.h \
|
|
126 |
libmng_display.h
|
|
127 |
libmng_object_prc.o : libmng_object_prc.c libmng.h libmng_conf.h \
|
|
128 |
libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
|
|
129 |
libmng_error.h libmng_trace.h libmng_display.h libmng_pixels.h
|
|
130 |
libmng_chunk_descr.o : libmng_chunk_descr.c libmng.h libmng_conf.h \
|
|
131 |
libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_descr.h \
|
|
132 |
libmng_chunk_prc.h libmng_memory.h libmng_error.h libmng_trace.h
|
|
133 |
libmng_chunk_prc.o : libmng_chunk_prc.c libmng.h libmng_conf.h \
|
|
134 |
libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h libmng_memory.h \
|
|
135 |
libmng_error.h libmng_trace.h
|
|
136 |
libmng_chunk_io.o : libmng_chunk_io.c libmng.h libmng_conf.h \
|
|
137 |
libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h \
|
|
138 |
libmng_chunks.h libmng_chunk_io.h libmng_chunk_prc.h libmng_memory.h libmng_error.h \
|
|
139 |
libmng_trace.h libmng_display.h libmng_zlib.h libmng_pixels.h
|
|
140 |
libmng_error.o : libmng_error.c libmng.h libmng_conf.h libmng_types.h \
|
|
141 |
libmng_data.h libmng_error.h libmng_trace.h
|
|
142 |
libmng_trace.o : libmng_trace.c libmng.h libmng_conf.h libmng_types.h \
|
|
143 |
libmng_data.h libmng_error.h libmng_trace.h
|
|
144 |
libmng_pixels.o : libmng_pixels.c libmng.h libmng_conf.h libmng_types.h \
|
|
145 |
libmng_data.h libmng_objects.h libmng_memory.h libmng_error.h libmng_trace.h \
|
|
146 |
libmng_cms.h libmng_filter.h libmng_pixels.h
|
|
147 |
libmng_filter.o : libmng_filter.c libmng.h libmng_conf.h libmng_types.h \
|
|
148 |
libmng_data.h libmng_error.h libmng_trace.h libmng_filter.h
|
|
149 |
libmng_dither.o : libmng_dither.c libmng.h libmng_conf.h libmng_types.h \
|
|
150 |
libmng_data.h libmng_error.h libmng_trace.h libmng_dither.h
|
|
151 |
libmng_zlib.o : libmng_zlib.c libmng.h libmng_conf.h libmng_types.h \
|
|
152 |
libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h \
|
|
153 |
libmng_filter.h libmng_zlib.h
|
|
154 |
libmng_jpeg.o : libmng_jpeg.c libmng.h libmng_conf.h libmng_types.h \
|
|
155 |
libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h libmng_jpeg.h
|
|
156 |
libmng_cms.o : libmng_cms.c libmng.h libmng_conf.h libmng_types.h \
|
|
157 |
libmng_data.h libmng_objects.h libmng_error.h libmng_trace.h libmng_cms.h
|
|
158 |
|