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

Makefile.in « directx « lib « w32api « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b3b956342dd1c7a18c69c9b70b0b8f1e0843d58b (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
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
139
140
141
142
143
144
145
146
147
148
# @configure_input@
#
#
# Makefile.in
#
# This file is part of a free library building Windows NT drivers.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@

VPATH = @srcdir@

include ${top_builddir}/Makefile.comm

# Depending on if we build as part of winsup or mingw we need to
# add additional include paths in order to get the correct headers
# from the C library.
#
BUILDENV = @BUILDENV@

ifeq ($(BUILDENV), cygwin)
# winsup/include
# winsup/../newlib/libc/include
# winsup/../newlib/libc/sys/cygwin
EXTRA_INCLUDES = -I$(srcdir)/../../include -I$(srcdir)/../../../newlib/libc/include -I$(srcdir)/../../../newlib/libc/sys/cygwin
endif
ifeq ($(BUILDENV), mingw)
EXTRA_INCLUDES = -I$(srcdir)/../../mingw/include
endif

INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../include/directx $(EXTRA_INCLUDES)

# Headers
#
HEADERS = $(notdir $(wildcard $(srcdir)/../../include/directx/*.h))

# Libraries
#
DEF_FILES = $(notdir $(wildcard $(srcdir)/*.def))
DIST_C_FILES = $(notdir $(wildcard $(srcdir)/*.c))
DIST_H_FILES = $(notdir $(wildcard $(srcdir)/*.h))
LIBS = libd3d8.a libd3d9.a libd3dim.a libd3drm.a libd3dx8d.a libd3dx9d.a \
       libd3dxof.a libddraw.a libdinput.a libdinput8.a libdmoguids.a \
       libdplayx.a libdpnaddr.a libdpnet.a libdpnlobby.a libdpvoice.a \
       libdsetup.a libdsound.a libdxerr8.a libdxerr9.a libdxguid.a \
       libksproxy.a libksuser.a libmsdmo.a libstrmiids.a
DINPUT_OBJS = dinput_joy.o dinput_joy2.o dinput_kbd.o dinput_mouse.o \
       dinput_mouse2.o

DISTFILES = Makefile.in $(DEF_FILES) $(DIST_C_FILES) $(DIST_H_FILES)

.NOTPARALLEL:

# Targets: (note that 'all-default' is a redirection from 'all',
# which is the primary default target identified in the included
# common makefile fragment, ${top_builddir}/Makefile.comm
#
all-default: $(LIBS)

TEST_OPTIONS = $(ALL_CFLAGS) -Wall -pedantic -Wsystem-headers -c $(srcdir)/test.c -o test.o
.PHONY: test
test:
	@echo "Testing directx..."
	@for lang in c c++ objective-c ; do \
		echo "$$lang..."; \
		$(CC) -x$$lang $(TEST_OPTIONS) ; \
		echo "$$lang UNICODE..."; \
		$(CC) -x$$lang -DUNICODE $(TEST_OPTIONS) ; \
	done
	@echo "windres..."
	@$(WINDRES) --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
	@echo "windres UNICODE..."
	@$(WINDRES) --define UNICODE --include-dir $(INCDIR) -i $(srcdir)/res.rc -o test.o
	@rm -f test.o

# Rules
#
libdxerr8.a: dxerr8.o dxerr8w.o
	$(AR) r $@ dxerr8.o dxerr8w.o
	$(RANLIB) $@

libdxerr9.a: dxerr9.o dxerr9w.o
	$(AR) r $@ dxerr9.o dxerr9w.o
	$(RANLIB) $@

libdinput.a: dinput.def $(DINPUT_OBJS)
	$(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/dinput.def
	$(AR) r $@ $(DINPUT_OBJS)
	$(RANLIB) $@

libdinput8.a: dinput8.def $(DINPUT_OBJS)
	$(DLLTOOL) $(DLLTOOL_FLAGS) --output-lib $@ --def $(srcdir)/dinput8.def
	$(AR) r $@ $(DINPUT_OBJS)
	$(RANLIB) $@

# Install headers and libraries in a target specified directory.
#
install: install-libraries install-headers

install-libraries: all $(need-DESTDIR-compatibility)
	$(mkinstalldirs) $(DESTDIR)$(inst_libdir)
	for i in $(LIBS); do \
		$(INSTALL_DATA) $$i $(DESTDIR)$(inst_libdir)/$$i ; \
	done

install-headers: $(need-DESTDIR-compatibility)
	$(mkinstalldirs) $(DESTDIR)$(inst_includedir)
	for i in $(HEADERS); do \
		$(INSTALL_DATA) $(srcdir)/../../include/directx/$$i $(DESTDIR)$(inst_includedir)/$$i ; \
	done

# Uninstall headers and libraries from a target specified directory
#
uninstall: uninstall-libraries uninstall-headers

uninstall-libraries: $(need-DESTDIR-compatibility)
	@for i in $(LIBS); do \
		rm -f $(DESTDIR)$(inst_libdir)/$$i ; \
	done
	rmdir $(DESTDIR)$(inst_libdir)

uninstall-headers: $(need-DESTDIR-compatibility)
	@for i in $(HEADERS); do \
		rm -r $(DESTDIR)$(inst_includedir)/$$i ; \
	done
	rmdir $(DESTDIR)$(inst_includedir)

dist:
	mkdir $(distdir)/include/directx
	chmod 755 $(distdir)/include/directx
	@for i in $(HEADERS); do \
		cp -p $(srcdir)/../../include/directx/$$i $(distdir)/include/directx/$$i ; \
	done
	mkdir $(distdir)/lib/directx
	chmod 755 $(distdir)/lib/directx
	@for i in $(DISTFILES); do \
		cp -p $(srcdir)/$$i $(distdir)/lib/directx/$$i ; \
	done

Makefile: Makefile.in ../../config.status ../../configure
	cd ../..; $(SHELL) config.status

# Makefile.in: end of file