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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
# Copyright (C) 1995-1998 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile, or to compile and test, type:
#
# make -fmakefile.emx; make test -fmakefile.emx
#
CC=gcc -Zwin32
#CFLAGS=-MMD -O
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
#CFLAGS=-MMD -g -DDEBUG
CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-Wstrict-prototypes -Wmissing-prototypes
# If cp.exe is available, replace "copy /Y" with "cp -fp" .
CP=copy /Y
# If gnu install.exe is available, replace $(CP) with ginstall.
INSTALL=$(CP)
# The default value of RM is "rm -f." If "rm.exe" is found, comment out:
RM=del
LDLIBS=-L. -lzlib
LD=$(CC) -s -o
LDSHARED=$(CC)
INCL=zlib.h zconf.h
LIBS=zlib.a
AR=ar rcs
prefix=/usr/local
exec_prefix = $(prefix)
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
TEST_OBJS = example.o minigzip.o
all: example.exe minigzip.exe
test: all
./example
echo hello world | .\minigzip | .\minigzip -d
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
zlib.a: $(OBJS)
$(AR) $@ $(OBJS)
%.exe : %.o $(LIBS)
$(LD) $@ $< $(LDLIBS)
.PHONY : clean
clean:
$(RM) *.d
$(RM) *.o
$(RM) *.exe
$(RM) zlib.a
$(RM) foo.gz
DEPS := $(wildcard *.d)
ifneq ($(DEPS),)
include $(DEPS)
endif
# Makefile for zlib. Modified for emx 0.9c by Chr. Spieler, 6/17/98.
# Copyright (C) 1995-1998 Jean-loup Gailly.
# For conditions of distribution and use, see copyright notice in zlib.h
# To compile, or to compile and test, type:
#
# make -fmakefile.emx; make test -fmakefile.emx
#
CC=gcc
#CFLAGS=-MMD -O
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
#CFLAGS=-MMD -g -DDEBUG
CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-Wstrict-prototypes -Wmissing-prototypes
# If cp.exe is available, replace "copy /Y" with "cp -fp" .
CP=copy /Y
# If gnu install.exe is available, replace $(CP) with ginstall.
INSTALL=$(CP)
# The default value of RM is "rm -f." If "rm.exe" is found, comment out:
RM=del
LDLIBS=-L. -lzlib
LD=$(CC) -s -o
LDSHARED=$(CC)
INCL=zlib.h zconf.h
LIBS=zlib.a
AR=ar rcs
prefix=/usr/local
exec_prefix = $(prefix)
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
TEST_OBJS = example.o minigzip.o
all: example.exe minigzip.exe
test: all
./example
echo hello world | .\minigzip | .\minigzip -d
%.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
zlib.a: $(OBJS)
$(AR) $@ $(OBJS)
%.exe : %.o $(LIBS)
$(LD) $@ $< $(LDLIBS)
.PHONY : clean
clean:
$(RM) *.d
$(RM) *.o
$(RM) *.exe
$(RM) zlib.a
$(RM) foo.gz
DEPS := $(wildcard *.d)
ifneq ($(DEPS),)
include $(DEPS)
endif
|