patch-unix-console_Makefile 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. $Id$
  2. --- aiccu.orig/unix-console/Makefile 2007-01-15 12:04:27.000000000 +0100
  3. +++ aiccu/unix-console/Makefile 2009-12-28 16:39:06.687500000 +0100
  4. @@ -10,9 +10,9 @@
  5. # $Date: 2007-01-15 11:04:27 $
  6. # **********************************************************/
  7. -SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c
  8. +SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c ../common/dn_skipname.c
  9. INCS = ../common/tun.h ../common/aiccu.h ../common/hash_md5.h ../common/hash_sha1.h ../common/common.h ../common/heartbeat.h ../common/tic.h ../common/ayiya.h ../common/resolver.h
  10. -OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o
  11. +OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o ../common/dn_skipname.o
  12. # New features not fully implemented and thus disabled for now
  13. #CFLAGS += -D NEWSTUFF_TSP -D NEWSTUFF_TEEPEE
  14. @@ -46,110 +46,103 @@ LDFLAGS += -lgnutls
  15. endif
  16. # Linux
  17. -ifeq ($(shell uname | grep -c "Linux"),1)
  18. CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""
  19. SRCS += ../common/aiccu_linux.c
  20. OBJS += ../common/aiccu_linux.o
  21. LDFLAGS += -lpthread -lresolv
  22. -endif
  23. # FreeBSD
  24. -ifeq ($(shell uname | grep -c "FreeBSD"),1)
  25. -CFLAGS += -D_FREEBSD
  26. +#ifeq ($(shell uname | grep -c "FreeBSD"),1)
  27. +#CFLAGS += -D_FREEBSD
  28. # FreeBSD 4.x
  29. -ifeq ($(shell uname -r | cut -c 1),4)
  30. -CFLAGS += -D AICCU_TYPE="\"freebsd4\""
  31. -SRCS += ../common/aiccu_freebsd4.c
  32. -OBJS += ../common/aiccu_freebsd4.o
  33. -else
  34. +#ifeq ($(shell uname -r | cut -c 1),4)
  35. +#CFLAGS += -D AICCU_TYPE="\"freebsd4\""
  36. +#SRCS += ../common/aiccu_freebsd4.c
  37. +#OBJS += ../common/aiccu_freebsd4.o
  38. +#else
  39. # FreeBSD 5.x/6.x/7.x
  40. -CFLAGS += -D NEED_IFHEAD -D AICCU_TYPE="\"kame\""
  41. -SRCS += ../common/aiccu_kame.c
  42. -OBJS += ../common/aiccu_kame.o
  43. -endif
  44. -endif
  45. +#CFLAGS += -D NEED_IFHEAD -D AICCU_TYPE="\"kame\""
  46. +#SRCS += ../common/aiccu_kame.c
  47. +#OBJS += ../common/aiccu_kame.o
  48. +#endif
  49. +#endif
  50. # DragonFlyBSD
  51. -ifeq ($(shell uname | grep -c "DragonFly"),1)
  52. -CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
  53. -SRCS += ../common/aiccu_freebsd4.c
  54. -OBJS += ../common/aiccu_freebsd4.o
  55. -CFLAGS += -pthread
  56. -endif
  57. +#ifeq ($(shell uname | grep -c "DragonFly"),1)
  58. +#CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
  59. +#SRCS += ../common/aiccu_freebsd4.c
  60. +#OBJS += ../common/aiccu_freebsd4.o
  61. +#CFLAGS += -pthread
  62. +#endif
  63. # NetBSD
  64. -ifeq ($(shell uname | grep -c "NetBSD"),1)
  65. -CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\""
  66. -
  67. +#ifeq ($(shell uname | grep -c "NetBSD"),1)
  68. +#CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\""
  69. +#
  70. # Check if net/if_tun.h has TUNSIFHEAD and enable support for it
  71. -ifneq ($(shell grep -c TUNSIFHEAD /usr/include/net/if_tun.h 2>/dev/null),1)
  72. +#ifneq ($(shell grep -c TUNSIFHEAD /usr/include/net/if_tun.h 2>/dev/null),1)
  73. # Supports TUNSIFHEAD -> AYIYA/l2tp available
  74. -CFLAGS += -D NEED_IFHEAD
  75. -else
  76. +#CFLAGS += -D NEED_IFHEAD
  77. +#else
  78. # Doesn't support TUNSIFHEAD -> No AYIYA/l2tp available
  79. -CFLAGS += -D NO_IFHEAD
  80. -endif
  81. +#CFLAGS += -D NO_IFHEAD
  82. +#endif
  83. -SRCS += ../common/aiccu_kame.c
  84. -OBJS += ../common/aiccu_kame.o
  85. -CFLAGS += -pthread -D_NETBSD_SOURCE
  86. -endif
  87. +#SRCS += ../common/aiccu_kame.c
  88. +#OBJS += ../common/aiccu_kame.o
  89. +#CFLAGS += -pthread -D_NETBSD_SOURCE
  90. +#endif
  91. # OpenBSD
  92. -ifeq ($(shell uname | grep -c "OpenBSD"),1)
  93. -CFLAGS += -D_OPENBSD -D HAS_IFHEAD
  94. -# 2.7-2.9
  95. -ifeq ($(shell uname -r | cut -c 1),2)
  96. -CFLAGS += -D AICCU_TYPE="\"openbsd2\""
  97. -SRCS += ../common/aiccu_openbsd2.c
  98. -OBJS += ../common/aiccu_openbsd2.o
  99. -else
  100. -# 3.x-4.x etc
  101. -CFLAGS += -D AICCU_TYPE="\"openbsd\""
  102. -SRCS += ../common/aiccu_openbsd.c
  103. -OBJS += ../common/aiccu_openbsd.o
  104. -endif
  105. -CFLAGS += -pthread
  106. -endif
  107. +#ifeq ($(shell uname | grep -c "OpenBSD"),1)
  108. +#CFLAGS += -D_OPENBSD -D HAS_IFHEAD
  109. +## 2.7-2.9
  110. +#ifeq ($(shell uname -r | cut -c 1),2)
  111. +#CFLAGS += -D AICCU_TYPE="\"openbsd2\""
  112. +#SRCS += ../common/aiccu_openbsd2.c
  113. +#OBJS += ../common/aiccu_openbsd2.o
  114. +#else
  115. +## 3.x-4.x etc
  116. +#CFLAGS += -D AICCU_TYPE="\"openbsd\""
  117. +#SRCS += ../common/aiccu_openbsd.c
  118. +#OBJS += ../common/aiccu_openbsd.o
  119. +#endif
  120. +#CFLAGS += -pthread
  121. +#endif
  122. # Darwin
  123. -ifeq ($(shell uname | grep -c "Darwin"),1)
  124. -CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
  125. -SRCS += ../common/aiccu_darwin.c
  126. -OBJS += ../common/aiccu_darwin.o
  127. -LDFLAGS += -lresolv
  128. -endif
  129. +#ifeq ($(shell uname | grep -c "Darwin"),1)
  130. +#CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
  131. +#SRCS += ../common/aiccu_darwin.c
  132. +#OBJS += ../common/aiccu_darwin.o
  133. +#LDFLAGS += -lresolv
  134. +#endif
  135. # SunOS / Solaris
  136. -ifeq ($(shell uname | grep -c "SunOS"),1)
  137. -CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\""
  138. -SRCS += ../common/aiccu_sunos.c
  139. -OBJS += ../common/aiccu_sunos.o
  140. -LDFLAGS += -lsocket -lnsl -lresolv
  141. -endif
  142. +#ifeq ($(shell uname | grep -c "SunOS"),1)
  143. +#CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\""
  144. +#SRCS += ../common/aiccu_sunos.c
  145. +#OBJS += ../common/aiccu_sunos.o
  146. +#LDFLAGS += -lsocket -lnsl -lresolv
  147. +#endif
  148. # AIX
  149. -ifeq ($(shell uname | grep -c "AIX"),1)
  150. -CC = @/usr/vac/bin/xlc_r
  151. -CFLAGS = -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all
  152. -CFLAGS += -D AICCU_CONSOLE
  153. -CFLAGS += -D_AIX -D AICCU_TYPE="\"aix\""
  154. -SRCS += ../common/aiccu_aix.c
  155. -OBJS += ../common/aiccu_aix.o
  156. -LDFLAGS += -lpthread
  157. -endif
  158. +#ifeq ($(shell uname | grep -c "AIX"),1)
  159. +#CC = @/usr/vac/bin/xlc_r
  160. +#CFLAGS = -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all
  161. +#CFLAGS += -D AICCU_CONSOLE
  162. +#CFLAGS += -D_AIX -D AICCU_TYPE="\"aix\""
  163. +#SRCS += ../common/aiccu_aix.c
  164. +#OBJS += ../common/aiccu_aix.o
  165. +#LDFLAGS += -lpthread
  166. +#endif
  167. all: aiccu
  168. aiccu: $(OBJS) ${SRCS} ${INCS}
  169. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS)
  170. -ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0)
  171. -ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1)
  172. - strip $@
  173. -endif
  174. -endif
  175. clean:
  176. $(RM) -f $(OBJS) aiccu