forked from wkliu19/pngcheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.unx
72 lines (51 loc) · 1.57 KB
/
Makefile.unx
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
# gcc/gmake makefile for pngcheck.
# Greg Roelofs
# Last modified: 17 June 2006
#
# Invoke via:
#
# make -f Makefile.unx
#
# This makefile assumes zlib has already been built or downloaded and is in
# a subdirectory at the same level as the current subdirectory (as indicated
# by the ZPATH macro below). Edit as appropriate.
#
# Note that the names of the dynamic and static zlib libraries used below may
# change in later releases of the library. This makefile builds statically
# linked executables, but that can be changed by uncommenting the appropriate
# ZLIB lines.
# macros --------------------------------------------------------------------
ZPATH = ../zlib
ZINC = -I$(ZPATH)
#ZLIB = -L$(ZPATH) -lz
ZLIB = $(ZPATH)/libz.a
INCS = $(ZINC)
LIBS = $(ZLIB)
CC = gcc
LD = gcc
RM = rm
CFLAGS = -O -Wall $(INCS) -DUSE_ZLIB
# [note that -Wall is a gcc-specific compilation flag ("all warnings on")]
O = .o
E =
LDFLAGS =
PROG = pngcheck
PROG2 = pngsplit
PROG3 = png-fix-IDAT-windowsize
#OBJS = $(PROG)$(O)
OBJS =
EXES = $(PROG)$(E) $(PROG2)$(E) $(PROG3)$(E)
# implicit make rules -------------------------------------------------------
.c$(O):
$(CC) -c $(CFLAGS) $<
# dependencies --------------------------------------------------------------
all: $(EXES)
$(PROG)$(E): $(PROG).c
$(CC) $(CFLAGS) -o $@ $(PROG).c $(LIBS)
$(PROG2)$(E): gpl/$(PROG2).c
$(CC) $(CFLAGS) -o $@ gpl/$(PROG2).c $(LIBS)
$(PROG3)$(E): gpl/$(PROG3).c
$(CC) $(CFLAGS) -o $@ gpl/$(PROG3).c $(LIBS)
# maintenance ---------------------------------------------------------------
clean:
$(RM) -f $(EXES) $(OBJS)