|
| 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 | +{..\sigc++\}.cc{$(CFG)\$(PLAT)\libsigcpp\}.obj:: |
| 17 | + $(CXX) $(LIBSIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp\ /c @<< |
| 18 | +$< |
| 19 | +<< |
| 20 | + |
| 21 | +{..\sigc++\adaptors\lambda\}.cc{$(CFG)\$(PLAT)\libsigcpp\}.obj:: |
| 22 | + $(CXX) $(LIBSIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp\ /c @<< |
| 23 | +$< |
| 24 | +<< |
| 25 | + |
| 26 | +{..\sigc++\functors\}.cc{$(CFG)\$(PLAT)\libsigcpp\}.obj:: |
| 27 | + $(CXX) $(LIBSIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp\ /c @<< |
| 28 | +$< |
| 29 | +<< |
| 30 | + |
| 31 | +$(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj: $(CFG)\$(PLAT)\libsigcpp-tests ..\tests\testutilities.cc |
| 32 | + $(CXX) $(SIGCPP_CFLAGS) /Fo$@ /c ..\tests\testutilities.cc |
| 33 | +# Rules for building .lib files |
| 34 | +$(LIBSIGC_LIB): $(LIBSIGC_DLL) |
| 35 | + |
| 36 | +{.}.rc{$(CFG)\$(PLAT)\libsigcpp\}.res: |
| 37 | + rc /fo$@ $< |
| 38 | + |
| 39 | +# Rules for linking DLLs |
| 40 | +# Format is as follows (the mt command is needed for MSVC 2005/2008 builds): |
| 41 | +# $(dll_name_with_path): $(dependent_libs_files_objects_and_items) |
| 42 | +# link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)] [/implib:$(lib_name_if_needed)] -out:$@ @<< |
| 43 | +# $(dependent_objects) |
| 44 | +# << |
| 45 | +# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2 |
| 46 | +$(LIBSIGC_DLL): $(CFG)\$(PLAT)\libsigcpp $(libsigcpp_dll_OBJS) |
| 47 | + link /DLL $(LDFLAGS) /implib:$(LIBSIGC_LIB) -out:$@ @<< |
| 48 | +$(libsigcpp_dll_OBJS) |
| 49 | +<< |
| 50 | + @-if exist $@.manifest mt /manifest $@.manifest /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 $@.manifest mt /manifest $@.manifest /outputresource:$@;1 |
| 59 | + |
| 60 | +{..\examples\}.cc{$(CFG)\$(PLAT)\}.exe: |
| 61 | + @if not exist $(CFG)\$(PLAT)\libsigcpp-ex $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\libsigcpp-ex |
| 62 | + @if not exist $(LIBSIGC_LIB) $(MAKE) -f Makefile.vc CFG=$(CFG) $(LIBSIGC_LIB) |
| 63 | + $(CXX) $(SIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp-ex\ $< /Fe$@ /link $(LDFLAGS) $(LIBSIGC_LIB) |
| 64 | + @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1 |
| 65 | + |
| 66 | +{..\tests\}.cc{$(CFG)\$(PLAT)\}.exe: |
| 67 | + @if not exist $(LIBSIGC_LIB) $(MAKE) -f Makefile.vc CFG=$(CFG) $(LIBSIGC_LIB) |
| 68 | + @if not exist $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj |
| 69 | + $(CXX) $(SIGCPP_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp-tests\ $< /Fe$@ /link $(LDFLAGS) $(LIBSIGC_LIB) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj |
| 70 | + @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1 |
| 71 | + |
| 72 | +$(CFG)\$(PLAT)\libsigc++-benchmark.exe: ..\tests\benchmark.cc |
| 73 | + @if not exist $(LIBSIGC_LIB) $(MAKE) -f Makefile.vc CFG=$(CFG) $(LIBSIGC_LIB) |
| 74 | + @if not exist $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj $(MAKE) -f Makefile.vc CFG=$(CFG) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj |
| 75 | + $(CXX) $(SIGCPP_BENCHMARK_CFLAGS) /Fo$(CFG)\$(PLAT)\libsigcpp-tests\ ..\tests\benchmark.cc /Fe$@ /link $(LDFLAGS) $(LIBSIGC_LIB) $(CFG)\$(PLAT)\libsigcpp-tests\testutilities.obj |
| 76 | + @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1 |
| 77 | + |
| 78 | +clean: |
| 79 | + @-del /f /q $(CFG)\$(PLAT)\*.exe |
| 80 | + @-del /f /q $(CFG)\$(PLAT)\*.dll |
| 81 | + @-del /f /q $(CFG)\$(PLAT)\*.pdb |
| 82 | + @-del /f /q $(CFG)\$(PLAT)\*.ilk |
| 83 | + @-del /f /q $(CFG)\$(PLAT)\*.exp |
| 84 | + @-del /f /q $(CFG)\$(PLAT)\*.lib |
| 85 | + @-if exist $(CFG)\$(PLAT)\libsigcpp-tests del /f /q $(CFG)\$(PLAT)\libsigcpp-tests\*.obj |
| 86 | + @-del /f /q $(CFG)\$(PLAT)\libsigcpp-ex\*.obj |
| 87 | + @-del /f /q $(CFG)\$(PLAT)\libsigcpp\*.res |
| 88 | + @-del /f /q $(CFG)\$(PLAT)\libsigcpp\*.obj |
| 89 | + @-if exist $(CFG)\$(PLAT)\libsigcpp-tests rd $(CFG)\$(PLAT)\libsigcpp-tests |
| 90 | + @-rd $(CFG)\$(PLAT)\libsigcpp-ex |
| 91 | + @-rd $(CFG)\$(PLAT)\libsigcpp |
| 92 | + @-del /f /q vc$(PDBVER)0.pdb |
0 commit comments