Debian Codegraph @

makefile

raw ◀ ▶
1 Debian patch touch this file
1 ###########################################################
2 # The makefile for the JPEG program.
3 # There should be no changes for most UNIX compilers.
4 ###########################################################
5 #
6 # For sysv substitute the following terms:
7 # SYSV allows for SYSV system IO calls. NOTRUNCATE allows
8 # for UNIX emulators without the ftruncate() call.
9 #
•10 # For gcc on Solaris use DFCNTL_FOR_O_RDONLY to include <fcntl.h> not SYSV <sys/fnctl.h>`
11 #
12 #DEFINES = -DSYSV -DNOTRUNCATE
13 #
14
•15 #DEFINES = -DFCNTL_FOR_O_RDONLY
16 CC = gcc
17 LEXARGS = -ll
18 JFLAGS = -O
19 DEFS = system.h globals.h prototypes.h param.h
20 BASELINE = jpeg.o codec.o huffman.o io.o chendct.o leedct.o lexer.o marker.o stream.o transform.o
21
22 .c.o:
•23 $(CC) $(JFLAGS) $(DEFINES) -c $*.c
24
25 .c.ln:
26 lint -c $*.c
27
28 all: jpeg
29
30 clean:
•31 rm -f *.o jpeg lexer.c
32
33 jpeg: $(BASELINE)
•34 $(CC) $(DEFINES) $(JFLAGS) $(BASELINE) -lm -o jpeg
35
36 jpeg.o: jpeg.c $(DEFS) tables.h
37 codec.o: codec.c $(DEFS)
38 huffman.o: huffman.c $(DEFS) stream.h
39 io.o: io.c $(DEFS)
40 chendct.o: chendct.c $(DEFS)
41 leedct.o: leedct.c $(DEFS)
42 lexer.o: lexer.c $(DEFS) tables.h stream.h
43 marker.o: marker.c $(DEFS) marker.h stream.h
44 stream.o: stream.c $(DEFS) marker.h stream.h
45 transform.o: transform.c dct.h $(DEFS)
46
47 lcheck: jpeg.ln codec.ln huffman.ln io.ln chendct.ln leedct.ln lexer.ln marker.ln stream.ln transform.ln
48 lint jpeg.ln codec.ln huffman.ln io.ln chendct.ln leedct.ln lexer.ln marker.ln stream.ln transform.ln
49
50 #
51 # Should you wish to modify the interpreter
52 # modify this portion here.
53 #
54 # Make sure that you move the first comment from the start to
55 # within the braces %{ /* */ %} in lexer.l,
56 # otherwise it will give you a error (definitions too long).
57 #
58 # Caution: Sometimes -ll is required.
59 #
60 #
•61 lexer.c: lexer.l
62 lex $(LEXARGS) lexer.l
63 #mv lex.yy.c lexer.c
64 echo "#ifdef FCNTL_FOR_O_RDONLY" >lexer.c
65 echo "#include <fcntl.h>" >>lexer.c
66 echo "#endif" >>lexer.c
67 cat lex.yy.c >>lexer.c
68 rm lex.yy.c
69