Makefile.w32 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. # lib/Makefile.w32 - Makefile for W32 port.
  2. # Copyright (C) 1995 - 2009 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. # @(#) $Id: Makefile.w32,v 1.3 2009/11/01 13:04:19 michael Exp $
  18. instroot =
  19. prefix =
  20. exec_prefix =
  21. libdir =
  22. includedir =
  23. installdirs = $(libdir) $(includedir) $(includedir)/libelf
  24. CC = cl /nologo
  25. LD = link /nologo
  26. AR =
  27. MV =
  28. RM = del
  29. LN_S =
  30. RANLIB =
  31. INSTALL =
  32. INSTALL_DATA =
  33. INSTALL_PROGRAM =
  34. CFLAGS = /O2 /W2 /TC /MD
  35. CPPFLAGS =
  36. DEFS = /DHAVE_CONFIG_H
  37. LDFLAGS =
  38. LIBS =
  39. DEPSHLIBS =
  40. DO_SHLIB =
  41. PICFLAGS =
  42. SHLIB_SFX = .dll
  43. SHLINK_SFX =
  44. SONAME_SFX =
  45. LINK_SHLIB = $(LD) /DLL $(LDFLAGS)
  46. SHLIB = libelf$(SHLIB_SFX)
  47. SHLINK = libelf$(SHLINK_SFX)
  48. SONAME = libelf$(SONAME_SFX)
  49. # install includes in includedir?
  50. DO_COMPAT =
  51. INCLUDES = /I.
  52. COMPILE = $(CC) /c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
  53. # no user serviceable parts below
  54. PACKAGE = libelf
  55. VERSION = 0.8.9
  56. MAJOR = 0
  57. SHELL = /bin/sh
  58. srcdir = .
  59. top_srcdir = ..
  60. topdir = ..
  61. subdir = lib
  62. .SUFFIXES:
  63. .SUFFIXES: .obj .c
  64. .c.obj:
  65. $(COMPILE) $<
  66. # generic sources
  67. SRCS1 = begin.c cntl.c end.c errmsg.c errno.c fill.c flag.c getarhdr.c \
  68. getarsym.c getbase.c getdata.c getident.c getscn.c hash.c kind.c \
  69. ndxscn.c newdata.c newscn.c next.c nextscn.c rand.c rawdata.c \
  70. rawfile.c strptr.c update.c version.c checksum.c getaroff.c
  71. OBJS1 = $(SRCS1:.c=.obj)
  72. # 32-bit sources
  73. SRCS2 = 32.fsize.c 32.getehdr.c 32.getphdr.c 32.getshdr.c 32.newehdr.c \
  74. 32.newphdr.c 32.xlatetof.c
  75. OBJS2 = $(SRCS2:.c=.obj)
  76. # support
  77. SRCS3 = cook.c data.c input.c assert.c
  78. OBJS3 = $(SRCS3:.c=.obj)
  79. # nlist
  80. SRCS4 = nlist.c
  81. OBJS4 = $(SRCS4:.c=.obj)
  82. # opt
  83. SRCS5 = opt.delscn.c x.remscn.c x.movscn.c x.elfext.c
  84. OBJS5 = $(SRCS5:.c=.obj)
  85. # 64-bit sources
  86. SRCS64 = 64.xlatetof.c gelfehdr.c gelfphdr.c gelfshdr.c gelftrans.c swap64.c
  87. OBJS64 = $(SRCS64:.c=.obj)
  88. # Versioning sources
  89. SRCS_V = verdef_32_tof.c verdef_32_tom.c verdef_64_tof.c verdef_64_tom.c
  90. OBJS_V = $(SRCS_V:.c=.obj)
  91. HDRS_V = verdef.h verneed.h
  92. SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) $(SRCS64) $(SRCS_V)
  93. OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS64) $(OBJS_V)
  94. # missing functions
  95. LIBSRCS = memset.c
  96. LIBOBJS =
  97. # public header files
  98. HDRS = libelf.h nlist.h gelf.h
  99. # public header files (created by configure)
  100. AUXHDRS = sys_elf.h
  101. # private header files
  102. PRIVHDRS = byteswap.h errors.h ext_types.h private.h elf_repl.h $(HDRS_V)
  103. DISTFILES = $(SRCS) $(LIBSRCS) $(HDRS) $(PRIVHDRS) Makefile.in sys_elf.h.in
  104. all: $(OBJS) $(SHLIB)
  105. check:
  106. $(SHLIB): libelf.def $(OBJS) $(LIBOBJS)
  107. -@$(RM) $(SHLIB)
  108. $(LINK_SHLIB) /OUT:"$(SHLIB)" /DEF:"libelf.def" $(OBJS) $(LIBOBJS) kernel32.lib
  109. install:
  110. mostlyclean:
  111. -$(RM) *.obj
  112. -$(RM) $(SHLIB)
  113. -$(RM) libelf.lib
  114. -$(RM) libelf.exp
  115. clean: mostlyclean
  116. distclean: clean
  117. -$(RM) $(AUXHDRS)
  118. maintainer-clean: distclean
  119. # dependencies
  120. $(OBJS): private.h config.h libelf.h gelf.h errors.h $(AUXHDRS)
  121. 32.fsize.obj: ext_types.h
  122. 32.xlatetof.obj: byteswap.h ext_types.h
  123. 64.xlatetof.obj: byteswap.h ext_types.h
  124. getarsym.obj: byteswap.h
  125. memset.obj: config.h
  126. nlist.obj: nlist.h
  127. swap64.obj: byteswap.h
  128. $(OBJS_V): byteswap.h ext_types.h $(HDRS_V)