Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile.in « bz2lib « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a34b146a6c958bd2e076b82c1ce12d31b564a76e (plain)
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
# Copyright (c) 2000, Red Hat, Inc.
#
#     This program is free software; you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation; either version 2 of the License, or
#     (at your option) any later version.
#
#     A copy of the GNU General Public License can be found at
#     http://www.gnu.org/
#
# Written by Christopher Faylor <cgf@redhat.com>
#
# Makefile for Cygwin installer

SHELL :=@SHELL@

srcdir:=@srcdir@
VPATH:=@srcdir@
prefix:=@prefix@
exec_prefix:=@exec_prefix@

bindir:=@bindir@
etcdir:=$(exec_prefix)/etc

program_transform_name :=@program_transform_name@

INSTALL:=@INSTALL@
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
INSTALL_DATA:=@INSTALL_DATA@

EXEEXT:=@EXEEXT@
EXEEXT_FOR_BUILD :=@EXEEXT_FOR_BUILD@

CC:=@CC@
CC_FOR_TARGET:=$(CC)
CXX:=@CXX@

CFLAGS:=@CFLAGS@ -nostdinc
CXXFLAGS:=@CXXFLAGS@ -fno-exceptions -fno-rtti
CXX:=@CXX@

WINDRES:=@WINDRES@
OBJCOPY:=@OBJCOPY@
AR:=@AR@
RANLIB:=@RANLIB@

include $(srcdir)/../Makefile.common


ZLIB:=zlib/libzcygw.a
BZ2LIB:=$(bupdir)/bz2lib/libbz2.a
libmingw32.a:=$(mingw_build)/libmingw32.a
libuser32:=$(w32api_lib)/libuser32.a
libkernel32:=$(w32api_lib)/libkernel32.a

ALL_DEP_LDLIBS:=$(ZLIB) $(BZ2LIB) $(w32api_lib)/libole32.a $(w32api_lib)/libwsock32.a \
		$(w32api_lib)/libnetapi32.a $(w32api_lib)/libadvapi32.a \
		$(w32api_lib)/libuuid.a $(libkernel32) $(w32api_lib)/libuser32.a \
		$(libmingw32)

ALL_LDLIBS:=${patsubst $(mingw_build)/lib%.a,-l%,\
	      ${patsubst $(w32api_lib)/lib%.a,-l%,\
		${filter-out $(libmingw32),\
		  ${filter-out $(libuser32),\
		    ${filter-out $(libkernel32), $(ALL_DEP_LDLIBS)}}}}}

ALL_LDFLAGS:=${filter-out -I%, \
	       ${filter-out -W%, \
		-B$(w32api_lib)/ -B${mingw_build}/ $(MINGW_CFLAGS) $(LDFLAGS)}}

LIBS:=libbz2.a

OBJS:=blocksort.o bzlib.o compress.o decompress.o huffman.o crctable.o randtable.o

.SUFFIXES:
.NOEXPORT:

.PHONY: all install clean realclean

all: Makefile $(LIBS)

$(LIBS): $(OBJS)
	$(AR) cru $@ $?
	$(RANLIB) $@

clean:
	rm -f *.o *.rc *.a

realclean: clean
	rm -f  Makefile config.cache

install: all
: Nothing to install

%.o: %.c
ifdef VERBOSE
	$(CC) $c -o $(@D)/$(basename $@)$o -MD $(MINGW_CFLAGS) $<
else
	@echo $(CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) ... $^;\
	$(CC) $c -o $(@D)/$(basename $@)$o -MD $(MINGW_CFLAGS) $<
endif


D=$(wildcard *.d)
ifneq ($D,)
include $D
endif