source: trunk/src/3rdparty/libjpeg/makefile.unix@ 561

Last change on this file since 561 was 2, checked in by Dmitry A. Kuminov, 17 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 11.9 KB
Line 
1# Makefile for Independent JPEG Group's software
2
3# This makefile is suitable for Unix-like systems with non-ANSI compilers.
4# If you have an ANSI compiler, makefile.ansi is a better starting point.
5
6# Read installation instructions before saying "make" !!
7
8# The name of your C compiler:
9CC= cc
10
11# You may need to adjust these cc options:
12CFLAGS= -O
13# Generally, we recommend defining any configuration symbols in jconfig.h,
14# NOT via -D switches here.
15# However, any special defines for ansi2knr.c may be included here:
16ANSI2KNRFLAGS=
17
18# Link-time cc options:
19LDFLAGS=
20
21# To link any special libraries, add the necessary -l commands here.
22LDLIBS=
23
24# Put here the object file name for the correct system-dependent memory
25# manager file. For Unix this is usually jmemnobs.o, but you may want
26# to use jmemansi.o or jmemname.o if you have limited swap space.
27SYSDEPMEM= jmemnobs.o
28
29# miscellaneous OS-dependent stuff
30# linker
31LN= $(CC)
32# file deletion command
33RM= rm -f
34# file rename command
35MV= mv
36# library (.a) file creation command
37AR= ar rc
38# second step in .a creation (use "touch" if not needed)
39AR2= ranlib
40
41# End of configurable options.
42
43
44# source files: JPEG library proper
45LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \
46 jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \
47 jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \
48 jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \
49 jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \
50 jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \
51 jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \
52 jquant2.c jutils.c jmemmgr.c
53# memmgr back ends: compile only one of these into a working library
54SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
55# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
56APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
57 rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
58 rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
59SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
60# files included by source files
61INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \
62 jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
63# documentation, test, and support files
64DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
65 wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \
66 coderules.doc filelist.doc change.log
67MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \
68 makefile.mc6 makefile.dj makefile.wat makefile.vc makelib.ds \
69 makeapps.ds makeproj.mac makcjpeg.st makdjpeg.st makljpeg.st \
70 maktjpeg.st makefile.manx makefile.sas makefile.mms makefile.vms \
71 makvms.opt
72CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
73 jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
74 jconfig.vms
75CONFIGUREFILES= config.guess config.sub install-sh ltconfig ltmain.sh
76OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm
77TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
78 testimgp.jpg
79DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
80 $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
81# library object files common to compression and decompression
82COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
83# compression library object files
84CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \
85 jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \
86 jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \
87 jfdctint.o
88# decompression library object files
89DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \
90 jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \
91 jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \
92 jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
93# These objectfiles are included in libjpeg.a
94LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
95# object files for sample applications (excluding library files)
96COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
97 cdjpeg.o
98DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
99 cdjpeg.o
100TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
101
102
103all: ansi2knr libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
104
105# This rule causes ansi2knr to be invoked.
106.c.o:
107 ./ansi2knr $*.c T$*.c
108 $(CC) $(CFLAGS) -c T$*.c
109 $(RM) T$*.c $*.o
110 $(MV) T$*.o $*.o
111
112ansi2knr: ansi2knr.c
113 $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
114
115libjpeg.a: ansi2knr $(LIBOBJECTS)
116 $(RM) libjpeg.a
117 $(AR) libjpeg.a $(LIBOBJECTS)
118 $(AR2) libjpeg.a
119
120cjpeg: ansi2knr $(COBJECTS) libjpeg.a