diff options
Diffstat (limited to 'pjsip-apps')
-rw-r--r-- | pjsip-apps/build/Samples-vc.mak | 16 | ||||
-rw-r--r-- | pjsip-apps/build/Samples.mak | 12 |
2 files changed, 18 insertions, 10 deletions
diff --git a/pjsip-apps/build/Samples-vc.mak b/pjsip-apps/build/Samples-vc.mak index acd598ec..8f88a0a9 100644 --- a/pjsip-apps/build/Samples-vc.mak +++ b/pjsip-apps/build/Samples-vc.mak @@ -55,7 +55,7 @@ LDFLAGS = $(BUILD_FLAGS) $(LIBS) \ SRCDIR = ..\src\samples OBJDIR = .\output\samples-$(TARGET) -BINDIR = ..\bin\samples +BINDIR = ..\bin\samples\$(TARGET) SAMPLES = $(BINDIR)\auddemo.exe \ @@ -84,20 +84,24 @@ SAMPLES = $(BINDIR)\auddemo.exe \ $(BINDIR)\tonegen.exe -all: $(OBJDIR) $(SAMPLES) +all: $(BINDIR) $(OBJDIR) $(SAMPLES) $(SAMPLES): $(SRCDIR)\$(@B).c $(LIBS) $(SRCDIR)\util.h Samples-vc.mak cl -nologo -c $(SRCDIR)\$(@B).c /Fo$(OBJDIR)\$(@B).obj $(CFLAGS) - cl /nologo $(OBJDIR)\$(@B).obj /Fe$(BINDIR)\$(@B)-$(TARGET).exe /Fm$(OBJDIR)\$(@B).map $(LDFLAGS) + cl /nologo $(OBJDIR)\$(@B).obj /Fe$@ /Fm$(OBJDIR)\$(@B).map $(LDFLAGS) @rem the following two lines is just for cleaning up the 'bin' directory - if exist $(BINDIR)\*$(TARGET).ilk del /Q $(BINDIR)\*$(TARGET).ilk - if exist $(BINDIR)\*$(TARGET).pdb del /Q $(BINDIR)\*$(TARGET).pdb + if exist $(BINDIR)\*.ilk del /Q $(BINDIR)\*.ilk + if exist $(BINDIR)\*.pdb del /Q $(BINDIR)\*.pdb + +$(BINDIR): + if not exist $(BINDIR) mkdir $(BINDIR) $(OBJDIR): if not exist $(OBJDIR) mkdir $(OBJDIR) clean: echo Cleaning up samples... - if exist $(BINDIR) del /Q $(BINDIR)\*$(TARGET).* + if exist $(BINDIR) del /Q $(BINDIR)\* + if exist $(BINDIR) rmdir $(BINDIR) if exist $(OBJDIR) del /Q $(OBJDIR)\*.* diff --git a/pjsip-apps/build/Samples.mak b/pjsip-apps/build/Samples.mak index d9b4ddcd..839ce29c 100644 --- a/pjsip-apps/build/Samples.mak +++ b/pjsip-apps/build/Samples.mak @@ -11,7 +11,7 @@ export _LDFLAGS := $(PJ_LDFLAGS) $(PJ_LDLIBS) $(LDFLAGS) SRCDIR := ../src/samples OBJDIR := ./output/samples-$(TARGET_NAME) -BINDIR := ../bin/samples +BINDIR := ../bin/samples/$(TARGET_NAME) SAMPLES := auddemo \ confsample \ @@ -37,11 +37,11 @@ SAMPLES := auddemo \ strerror \ tonegen -EXES := $(foreach file, $(SAMPLES), $(BINDIR)/$(file)-$(TARGET_NAME)$(HOST_EXE)) +EXES := $(foreach file, $(SAMPLES), $(BINDIR)/$(file)$(HOST_EXE)) -all: $(OBJDIR) $(EXES) +all: $(BINDIR) $(OBJDIR) $(EXES) -$(BINDIR)/%-$(TARGET_NAME)$(HOST_EXE): $(OBJDIR)/%$(OBJEXT) $(PJ_LIB_FILES) +$(BINDIR)/%$(HOST_EXE): $(OBJDIR)/%$(OBJEXT) $(PJ_LIB_FILES) $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$@) \ $(subst /,$(HOST_PSEP),$<) \ $(_LDFLAGS) @@ -54,12 +54,16 @@ $(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c $(OBJDIR): $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) +$(BINDIR): + $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) + depend: clean: $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR)) $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR)) $(subst @@,$(EXES),$(HOST_RM)) + rm -rf $(BINDIR) distclean realclean: clean # $(subst @@,$(subst /,$(HOST_PSEP),$(EXES)) $(subst /,$(HOST_PSEP),$(EXES)),$(HOST_RM)) |