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 suitable for QNX Neutrino
|
|
6 |
|
|
7 |
# Configuration options are now in libmng_conf.h
|
|
8 |
|
|
9 |
# The architecture of your target
|
|
10 |
# one of arm, mips, ppc, sh, x86
|
|
11 |
ARCH = mips
|
|
12 |
|
|
13 |
# The name of the library
|
|
14 |
LIBNAME = libmng
|
|
15 |
ARNAME = $(LIBNAME).a
|
|
16 |
SONAME = $(LIBNAME).so
|
|
17 |
|
|
18 |
# current version numbers
|
|
19 |
MNGMAJ = 1
|
|
20 |
MNGMIN = 0.9
|
|
21 |
MNGVER = $(MNGMAJ).$(MNGMIN)
|
|
22 |
|
|
23 |
# The artefact output folder
|
|
24 |
OBJDIR = bin
|
|
25 |
|
|
26 |
# Location of jpeg header files
|
|
27 |
JPEG_INC = $(QNX_TARGET)/usr/include/jpeg
|
|
28 |
|
|
29 |
# Location of zlib header files
|
|
30 |
ZLIB_INC = $(QNX_TARGET)/usr/include
|
|
31 |
|
|
32 |
# Location of lcms header files
|
|
33 |
# (switch on MNG_FULL_CMS in libmng_conf.h if you want to use this)
|
|
34 |
LCMS_INC = $(QNX_TARGET)/usr/include/lcms
|
|
35 |
|
|
36 |
# default build defines
|
|
37 |
DEF =
|
|
38 |
DEF_SO = -DMNG_BUILD_SO
|
|
39 |
|
|
40 |
# compiler options:
|
|
41 |
CFLAGS = -O2 -funroll-loops
|
|
42 |
|
|
43 |
# include paths
|
|
44 |
INC = -I$(ZLIB_INC) -I$(JPEG_INC)
|
|
45 |
|
|
46 |
# The name of your C compiler:
|
|
47 |
CC = nto$(ARCH)-gcc
|
|
48 |
|
|
49 |
# source files
|
|
50 |
SRC= \
|
|
51 |
libmng_callback_xs.c \
|
|
52 |
libmng_chunk_io.c \
|
|
53 |
libmng_chunk_descr.c \
|
|
54 |
libmng_chunk_prc.c \
|
|
55 |
libmng_chunk_xs.c \
|
|
56 |
libmng_cms.c \
|
|
57 |
libmng_display.c \
|
|
58 |
libmng_dither.c \
|
|
59 |
libmng_error.c \
|
|
60 |
libmng_filter.c \
|
|
61 |
libmng_hlapi.c \
|
|
62 |
libmng_jpeg.c \
|
|
63 |
libmng_object_prc.c \
|
|
64 |
libmng_pixels.c \
|
|
65 |
libmng_prop_xs.c \
|
|
66 |
libmng_read.c \
|
|
67 |
libmng_trace.c \
|
|
68 |
libmng_write.c \
|
|
69 |
libmng_zlib.c
|
|
70 |
|
|
71 |
# object files
|
|
72 |
OBJ=$(addprefix $(OBJDIR)/$(ARCH)/, $(SRC:%.c=%.o))
|
|
73 |
|
|
74 |
# object files for shared object
|
|
75 |
OBJ_SO=$(addprefix $(OBJDIR)/$(ARCH)/, $(SRC:%.c=%.pic.o))
|
|
76 |
|
|
77 |
# type dependancies
|
|
78 |
$(OBJDIR)/$(ARCH)/%.o: %.c
|
|
79 |
$(CC) $(CFLAGS) $(INC) $(DEF) -o $@ -c $<
|
|
80 |
|
|
81 |
$(OBJDIR)/$(ARCH)/%.pic.o: %.c
|
|
82 |
$(CC) $(CFLAGS) $(INC) $(DEF_SO) -fPIC -o $@ -c $<
|
|
83 |
|
|
84 |
all: init $(ARNAME) $(SONAME)
|
|
85 |
|
|
86 |
init:
|
|
87 |
if [ ! -d $(OBJDIR)/$(ARCH) ]; then mkdir -p $(OBJDIR)/$(ARCH); fi
|
|
88 |
|
|
89 |
$(ARNAME): $(OBJ)
|
|
90 |
ar r $(OBJDIR)/$(ARCH)/$(ARNAME) $(OBJ)
|
|
91 |
|
|
92 |
$(SONAME): $(SONAME).$(MNGMAJ)
|
|
93 |
ln -sf $(OBJDIR)/$(ARCH)/$(SONAME).$(MNGMAJ) $(OBJDIR)/$(ARCH)/$(SONAME)
|
|
94 |
|
|
95 |
$(SONAME).$(MNGMAJ): $(SONAME).$(MNGVER)
|
|
96 |
ln -sf $(OBJDIR)/$(ARCH)/$(SONAME).$(MNGVER) $(OBJDIR)/$(ARCH)/$(SONAME).$(MNGMAJ)
|
|
97 |
|
|
98 |
$(SONAME).$(MNGVER): $(OBJ_SO)
|
|
99 |
$(CC) -shared -Wl,-soname,$(SONAME).$(MNGMAJ) -o $(OBJDIR)/$(ARCH)/$(SONAME).$(MNGVER) $(OBJ_SO) \
|
|
100 |
-lz -lm -ljpeg
|
|
101 |
# -lz -lm -ljpeg -llcms
|
|
102 |
|
|
103 |
clean:
|
|
104 |
rm -f $(OBJ) $(OBJ_SO)
|
|
105 |
rm -f $(OBJDIR)/$(ARCH)/$(ARNAME) $(OBJDIR)/$(ARCH)/$(SONAME)*
|
|
106 |
|
|
107 |
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
108 |
|
|
109 |
libmng_hlapi.o libmng_hlapi.pic.o: libmng_hlapi.c libmng.h libmng_conf.h libmng_types.h \
|
|
110 |
libmng_data.h libmng_objects.h libmng_object_prc.h \
|
|
111 |
libmng_chunks.h libmng_memory.h libmng_error.h libmng_trace.h libmng_read.h \
|
|
112 |
libmng_write.h libmng_display.h libmng_zlib.h libmng_cms.h libmng_zlib.h
|
|
113 |
libmng_callback_xs.o libmng_callback_xs.pic.o: libmng_callback_xs.c libmng.h \
|
|
114 |
libmng_conf.h libmng_types.h libmng_data.h libmng_error.h libmng_trace.h
|
|
115 |
libmng_prop_xs.o libmng_prop_xs.pic.o: libmng_prop_xs.c libmng.h libmng_conf.h \
|
|
116 |
libmng_types.h libmng_data.h libmng_error.h libmng_trace.h libmng_cms.h
|
|
117 |
libmng_chunk_xs.o libmng_chunk_xs.pic.o: libmng_chunk_xs.c libmng.h libmng_conf.h \
|
|
118 |
libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h \
|
|
119 |
libmng_error.h libmng_trace.h
|
|
120 |
libmng_read.o libmng_read.pic.o: libmng_read.c libmng.h libmng_conf.h libmng_types.h \
|
|
121 |
libmng_data.h libmng_objects.h libmng_object_prc.h \
|
|
122 |
libmng_chunks.h libmng_chunk_prc.h libmng_chunk_io.h libmng_memory.h \
|
|
123 |
libmng_error.h libmng_trace.h libmng_read.h libmng_display.h
|
|
124 |
libmng_write.o libmng_write.pic.o: libmng_write.c libmng.h libmng_conf.h libmng_types.h \
|
|
125 |
libmng_data.h libmng_error.h libmng_trace.h libmng_write.h
|
|
126 |
libmng_display.o libmng_display.pic.o: libmng_display.c libmng.h libmng_conf.h \
|
|
127 |
libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
|
|
128 |
libmng_error.h libmng_trace.h libmng_zlib.h libmng_cms.h libmng_pixels.h \
|
|
129 |
libmng_display.h
|
|
130 |
libmng_object_prc.o libmng_object_prc.pic.o: libmng_object_prc.c libmng.h libmng_conf.h \
|
|
131 |
libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h libmng_memory.h \
|
|
132 |
libmng_error.h libmng_trace.h libmng_display.h libmng_pixels.h
|
|
133 |
libmng_chunk_descr.o libmng_chunk_descr.pic.o: libmng_chunk_descr.c libmng.h libmng_conf.h \
|
|
134 |
libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_descr.h libmng_memory.h \
|
|
135 |
libmng_chunk_prc.h libmng_error.h libmng_trace.h
|
|
136 |
libmng_chunk_prc.o libmng_chunk_prc.pic.o: libmng_chunk_prc.c libmng.h libmng_conf.h \
|
|
137 |
libmng_types.h libmng_data.h libmng_chunks.h libmng_chunk_prc.h libmng_memory.h \
|
|
138 |
libmng_error.h libmng_trace.h
|
|
139 |
libmng_chunk_io.o libmng_chunk_io.pic.o: libmng_chunk_io.c libmng.h libmng_conf.h \
|
|
140 |
libmng_types.h libmng_data.h libmng_objects.h libmng_object_prc.h \
|
|
141 |
libmng_chunks.h libmng_chunk_io.h libmng_chunk_prc.h libmng_memory.h libmng_error.h \
|
|
142 |
libmng_trace.h libmng_display.h libmng_zlib.h libmng_pixels.h
|
|
143 |
libmng_error.o libmng_error.pic.o: libmng_error.c libmng.h libmng_conf.h libmng_types.h \
|
|
144 |
libmng_data.h libmng_error.h libmng_trace.h
|
|
145 |
libmng_trace.o libmng_trace.pic.o: libmng_trace.c libmng.h libmng_conf.h libmng_types.h \
|
|
146 |
libmng_data.h libmng_error.h libmng_trace.h
|
|
147 |
libmng_pixels.o libmng_pixels.pic.o: libmng_pixels.c libmng.h libmng_conf.h libmng_types.h \
|
|
148 |
libmng_data.h libmng_objects.h libmng_memory.h libmng_error.h libmng_trace.h \
|
|
149 |
libmng_cms.h libmng_filter.h libmng_pixels.h
|
|
150 |
libmng_filter.o libmng_filter.pic.o: libmng_filter.c libmng.h libmng_conf.h libmng_types.h \
|
|
151 |
libmng_data.h libmng_error.h libmng_trace.h libmng_filter.h
|
|
152 |
libmng_dither.o libmng_dither.pic.o: libmng_dither.c libmng.h libmng_conf.h libmng_types.h \
|
|
153 |
libmng_data.h libmng_error.h libmng_trace.h libmng_dither.h
|
|
154 |
libmng_zlib.o libmng_zlib.pic.o: libmng_zlib.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 \
|
|
156 |
libmng_filter.h libmng_zlib.h
|
|
157 |
libmng_jpeg.o libmng_jpeg.pic.o: libmng_jpeg.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 libmng_jpeg.h
|
|
159 |
libmng_cms.o libmng_cms.pic.o: libmng_cms.c libmng.h libmng_conf.h libmng_types.h \
|
|
160 |
libmng_data.h libmng_objects.h libmng_error.h libmng_trace.h libmng_cms.h
|