Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.7 KiB

  1. #
  2. # Common makefile.inc shared across components in the shell project.
  3. #
  4. # You may ask yourself: what's the difference b/t common.inc and
  5. # makefile.inc?? Well, the diff is common.inc follows the semantics
  6. # of a 'sources' file -- that is, it never contains rules or dependencies,
  7. # only macro definitions. It keeps it cleaner.
  8. #
  9. # The makefile.inc is always used to list any special dependencies
  10. # and rules.
  11. #
  12. !ifndef SELFREGNAME
  13. SELFREGNAME = selfreg.inf
  14. !endif
  15. #
  16. # We need to delete -DNT from the command line definitions because that
  17. # causes our "Shell.shell32.NT" strings to go south.
  18. #
  19. $(SELFREGNAME) : ..\selfreg.inx
  20. $(C_PREPROCESSOR_NAME) $(C_PREPROCESSOR_FLAGS:-DNT =) $** > $*.cln
  21. $(CLEANINF) $*.cln $@
  22. del $*.cln
  23. !ifdef BUILD_PRIVLIB
  24. # The following is done so we can build a private import lib which
  25. # contains all exports, and a public lib which is shipped with the
  26. # SDK and contains only public exports. The private import lib
  27. # is a super-set of the public lib.
  28. #
  29. # Your sources file must define the following macros to use this:
  30. #
  31. # TARGETNAME = foo
  32. # DLLDEF = foo.def <--- shown here for context
  33. #
  34. # PASS1_PUBLISH = {$(O)\foop.lib=$(SDK_LIB_PATH)\foop.lib}
  35. # BUILD_PRIVLIB = 1
  36. #
  37. # PRIVDEF = foop.def
  38. # PRIVDEFSRC = foo.src
  39. # PRIVLIB = foop.lib
  40. #
  41. # The foop.def will automatically be built from PRIVDEFSRC. TARGETNAME
  42. # is listed above simply for name context.
  43. #
  44. PRIV_LIB = $(O)\$(PRIVLIB)
  45. # Make the public import lib dependent on the private import lib
  46. $(TARGETPATHLIB)\$(TARGET_DIRECTORY)\$(TARGETNAME).lib : $(PRIV_LIB)
  47. # Rule for making the private import lib. Makefile.def already has
  48. # a rule to make the public import lib.
  49. $(PRIV_LIB) $(PRIV_LIB:.lib=.exp): $(PRIVDEF) $(LIBRARY_OBJS)
  50. -lib -out:$(PRIV_LIB) @<<
  51. $(LIBRARIAN_FLAGS: =
  52. )
  53. -def:$(PRIVDEF)
  54. $(LIBRARY_OBJS: =
  55. )
  56. <<NOKEEP
  57. # Makefile.def already has a rule that builds a .def file from a .src
  58. # file. However, we need to add some exclusive defines which we don't
  59. # want defined for anything else.
  60. $(DLLDEF): $(PRIVDEFSRC)
  61. $(C_PREPROCESSOR_NAME) -DULTRAPRIVATE=PRIVATE $(C_PREPROCESSOR_FLAGS) $** > $@
  62. # In a def file, the word 'PRIVATE' is a keyword telling the linker
  63. # to not include the export in the import library. We don't want
  64. # this to happen for the private import library. However, we
  65. # always want 'ULTRAPRIVATE' to map to 'PRIVATE' regardless of the
  66. # import library.
  67. $(PRIVDEF): $(PRIVDEFSRC)
  68. $(C_PREPROCESSOR_NAME) -DPRIVATE= $(C_PREPROCESSOR_FLAGS) $** > $*.dfp
  69. $(C_PREPROCESSOR_NAME) -DULTRAPRIVATE=PRIVATE $(C_PREPROCESSOR_FLAGS) $*.dfp > $@
  70. !endif