blob: 5408ead64df72e150724d584790aabdf1a42c617 [file] [log] [blame]
Chun-wei Fand7b66362015-11-03 19:00:42 +08001# 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.
6
7# Inference rules for compiling the .obj files.
8# Used for libs and programs with more than a single source file.
9# Format is as follows
10# (all dirs must have a trailing '\'):
11#
12# {$(srcdir)}.$(srcext){$(destdir)}.obj::
13# $(CC)|$(CXX) $(cflags) /Fo$(destdir) /c @<<
14# $<
15# <<
16{..\src\}.cc{$(CFG)\$(PLAT)\harfbuzz\}.obj::
17 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_LIB_CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz\ /c @<<
18$<
19<<
20
21{..\src\hb-ucdn\}.c{$(CFG)\$(PLAT)\harfbuzz\}.obj::
22 $(CC) $(CFLAGS) /Fo$(CFG)\$(PLAT)\harfbuzz\ /c @<<
23$<
24<<
25
Chun-wei Fand7b66362015-11-03 19:00:42 +080026{..\util\}.cc{$(CFG)\$(PLAT)\util\}.obj::
27 $(CXX) $(CFLAGS) $(HB_DEFINES) $(HB_CFLAGS) /Fo$(CFG)\$(PLAT)\util\ /c @<<
28$<
29<<
30
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 '\'):
35#
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)
40
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)
43
44# Rules for building .lib files
45$(CFG)\$(PLAT)\harfbuzz.lib: $(HARFBUZZ_DLL_FILENAME).dll
Chun-wei Fand7b66362015-11-03 19:00:42 +080046$(CFG)\$(PLAT)\harfbuzz-gobject.lib: $(HARFBUZZ_GOBJECT_DLL_FILENAME).dll
47
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)
53# <<
54# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
fanc999ad52e042017-06-21 22:19:57 +080055$(HARFBUZZ_DLL_FILENAME).dll: config.h $(HB_RAGEL_GENERATED_ACTUAL_SOURCES) $(harfbuzz_dll_OBJS) $(CFG)\$(PLAT)\harfbuzz
Chun-wei Fand7b66362015-11-03 19:00:42 +080056 link /DLL $(LDFLAGS) $(HB_DEP_LIBS) /implib:$(CFG)\$(PLAT)\harfbuzz.lib -out:$@ @<<
57$(harfbuzz_dll_OBJS)
58<<
59 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
60
Chun-wei Fand7b66362015-11-03 19:00:42 +080061$(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)
64<<
65 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
66
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)
72# <<
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:$@ @<<
76$(hb_view_OBJS)
77<<
78 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
79
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:$@ @<<
82$(hb_shape_OBJS)
83<<
84 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
85
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)
89<<
90 @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
91
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 '\'):
94#
95# $(obj_file):
96# $(CC)|$(CXX) $(cflags) /Fo$(obj_destdir) /c @<<
97# $(srcfile)
98# <<
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
102<<
103
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
107<<
108
109clean:
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
Chun-wei Fand7b66362015-11-03 19:00:42 +0800122 @-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
127 @-del config.h
fanc999ad52e042017-06-21 22:19:57 +0800128
129reallyclean: clean
130 @-del /f /q $(HB_RAGEL_GENERATED_ACTUAL_SOURCES)