talon.mk 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright (c) 2006-2011 Nokia Corporation and/or its subsidiary(-ies).
  2. # All rights reserved.
  3. # This component and the accompanying materials are made available
  4. # under the terms of the License "Eclipse Public License v1.0"
  5. # which accompanies this distribution, and is available
  6. # at the URL "http://www.eclipse.org/legal/epl-v10.html".
  7. #
  8. # Initial Contributors:
  9. # Nokia Corporation - initial contribution.
  10. #
  11. # Contributors:
  12. #
  13. # Description:
  14. # Utility makefile
  15. #
  16. #
  17. SHELL:=bash
  18. include $(SBS_HOME:\=/)/util/gccprogram.mk
  19. ifeq ($(filter win,$(HOSTPLATFORM)),win)
  20. CHOMP_C:=chomp.c
  21. PROCESS_C:=process_win.c
  22. CFLAGS:=-DHOST_WIN
  23. ifeq ($(SBS_MINGW),)
  24. LDFLAGS:=$(subst \,/,$(SBS_HOME:\=/)\win32\mingw\lib\libiberty.a)
  25. else
  26. LDFLAGS:=$(subst \,/,$(SBS_MINGW:\=/)\lib\libiberty.a)
  27. endif
  28. LDFLAGS:=$(LDFLAGS) -Wl,-lws2_32
  29. else
  30. CHOMP_C:=
  31. PROCESS_C:=process.c
  32. CFLAGS:=-g
  33. linux_PTHREADLIBS:=-lpthread
  34. LDFLAGS:=$(linux_PTHREADLIBS) -lrt
  35. endif
  36. CFLAGS:=$(CFLAGS) -Wall
  37. SOURCEDIR:=$(subst \,/,$(SBS_HOME))/util/talon
  38. # remember how to clean up:
  39. MANIFEST:=$(SOURCEDIR)/manifest
  40. TARGET:=talon
  41. SOURCES:=$(addprefix $(SOURCEDIR)/,talon.c buffer.c sema.c log.c env.c $(PROCESS_C) $(CHOMP_C))
  42. $(eval $(cprogram))
  43. TARGET:=talonctl
  44. SOURCES:=$(addprefix $(SOURCEDIR)/,talonctl.c sema.c log.c)
  45. $(eval $(cprogram))
  46. TARGET:=testbuffer
  47. SOURCES:=$(addprefix $(SOURCEDIR)/,testbuffer.c buffer.c log.c)
  48. $(eval $(cprogram))
  49. TARGET:=testprocess
  50. SOURCES:=$(addprefix $(SOURCEDIR)/,testprocess.c buffer.c log.c $(PROCESS_C))
  51. $(eval $(cprogram))
  52. TARGET:=talonlock
  53. SOURCES:=$(addprefix $(SOURCEDIR)/,lock.c sema.c log.c)
  54. $(eval $(cprogram))
  55. TARGET:=testchomp
  56. SOURCES:=$(addprefix $(SOURCEDIR)/,testchomp.c chomp.c log.c)
  57. $(eval $(cprogram))