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 {..\util\}.cc{$(CFG)\$(PLAT)\util\}.obj::
27 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /Fo$(CFG)\$(PLAT)\util\ /c @<<
31 # Inference rules for building the test programs
32 # Used for programs with a single source file.
33 # Format is as follows
34 # (all dirs must have a trailing '\'):
36 # {$(srcdir)}.$(srcext){$(destdir)}.exe::
37 # $(CC)|$(CXX) $(cflags) $< /Fo$*.obj /Fe$@ [/link $(linker_flags) $(dep_libs)]
38 {..\src\}.cc{$(CFG)\$(PLAT)\}.exe:
39 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) $< /Fo$*.obj /Fe$@ /link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_TESTS_DEP_LIBS)
41 {..\test\api\}.c{$(CFG)\$(PLAT)\}.exe:
42 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /DSRCDIR="\"../../../test/api\"" $< /Fo$*.obj /Fe$@ /link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_TESTS_DEP_LIBS)
44 # Rules for building .lib files
45 $(CFG)\$(PLAT)\harfbuzz.lib: $(HARFBUZZ_DLL_FILENAME).dll
46 $(CFG)\$(PLAT)\harfbuzz-gobject.lib: $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll
48 # Rules for linking DLLs
49 # Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
50 # $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
51 # link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)] [/implib:$(lib_name_if_needed)] -out:$@ @<<
52 # $(dependent_objects)
54 # @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
55 $(HARFBUZZ_DLL_FILENAME).dll: config.h $(harfbuzz_dll_OBJS) $(CFG)\$(PLAT)\harfbuzz
56 link /DLL $(LDFLAGS) $(HB_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz.lib -out:$@ @<<
59 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
61 $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll: $(CFG)\$(PLAT)\harfbuzz.lib $(harfbuzz_gobject_OBJS) $(CFG)\$(PLAT)\harfbuzz-gobject
62 link /DLL $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_GOBJECT_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz-gobject.lib -out:$@ @<<
63 $(harfbuzz_gobject_OBJS)
65 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
67 # Rules for linking Executables
68 # Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
69 # $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
70 # link [$(linker_flags)] [$(dependent_libs)] -out:$@ @<<
71 # $(dependent_objects)
73 # @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
74 $(CFG)\$(PLAT)\hb-view.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_view_OBJS)
75 link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
78 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
80 $(CFG)\$(PLAT)\hb-shape.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_shape_OBJS)
81 link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
84 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
86 $(CFG)\$(PLAT)\hb-ot-shape-closure.exe: $(CFG)\$(PLAT)\harfbuzz.lib $(CFG)\$(PLAT)\util $(hb_ot_shape_closure_OBJS)
87 link $(LDFLAGS) $(CFG)\$(PLAT)\harfbuzz.lib $(HB_UTILS_DEP_LIBS) -out:$@ @<<
88 $(hb_ot_shape_closure_OBJS)
90 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
92 # Other .obj files requiring individual attention, that could not be covered by the inference rules.
93 # Format is as follows (all dirs must have a trailing '\'):
96 # $(CC)|$(CXX) $(cflags) /Fo$(obj_destdir) /c @<<
99 $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-structs.obj: $(CFG)\$(PLAT)\harfbuzz-gobject $(HB_GOBJECT_ENUM_GENERATED_SOURCES)
100 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /I$(CFG)\$(PLAT)\harfbuzz-gobject /Fo$(CFG)\$(PLAT)\harfbuzz-gobject\ /c @<<
101 ..\src\hb-gobject-structs.cc
104 $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.obj: $(CFG)\$(PLAT)\harfbuzz-gobject $(HB_GOBJECT_ENUM_GENERATED_SOURCES)
105 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /I$(CFG)\$(PLAT)\harfbuzz-gobject /Fo$(CFG)\$(PLAT)\harfbuzz-gobject\ /c @<<
106 $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc
110 @-if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib del /f /q $(CFG)\$(PLAT)\HarfBuzz-0.0.typelib
111 @-if exist $(CFG)\$(PLAT)\HarfBuzz-0.0.gir del /f /q $(CFG)\$(PLAT)\HarfBuzz-0.0.gir
112 @-if exist $(CFG)\$(PLAT)\hb_list del /f /q $(CFG)\$(PLAT)\hb_list
113 @-del /f /q $(CFG)\$(PLAT)\*.pdb
114 @-if exist $(CFG)\$(PLAT)\.exe.manifest del /f /q $(CFG)\$(PLAT)\*.exe.manifest
115 @-if exist $(CFG)\$(PLAT)\.exe del /f /q $(CFG)\$(PLAT)\*.exe
116 @-del /f /q $(CFG)\$(PLAT)\*.dll.manifest
117 @-del /f /q $(CFG)\$(PLAT)\*.dll
118 @-del /f /q $(CFG)\$(PLAT)\*.ilk
119 @-del /f /q $(CFG)\$(PLAT)\*.obj
120 @-if exist $(CFG)\$(PLAT)\util del /f /q $(CFG)\$(PLAT)\util\*.obj
121 @-if exist $(CFG)\$(PLAT)\harfbuzz-gobject del /f /q $(CFG)\$(PLAT)\harfbuzz-gobject\*.obj
122 @-del /f /q $(CFG)\$(PLAT)\harfbuzz\*.obj
123 @-rmdir /s /q $(CFG)\$(PLAT)
124 @-if exist $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h del $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.h
125 @-if exist $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc del $(CFG)\$(PLAT)\harfbuzz-gobject\hb-gobject-enums.cc
126 @-del vc$(VSVER)0.pdb