summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libmng/makefiles/makefile.mingw
blob: a07366c7185a2fe4e370aba344e783e5eef92bfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#
# For conditions of distribution and use, see copyright notice in libmng.h
#
# makefile for libmng - THE MNG library
# this makefile is for MinGW32, it have been tested with gcc 2.95.3, 
# binutils 2.11.90 and mingw-runtime 1.0
#
# By Benoit Blanchon - [email protected]
#
# Note : this makefile builds a static library; although it's seems to be
# possible to build working DLL and import lib, I didn't manage do to it.
# If you do, please let me know.

# outputs
LIBMNG_A   = libmng.a
INSTALL_PREFIX = C:/MinGW/
# maybe you sould replace with anti-slashes

# default build options
OPTIONS = -DMNG_NO_CMS -DMNG_ACCESS_CHUNKS -DMNG_STORE_CHUNKS

# Where the zlib library and include files are located
ZLIBLIB=-lz
#ZLIBLIB=-L../zlib -lz
#ZLIBINC=-I../zlib

# Where the jpeg library and include files are located
JPEGLIB=-ljpeg
#JPEGLIB=-L../jpgsrc -ljpeg
#JPEGINC=-I../jpgsrc

# Where the lcms library and include files are located
#LCMSLIB=-llcms
#LCMSLIB=-L../lcms/lib -llcms
#LCMSINC=-I../lcms/source

# file deletion command
RM=rm -f 
#RM=del

# directory creation command
MKDIR=mkdir -p

# file copy command
COPY=cp
#COPY=copy

# compiler
CC=gcc

ALIGN=
# for i386:
#ALIGN=-malign-loops=2 -malign-functions=2

CFLAGS=$(ZLIBINC) $(JPEGINC) $(LCMSINC) -Wall -O3 -funroll-loops $(OPTIONS) $(ALIGN)
LDFLAGS=-L. -lmng $(ZLIBLIB) $(JPEGLIB) $(LCMSLIB) -lm

# library (.a) file creation command
AR= ar rc
# second step in .a creation (use "touch" if not needed)
AR2= ranlib

INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib

OBJS = \
	libmng_callback_xs.o \
	libmng_chunk_io.o \
	libmng_chunk_prc.o \
	libmng_chunk_xs.o \
	libmng_cms.o \
	libmng_display.o \
	libmng_dither.o \
	libmng_error.o \
	libmng_filter.o \
	libmng_hlapi.o \
	libmng_jpeg.o \
	libmng_object_prc.o \
	libmng_pixels.o \
	libmng_prop_xs.o \
	libmng_read.o \
	libmng_trace.o \
	libmng_write.o \
	libmng_zlib.o

.SUFFIXES: .c .o

.c.o:
	$(CC) -c $(CFLAGS) -o $@ $*.c

all: $(LIBMNG_A)

$(LIBMNG_A) : $(OBJS)
	$(RM) $@
	$(AR) $@ $(OBJS)
	$(AR2) $@

install : $(LIBMNG_A)
	$(MKDIR)                 $(INSTALL_PREFIX)include	
	$(COPY)  libmng.h        $(INSTALL_PREFIX)include
	$(COPY)  libmng_conf.h   $(INSTALL_PREFIX)include
	$(COPY)  libmng_types.h  $(INSTALL_PREFIX)include
	$(MKDIR)                 $(INSTALL_PREFIX)lib
	$(COPY)  $(LIBMNG_A)     $(INSTALL_PREFIX)lib

clean:
	$(RM) *.o

# DO NOT DELETE THIS LINE -- make depend depends on it.

libmng_hlapi.o : libmng_hlapi.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_object_prc.h \
	libmng_chunks.h libmng_memory.h libmng_error.h libmng_trace.h libmng_read.h \
        libmng_write.h libmng_display.h libmng_zlib.h libmng_cms.h libmng_zlib.h
libmng_callback_xs.o : libmng_callback_xs.c libmng.h \
        libmng_conf.h libmng_types.h libmng_data.h libmng_error.h libmng_trace.h
libmng_prop_xs.o : libmng_prop_xs.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_error.h libmng_trace.h libmng_cms.h
libmng_chunk_xs.o : libmng_chunk_xs.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h \
        libmng_error.h libmng_trace.h
libmng_read.o : libmng_read.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_object_prc.h \
	libmng_chunks.h libmng_chunk_prc.h libmng_chunk_io.h libmng_memory.h \
        libmng_error.h libmng_trace.h libmng_read.h libmng_display.h
libmng_write.o : libmng_write.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h libmng_write.h
libmng_display.o : libmng_display.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
	libmng_error.h libmng_trace.h libmng_zlib.h libmng_cms.h libmng_pixels.h \
        libmng_display.h
libmng_object_prc.o : libmng_object_prc.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
        libmng_error.h libmng_trace.h libmng_display.h libmng_pixels.h
libmng_chunk_prc.o : libmng_chunk_prc.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h libmng_memory.h \
        libmng_error.h libmng_trace.h
libmng_chunk_io.o : libmng_chunk_io.c libmng.h libmng_conf.h \
        libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h \
        libmng_chunks.h libmng_chunk_io.h libmng_chunk_prc.h libmng_memory.h libmng_error.h \
        libmng_trace.h libmng_display.h libmng_zlib.h libmng_pixels.h
libmng_error.o : libmng_error.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h
libmng_trace.o : libmng_trace.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h
libmng_pixels.o : libmng_pixels.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_memory.h libmng_error.h libmng_trace.h \
        libmng_cms.h libmng_filter.h libmng_pixels.h
libmng_filter.o : libmng_filter.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h libmng_filter.h
libmng_dither.o : libmng_dither.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_error.h libmng_trace.h libmng_dither.h
libmng_zlib.o : libmng_zlib.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h \
        libmng_filter.h libmng_zlib.h
libmng_jpeg.o : libmng_jpeg.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_memory.h libmng_error.h libmng_trace.h libmng_pixels.h libmng_jpeg.h
libmng_cms.o : libmng_cms.c libmng.h libmng_conf.h libmng_types.h \
	libmng_data.h libmng_objects.h libmng_error.h libmng_trace.h libmng_cms.h