File: Makefile

package info (click to toggle)
gif2png 0.6-1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 152 kB
  • ctags: 137
  • sloc: ansic: 1,319; makefile: 62; sh: 17
file content (50 lines) | stat: -rw-r--r-- 877 bytes parent folder | download
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

CC=gcc

#required for djgpp, you can also use copy /b go32.exe+gif2png gif2png.exe
#COFF2EXE=coff2exe
COFF2EXE=@echo >/dev/null

PNGLIB=/usr/lib
ZLIB=/usr/lib

LIBS=$(PNGLIB)/libpng.a $(ZLIB)/libz.a
DYNLIBS=-lpng -lz
INCLUDE=-I$(PNGLIB) -I$(ZLIB)

CFLAGS=$(INCLUDE) -g -O2 -Wall
LDFLAGS=-g

#CFLAGS=$(INCLUDE) -O -Wall
#LDFLAGS=-s

OBJS=gif2png.o gifread.o version.o 437_l1.o memory.o

all: gif2png

all-lib: libpng zlib all

gif2png: $(OBJS) $(LIBS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(DYNLIBS)
	$(COFF2EXE) $@

gif2png.o: gif2png.c gif2png.h
gifread.o: gifread.c gif2png.h
memory.o: memory.c gif2png.h

version.o: version.c
	$(CC) $(CFLAGS) -c version.c -DPNGLIB=\"$(PNGLIB)\" -DZLIB=\"$(ZLIB)\"

tags:  .force
	ctags *.[ch] $(PNGLIB)/*.[ch] $(ZLIB)/*.[ch]

clean:
	-rm *.[oa] a.out core *~ gif2png

libpng: .force
	cd $(PNGLIB); make

zlib: .force
	cd $(ZLIB); make

.force: