summaryrefslogtreecommitdiffstats
path: root/isys/gzlib/Makefile
blob: 347c4c4780dafa80fd1a5a4640115f89949d887a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include ../../Makefile.inc

CFLAGS += -I . -g -Wall
SOURCES = bits.c gzip.c inflate.c lzw.c trees.c unzip.c util.c zip.c binding.c \
	  deflate.c zip.c
OBJS = $(patsubst %.c,%.o,$(SOURCES))
DOBJS = $(patsubst %.o,%.do,$(OBJS))

ifeq (i386, $(ARCH))
DIETLIB=libgunzip-diet.a($(DOBJS))
endif

all: libgunzip.a($(OBJS)) $(DIETLIB) test

test: libgunzip.a test.c
	$(CC) $(CFLAGS) -o test test.c libgunzip.a

clean:	
	rm -f libgunzip.a $(OBJS) $(DOBJS)

%.do: %.c
	diet $(CC) -c $(CFLAGS) -o $@ $<