1 # NMake Makefile portion for compilation rules
2 # Items in here should not need to be edited unless
3 # one is maintaining the NMake build files. The format
4 # of NMake Makefiles here are different from the GNU
5 # Makefiles. Please see the comments about these formats.
7 # Inference rules for compiling the .obj files.
8 # Used for libs and programs with more than a single source file.
10 # (all dirs must have a trailing '\'):
12 # {$(srcdir)}.$(srcext){$(destdir)}.obj::
13 # $(CC)|$(CXX) $(cflags) /Fo$(destdir) /c @<<
16 {..\src\}.cc{$(CFG)\$(PLAT)\harfbuzz\}.obj::
17 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz\ /c @<<
21 {..\src\hb-ucdn\}.c{$(CFG)\$(PLAT)\harfbuzz\}.obj::
22 $(CC) $(CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz\ /c @<<
26 {..\src\}.cc{$(CFG)\$(PLAT)\harfbuzz-icu\}.obj::
27 $(CXX) $(CFLAGS) $(HB_LIB_CFLAGS) $(HB_ICU_CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz-icu\ /c @<<
31 {..\util\}.cc{$(CFG)\$(PLAT)\util\}.obj::
32 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /Fo$(CFG)\$(PLAT)\util\ /c @<<
36 # Inference rules for building the test programs
37 # Used for programs with a single source file.
38 # Format is as follows
39 # (all dirs must have a trailing '\'):
41 # {$(srcdir)}.$(srcext){$(destdir)}.exe::
42 # $(CC)|$(CXX) $(cflags) $< /Fo$*.obj /Fe$@ [/link $(linker_flags) $(dep_libs)]
43 {..\src\}.cc{$(CFG)\$(PLAT)\}.exe:
44 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) $< /Fo$*.obj /Fe$@ /link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_TESTS_DEP_LIBS)
46 {..\test\api\}.c{$(CFG)\$(PLAT)\}.exe:
47 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /DSRCDIR="\"../../../test/api\"" $< /Fo$*.obj /Fe$@ /link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_TESTS_DEP_LIBS)
49 # Rules for building .lib files
50 $(CFG)\$(PLAT)\harfbuzz.lib: $(HARFBUZZ_DLL_FILENAME).dll
51 $(CFG)\$(PLAT)\harfbuzz-icu.lib: $(HARFBUZZ_ICU_DLL_FILENAME).dll
52 $(CFG)\$(PLAT)\harfbuzz-gobject.lib: $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll
54 # Rules for linking DLLs
55 # Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
56 # $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
57 # link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)] [/implib:$(lib_name_if_needed)] -out:$@ @<<
58 # $(dependent_objects)
60 # @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
61 $(HARFBUZZ_DLL_FILENAME).dll: config.h $(harfbuzz_dll_OBJS) $(CFG)\$(PLAT)\harfbuzz
62 link /DLL $(LDFLAGS) $(HB_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz.lib -out:$@ @<<
65 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
67 $(HARFBUZZ_ICU_DLL_FILENAME).dll: $(CFG)\$(PLAT)\harfbuzz.lib $(harfbuzz_icu_OBJS) $(CFG)\$(PLAT)\harfbuzz-icu
68 link /DLL $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_ICU_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz-icu.lib -out:$@ @<<
71 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
73 $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll: $(CFG)\$(PLAT)\harfbuzz.lib $(harfbuzz_gobject_OBJS) $(CFG)\$(PLAT)\harfbuzz-gobject
74 link /DLL $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_GOBJECT_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz-gobject.lib -out:$@ @<<
75 $(harfbuzz_gobject_OBJS)
77 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
79 # Rules for linking Executables
80 # Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
81 # $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
82 # link [$(linker_flags)] [$(dependent_libs)] -out:$@ @<<
83 # $(dependent_objects)
85 # @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
86 $(CFG)\$(PLAT)\hb-view.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_view_OBJS)
87 link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
90 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
92 $(CFG)\$(PLAT)\hb-shape.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_shape_OBJS)
93 link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
96 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
98 $(CFG)\$(PLAT)\hb-ot-shape-closure.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_ot_shape_closure_OBJS)
99 link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
100 $(hb_ot_shape_closure_OBJS)
102 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
104 # Other .obj files requiring individual attention, that could not be covered by the inference rules.
105 # Format is as follows (all dirs must have a trailing '\'):
108 # $(CC)|$(CXX) $(cflags) /Fo$(obj_destdir) /c @<<
111 $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-structs.obj: $(CFG)\$(PLAT)\harfbuzz-gobject $(HB_GOBJECT_ENUM_GENERATED_SOURCES)
112 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /I$(CFG)\$(PLAT)\harfbuzz-gobject /Fo$(CFG)\$(PLAT)\harfbuzz-gobject\ /c @<<
113 ..\src\hb-gobject-structs.cc
116 $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.obj: $(CFG)\$(PLAT)\harfbuzz-gobject $(HB_GOBJECT_ENUM_GENERATED_SOURCES)
117 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /I$(CFG)\$(PLAT)\harfbuzz-gobject /Fo$(CFG)\$(PLAT)\harfbuzz-gobject\ /c @<<
118 $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc
122 @-if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib del /f /q $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib
123 @-if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.gir del /f /q $(CFG)\$(PLAT)\HarfBuzz-0.0.gir
124 @-if exist $(CFG)\$(PLAT)\hb_list del /f /q $(CFG)\$(PLAT)\hb_list
125 @-del /f /q $(CFG)\$(PLAT)\*.pdb
126 @-if exist $(CFG)\$(PLAT)\.exe.manifest del /f /q $(CFG)\$(PLAT)\*.exe.manifest
127 @-if exist $(CFG)\$(PLAT)\.exe del /f /q $(CFG)\$(PLAT)\*.exe
128 @-del /f /q $(CFG)\$(PLAT)\*.dll.manifest
129 @-del /f /q $(CFG)\$(PLAT)\*.dll
130 @-del /f /q $(CFG)\$(PLAT)\*.ilk
131 @-del /f /q $(CFG)\$(PLAT)\*.obj
132 @-if exist $(CFG)\$(PLAT)\util del /f /q $(CFG)\$(PLAT)\util\*.obj
133 @-if exist $(CFG)\$(PLAT)\harfbuzz-gobject del /f /q $(CFG)\$(PLAT)\harfbuzz-gobject\*.obj
134 @-if exist $(CFG)\$(PLAT)\harfbuzz-icu del /f /q $(CFG)\$(PLAT)\harfbuzz-icu\*.obj
135 @-del /f /q $(CFG)\$(PLAT)\harfbuzz\*.obj
136 @-rmdir /s /q $(CFG)\$(PLAT)
137 @-if exist $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h del $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h
138 @-if exist $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc del $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc
139 @-del vc$(VSVER)0.pdb