xref: /minix3/common/dist/zlib/msdos/Makefile.emx (revision 44bedb31d842b4b0444105519bcf929a69fe2dc1)
1*44bedb31SLionel Sambuc# Makefile for zlib.  Modified for emx 0.9c by Chr. Spieler, 6/17/98.
2*44bedb31SLionel Sambuc# Copyright (C) 1995-1998 Jean-loup Gailly.
3*44bedb31SLionel Sambuc# For conditions of distribution and use, see copyright notice in zlib.h
4*44bedb31SLionel Sambuc
5*44bedb31SLionel Sambuc# To compile, or to compile and test, type:
6*44bedb31SLionel Sambuc#
7*44bedb31SLionel Sambuc#   make -fmakefile.emx;  make test -fmakefile.emx
8*44bedb31SLionel Sambuc#
9*44bedb31SLionel Sambuc
10*44bedb31SLionel SambucCC=gcc
11*44bedb31SLionel Sambuc
12*44bedb31SLionel Sambuc#CFLAGS=-MMD -O
13*44bedb31SLionel Sambuc#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
14*44bedb31SLionel Sambuc#CFLAGS=-MMD -g -DDEBUG
15*44bedb31SLionel SambucCFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
16*44bedb31SLionel Sambuc             -Wstrict-prototypes -Wmissing-prototypes
17*44bedb31SLionel Sambuc
18*44bedb31SLionel Sambuc# If cp.exe is available, replace "copy /Y" with "cp -fp" .
19*44bedb31SLionel SambucCP=copy /Y
20*44bedb31SLionel Sambuc# If gnu install.exe is available, replace $(CP) with ginstall.
21*44bedb31SLionel SambucINSTALL=$(CP)
22*44bedb31SLionel Sambuc# The default value of RM is "rm -f."  If "rm.exe" is found, comment out:
23*44bedb31SLionel SambucRM=del
24*44bedb31SLionel SambucLDLIBS=-L. -lzlib
25*44bedb31SLionel SambucLD=$(CC) -s -o
26*44bedb31SLionel SambucLDSHARED=$(CC)
27*44bedb31SLionel Sambuc
28*44bedb31SLionel SambucINCL=zlib.h zconf.h
29*44bedb31SLionel SambucLIBS=zlib.a
30*44bedb31SLionel Sambuc
31*44bedb31SLionel SambucAR=ar rcs
32*44bedb31SLionel Sambuc
33*44bedb31SLionel Sambucprefix=/usr/local
34*44bedb31SLionel Sambucexec_prefix = $(prefix)
35*44bedb31SLionel Sambuc
36*44bedb31SLionel SambucOBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
37*44bedb31SLionel Sambuc       zutil.o inflate.o infback.o inftrees.o inffast.o
38*44bedb31SLionel Sambuc
39*44bedb31SLionel SambucTEST_OBJS = example.o minigzip.o
40*44bedb31SLionel Sambuc
41*44bedb31SLionel Sambucall: example.exe minigzip.exe
42*44bedb31SLionel Sambuc
43*44bedb31SLionel Sambuctest: all
44*44bedb31SLionel Sambuc	./example
45*44bedb31SLionel Sambuc	echo hello world | .\minigzip | .\minigzip -d
46*44bedb31SLionel Sambuc
47*44bedb31SLionel Sambuc%.o : %.c
48*44bedb31SLionel Sambuc	$(CC) $(CFLAGS) -c $< -o $@
49*44bedb31SLionel Sambuc
50*44bedb31SLionel Sambuczlib.a: $(OBJS)
51*44bedb31SLionel Sambuc	$(AR) $@ $(OBJS)
52*44bedb31SLionel Sambuc
53*44bedb31SLionel Sambuc%.exe : %.o $(LIBS)
54*44bedb31SLionel Sambuc	$(LD) $@ $< $(LDLIBS)
55*44bedb31SLionel Sambuc
56*44bedb31SLionel Sambuc
57*44bedb31SLionel Sambuc.PHONY : clean
58*44bedb31SLionel Sambuc
59*44bedb31SLionel Sambucclean:
60*44bedb31SLionel Sambuc	$(RM) *.d
61*44bedb31SLionel Sambuc	$(RM) *.o
62*44bedb31SLionel Sambuc	$(RM) *.exe
63*44bedb31SLionel Sambuc	$(RM) zlib.a
64*44bedb31SLionel Sambuc	$(RM) foo.gz
65*44bedb31SLionel Sambuc
66*44bedb31SLionel SambucDEPS := $(wildcard *.d)
67*44bedb31SLionel Sambucifneq ($(DEPS),)
68*44bedb31SLionel Sambucinclude $(DEPS)
69*44bedb31SLionel Sambucendif
70