pjlib_samples.mak 723 B

123456789101112131415161718192021222324252627282930313233343536
  1. OUTDIR=.\output\pjlib-samples-i386-win32-$(VC)-$(MODE)
  2. SRCDIR=../src/pjlib-samples
  3. SAMPLES=$(OUTDIR)/except.exe \
  4. $(OUTDIR)/log.exe \
  5. $(OUTDIR)/list.exe \
  6. !IF "$(MODE)" == "debug"
  7. MODE_CFLAGS=/MTd
  8. !ELSE
  9. MODE_CFLAGS=/MT
  10. !ENDIF
  11. CFLAGS=/nologo /W4 $(MODE_CFLAGS) /DPJ_WIN32=1 /DPJ_M_I386=1 /I../include
  12. PJLIB=../lib/pjlib-i386-win32-$(VC)-$(MODE).lib
  13. DEPEND=$(PJLIB)
  14. LIBS=netapi32.lib mswsock.lib ws2_32.lib ole32.lib advapi32.lib
  15. CL=cl.exe
  16. all: "$(OUTDIR)" $(SAMPLES)
  17. $(SAMPLES): "$(SRCDIR)/$(@B).c" $(DEPEND)
  18. $(CL) /Fe$@ \
  19. /Fo$(@R).obj \
  20. $(CFLAGS) \
  21. $** $(LIBS)
  22. "$(OUTDIR)" :
  23. @IF NOT EXIST "$(OUTDIR)" MKDIR "$(OUTDIR)"
  24. clean :
  25. @IF EXIST "$(OUTDIR)" DEL /Q "$(OUTDIR)\*.*" && RMDIR "$(OUTDIR)"