• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
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
26{..\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
46$(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
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:$@ @<<
57$(harfbuzz_dll_OBJS)
58<<
59	@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
60
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)
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
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
127	@-del config.h
128