|
| 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 | +{..\datrie\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\datrie\}.obj:: |
| 17 | + $(CC) $(CFLAGS) $(LIBDATRIE_BASE_CFLAGS) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\datrie\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\datrie\ /c @<< |
| 18 | +$< |
| 19 | +<< |
| 20 | + |
| 21 | +{..\tools\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\}.obj:: |
| 22 | + $(CC) $(CFLAGS) $(TRIETOOL_CFLAGS) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\trietool\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\trietool\ /c @<< |
| 23 | +$< |
| 24 | +<< |
| 25 | + |
| 26 | +{..\tests\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\}.obj:: |
| 27 | + @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\ $(MAKE) /f Makefile.vc CFG=$(CFG) vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests |
| 28 | + $(CC) $(CFLAGS) $(LIBDATRIE_BASE_CFLAGS) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\ /c @<< |
| 29 | +$< |
| 30 | +<< |
| 31 | + |
| 32 | +# Rules for building .lib files |
| 33 | +vs$(PDBVER)\$(CFG)\$(PLAT)\datrie.lib: vs$(PDBVER)\$(CFG)\$(PLAT)\datrie.dll |
| 34 | + |
| 35 | +# Rules for linking DLLs |
| 36 | +# Format is as follows (the mt command is needed for MSVC 2005/2008 builds): |
| 37 | +# $(dll_name_with_path): $(dependent_libs_files_objects_and_items) |
| 38 | +# link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)] [/implib:$(lib_name_if_needed)] -out:$@ @<< |
| 39 | +# $(dependent_objects) |
| 40 | +# << |
| 41 | +# @-if exist [email protected] mt /manifest [email protected] /outputresource:$@;2 |
| 42 | +vs$(PDBVER)\$(CFG)\$(PLAT)\datrie.dll: \ |
| 43 | +vs$(PDBVER)\$(CFG)\$(PLAT)\datrie\datrie.def \ |
| 44 | +vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-0.2.pc \ |
| 45 | +$(libdatrie_dll_OBJS) |
| 46 | + link /DLL $(LDFLAGS) /implib:$(@R).lib /def:vs$(PDBVER)\$(CFG)\$(PLAT)\datrie\datrie.def \ |
| 47 | + -out:$@ @<< |
| 48 | +$(libdatrie_dll_OBJS) |
| 49 | +<< |
| 50 | + @-if exist [email protected] mt /manifest [email protected] /outputresource:$@;2 |
| 51 | + |
| 52 | +# Rules for linking Executables |
| 53 | +# Format is as follows (the mt command is needed for MSVC 2005/2008 builds): |
| 54 | +# $(dll_name_with_path): $(dependent_libs_files_objects_and_items) |
| 55 | +# link [$(linker_flags)] [$(dependent_libs)] -out:$@ @<< |
| 56 | +# $(dependent_objects) |
| 57 | +# << |
| 58 | +# @-if exist [email protected] mt /manifest [email protected] /outputresource:$@;1 |
| 59 | + |
| 60 | +vs$(PDBVER)\$(CFG)\$(PLAT)\trietool.exe: vs$(PDBVER)\$(CFG)\$(PLAT)\datrie.lib vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\config.h $(trietool_OBJS) |
| 61 | + link $(LDFLAGS) vs$(PDBVER)\$(CFG)\$(PLAT)\datrie.lib $(TRIETOOL_DEP_LIBS) -out:$@ $(trietool_OBJS) |
| 62 | + @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1 |
| 63 | + |
| 64 | +$(datrie_tests): |
| 65 | + link $(LDFLAGS) $** -out:$@ |
| 66 | + @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1 |
| 67 | + |
| 68 | +clean: |
| 69 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-0.2.pc |
| 70 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.exe |
| 71 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.dll |
| 72 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.pdb |
| 73 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.ilk |
| 74 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.exp |
| 75 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.lib |
| 76 | + @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\ del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\vc$(PDBVER)0.pdb |
| 77 | + @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\ del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\*.obj |
| 78 | + @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests\ rd vs$(PDBVER)\$(CFG)\$(PLAT)\datrie-tests |
| 79 | + @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\ del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\vc$(PDBVER)0.pdb |
| 80 | + @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\ del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\*.obj |
| 81 | + @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\ del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\config.h |
| 82 | + @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\trietool\ rd vs$(PDBVER)\$(CFG)\$(PLAT)\trietool |
| 83 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\datrie\vc$(PDBVER)0.pdb |
| 84 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\datrie\datrie.def |
| 85 | + @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\datrie\*.obj |
| 86 | + @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\datrie |
0 commit comments