File: Makefile.unx

package info (click to toggle)
giflib 4.1.6-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,968 kB
  • ctags: 1,009
  • sloc: ansic: 11,186; sh: 9,222; cpp: 907; makefile: 183; sed: 57; perl: 54
file content (106 lines) | stat: -rw-r--r-- 2,575 bytes parent folder | download | duplicates (17)
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
#
# This is the make file for the lib subdirectory of the GIF library
# You'll need GNU gcc or some other ANSI-complient compiler.
#
#				Gershon Elber, Jun 1989
#  * version number in ./lib/Makefile
#
V = 3.0

SHLIB = libgif.so.$(V)

#
# Where all the include files are:
INCS = -I.

LIBDIR = /usr/lib

#
# What devices we should be able to grab into gif images. Note that if
# you enable them the associated library must be available at link time.
# Avaiable devices:
# 1. EGA, VGA, SVGA (800x600), Hercules - all on IBM PC only.
# 2. SGI 4D Irix using gl library (Add -D__SGI_GL__).
# 3. X11 using libX.a (Add -D__X11__)
DEVS = -D__X11__

#
# These are the flags for gcc, in BSD4.3 or Sun O.S. 4.0.3
#
# If your system has all function prototypes for gcc, replace all
# the -Wxxx with -Wall. I can not add -Wimplicit as my system uses old cc
# h files.
#
# CC = gcc
#
# CFLAGS = -O -c -W -Wreturn-type -Wcomment
# CFLAGS = -g -pg -c -W -Wreturn-type -Wcomment
#
# for sun 4 (gunnars@ifi.uib.no). Tested using gcc 1.39.
#
# CFLAGS = -O -c -sun4 -W -Wreturn-type -Wcomment -DUSE_VARARGS
# CFLAGS = -g -c -sun4 -W -Wreturn-type -Wcomment -DUSE_VARARGS

#
# These are the flags for cc on SGI iris4d. O.S. IRIX 3.2
#
# CC = cc
#
# CFLAGS = -O -c -DSYSV -DNO_VOID_PTR -DUSE_VARARGS -Olimit 1000 -Wf,-XNh5000 -Wf,-XNd5000 -G 4
# CFLAGS = -g -p -c -DSYSV -DNO_VOID_PTR -DUSE_VARARGS -Olimit 1000 -Wf,-XNh5000 -Wf,-XNd5000 -G 4

#
# These are the flags for xlc, ansi compiler for IBM R6000
#
# CC = xlc
#
# CFLAGS = -O -c -qnoro -D_POSIX_SOURCE -D_ALL_SOURCE -DR6000
# CFLAGS = -g -pg -c -qnoro -D_POSIX_SOURCE -D_ALL_SOURCE -DR6000

#
# GNU CC over Linux and XFree86
#
CC = gcc
#
#CFLAGS = -fno-builtin -O -c -W -Wreturn-type -Wcomment
CFLAGS = -fno-builtin -g -c -W -Wreturn-type -Wcomment


OBJS = dev2gif.o egif_lib.o dgif_lib.o gifalloc.o gif_font.o gif_hash.o \
	gif_err.o quantize.o qprintf.o getarg.o

.c.o:
	$(CC) $(INCS) $(DEVS) $(CFLAGS) $<

all: static shared

static: libgif.a
shared: $(SHLIB)

libgif.a: $(OBJS)
	rm -f libgif.a
	ar rcv libgif.a $(OBJS)
	-ranlib libgif.a

$(SHLIB): $(OBJS)
	rm -f libgif.so.$(V)
	gcc -shared -o $(SHLIB) $(OBJS)

dev2gif.o: gif_lib.h
egif_lib.o: gif_lib.h gif_hash.h
dgif_lib.o: gif_lib.h gif_hash.h
gif_hash.o: gif_lib.h gif_hash.h
gif_err.o: gif_lib.h
gifalloc.o: gif_lib.h
gif_font.o: gif_lib.h
quantize.o: gif_lib.h
qprintf.o: gif_lib.h
getarg.o: getarg.h

install-lib: libgif.a
	cp libgif.a libgif.so.$(V) $(LIBDIR)

uninstall-lib: shared static
	rm -f $(LIBDIR)/libgif.a $(LIBDIR)/$(SHLIB)
clean:
	rm -f *.[oa] *~ libgif.so.$(V)