|
1 # lib/Makefile.w32 - Makefile for W32 port. |
|
2 # Copyright (C) 1995 - 2006 Michael Riepe |
|
3 # |
|
4 # This library is free software; you can redistribute it and/or |
|
5 # modify it under the terms of the GNU Library General Public |
|
6 # License as published by the Free Software Foundation; either |
|
7 # version 2 of the License, or (at your option) any later version. |
|
8 # |
|
9 # This library is distributed in the hope that it will be useful, |
|
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 # Library General Public License for more details. |
|
13 # |
|
14 # You should have received a copy of the GNU Library General Public |
|
15 # License along with this library; if not, write to the Free Software |
|
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
|
18 # @(#) $Id: Makefile.w32,v 1.2 2006/11/21 20:21:12 michael Exp $ |
|
19 |
|
20 instroot = |
|
21 |
|
22 prefix = |
|
23 exec_prefix = |
|
24 libdir = |
|
25 includedir = |
|
26 installdirs = $(libdir) $(includedir) $(includedir)/libelf |
|
27 |
|
28 CC = cl /nologo |
|
29 LD = link /nologo |
|
30 AR = |
|
31 MV = |
|
32 RM = del |
|
33 LN_S = |
|
34 RANLIB = |
|
35 INSTALL = |
|
36 INSTALL_DATA = |
|
37 INSTALL_PROGRAM = |
|
38 |
|
39 CFLAGS = /O2 /W2 /TC /MD |
|
40 CPPFLAGS = |
|
41 DEFS = /DHAVE_CONFIG_H |
|
42 LDFLAGS = |
|
43 LIBS = |
|
44 DEPSHLIBS = |
|
45 |
|
46 DO_SHLIB = |
|
47 PICFLAGS = |
|
48 SHLIB_SFX = .dll |
|
49 SHLINK_SFX = |
|
50 SONAME_SFX = |
|
51 LINK_SHLIB = $(LD) /DLL $(LDFLAGS) |
|
52 |
|
53 SHLIB = libelf$(SHLIB_SFX) |
|
54 SHLINK = libelf$(SHLINK_SFX) |
|
55 SONAME = libelf$(SONAME_SFX) |
|
56 |
|
57 # install includes in includedir? |
|
58 DO_COMPAT = |
|
59 |
|
60 INCLUDES = /I. |
|
61 |
|
62 COMPILE = $(CC) /c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) |
|
63 |
|
64 # no user serviceable parts below |
|
65 |
|
66 PACKAGE = libelf |
|
67 VERSION = 0.8.9 |
|
68 MAJOR = 0 |
|
69 |
|
70 SHELL = /bin/sh |
|
71 |
|
72 srcdir = . |
|
73 top_srcdir = .. |
|
74 |
|
75 topdir = .. |
|
76 subdir = lib |
|
77 |
|
78 .SUFFIXES: |
|
79 .SUFFIXES: .obj .c |
|
80 .c.obj: |
|
81 $(COMPILE) $< |
|
82 |
|
83 # generic sources |
|
84 SRCS1 = begin.c cntl.c end.c errmsg.c errno.c fill.c flag.c getarhdr.c \ |
|
85 getarsym.c getbase.c getdata.c getident.c getscn.c hash.c kind.c \ |
|
86 ndxscn.c newdata.c newscn.c next.c nextscn.c rand.c rawdata.c \ |
|
87 rawfile.c strptr.c update.c version.c checksum.c |
|
88 OBJS1 = $(SRCS1:.c=.obj) |
|
89 |
|
90 # 32-bit sources |
|
91 SRCS2 = 32.fsize.c 32.getehdr.c 32.getphdr.c 32.getshdr.c 32.newehdr.c \ |
|
92 32.newphdr.c 32.xlatetof.c |
|
93 OBJS2 = $(SRCS2:.c=.obj) |
|
94 |
|
95 # support |
|
96 SRCS3 = cook.c data.c input.c assert.c |
|
97 OBJS3 = $(SRCS3:.c=.obj) |
|
98 |
|
99 # nlist |
|
100 SRCS4 = nlist.c |
|
101 OBJS4 = $(SRCS4:.c=.obj) |
|
102 |
|
103 # opt |
|
104 SRCS5 = opt.delscn.c x.remscn.c x.movscn.c x.elfext.c |
|
105 OBJS5 = $(SRCS5:.c=.obj) |
|
106 |
|
107 # 64-bit sources |
|
108 SRCS64 = 64.xlatetof.c gelfehdr.c gelfphdr.c gelfshdr.c gelftrans.c swap64.c |
|
109 OBJS64 = $(SRCS64:.c=.obj) |
|
110 |
|
111 # Versioning sources |
|
112 SRCS_V = verdef_32_tof.c verdef_32_tom.c verdef_64_tof.c verdef_64_tom.c |
|
113 OBJS_V = $(SRCS_V:.c=.obj) |
|
114 HDRS_V = verdef.h verneed.h |
|
115 |
|
116 SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) $(SRCS64) $(SRCS_V) |
|
117 OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS64) $(OBJS_V) |
|
118 |
|
119 # missing functions |
|
120 LIBSRCS = memset.c |
|
121 LIBOBJS = |
|
122 |
|
123 # public header files |
|
124 HDRS = libelf.h nlist.h gelf.h |
|
125 |
|
126 # public header files (created by configure) |
|
127 AUXHDRS = sys_elf.h |
|
128 |
|
129 # private header files |
|
130 PRIVHDRS = byteswap.h errors.h ext_types.h private.h elf_repl.h $(HDRS_V) |
|
131 |
|
132 DISTFILES = $(SRCS) $(LIBSRCS) $(HDRS) $(PRIVHDRS) Makefile.in sys_elf.h.in |
|
133 |
|
134 all: $(OBJS) $(SHLIB) |
|
135 |
|
136 check: |
|
137 |
|
138 $(SHLIB): libelf.def $(OBJS) $(LIBOBJS) |
|
139 -@$(RM) $(SHLIB) |
|
140 $(LINK_SHLIB) /OUT:"$(SHLIB)" /DEF:"libelf.def" $(OBJS) $(LIBOBJS) kernel32.lib |
|
141 |
|
142 install: |
|
143 |
|
144 mostlyclean: |
|
145 -$(RM) *.obj |
|
146 -$(RM) $(SHLIB) |
|
147 -$(RM) libelf.lib |
|
148 -$(RM) libelf.exp |
|
149 |
|
150 clean: mostlyclean |
|
151 |
|
152 distclean: clean |
|
153 -$(RM) $(AUXHDRS) |
|
154 |
|
155 maintainer-clean: distclean |
|
156 |
|
157 # dependencies |
|
158 $(OBJS): private.h config.h libelf.h gelf.h errors.h $(AUXHDRS) |
|
159 32.fsize.obj: ext_types.h |
|
160 32.xlatetof.obj: byteswap.h ext_types.h |
|
161 64.xlatetof.obj: byteswap.h ext_types.h |
|
162 getarsym.obj: byteswap.h |
|
163 memset.obj: config.h |
|
164 nlist.obj: nlist.h |
|
165 swap64.obj: byteswap.h |
|
166 $(OBJS_V): byteswap.h ext_types.h $(HDRS_V) |