1
0

patch-unix-console_Makefile 6.4 KB

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