1
0

patch-Makefile 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. --- ipcad-3.7.3.orig/Makefile 2007-04-22 10:08:45.000000000 +0200
  2. +++ ipcad-3.7.3/Makefile 2014-03-23 17:59:56.000000000 +0100
  3. @@ -1,4 +1,163 @@
  4. -all: bootstrap
  5. -bootstrap:
  6. - ./configure && make
  7. +prefix= /usr
  8. +exec_prefix= ${prefix}
  9. +bindir= /usr/bin
  10. +sysconfdir= /etc
  11. +datadir= /usr/share
  12. +
  13. +CC= /home/wbx/hudson/toolchain_x86_64-linux-gnu/usr/bin/arm-openadk-linux-muslgnueabihf-gcc
  14. +LDFLAGS= -L/home/wbx/hudson/target_arm_musl_eabihf/lib -L/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-O1 -Wl,-rpath -Wl,/usr/lib -Wl,-rpath-link -Wl,/home/wbx/hudson/target_arm_musl_eabihf/usr/lib -Wl,-z,relro,-z,now
  15. +LIBS= -lpcap
  16. +CFLAGS= -march=armv6 -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -fwrapv -fno-ident -fhonour-copts -fomit-frame-pointer -Os -pipe -fno-unwind-tables -fno-asynchronous-unwind-tables -g3 -DHAVE_CONFIG_H -W -Wall
  17. +CPPFLAGS=-DIPCAD_VERSION=\"3.7.3\"
  18. +CPPFLAGS+=-DCONFIG_FILE=\"${sysconfdir}/ipcad.conf\"
  19. +CPPFLAGS+=-DHAVE_CONFIG_H -D_REENTRANT -D_THREAD_SAFE
  20. +CPPFLAGS+=-DPSRC_pcap -DIFST_linux
  21. +
  22. +YACC=bison -y
  23. +LEX=flex
  24. +INSTALL=/usr/bin/install -c
  25. +
  26. +MANROOT=/usr/share/man/man
  27. +MAN8=${MANROOT}8
  28. +MAN5=${MANROOT}5
  29. +
  30. +NROFF= groff -Tascii -mandoc
  31. +
  32. +PACKAGE=ipcad
  33. +TARGETS=ipcad
  34. +VERSION=3.7.3
  35. +
  36. +IPCAD_OBJS= main.o process.o pps.o disp.o storage.o usage.o cfgy.o cfglex.o cfgread.o cfgvar.o dump.o import.o nflow.o cshelly.o cslex.o csparse.o service.o rw.o servers.o opt.o pidfile.o sf_lite.o
  37. +IPCAD_OBJS+= ifst_linux.o # Interface statistics
  38. +IPCAD_OBJS+= ifs_list.o # Interface statistics
  39. +IPCAD_OBJS+= loop-pcap.o # Method of capturing
  40. +IPCAD_OBJS+= loop-file.o # Method of capturing
  41. +IPCAD_OBJS+= loop-divert.o # Method of capturing
  42. +IPCAD_OBJS+= loop-dynamic.o # Method of capturing
  43. +IPCAD_OBJS+= loop-ulog.o loop-ipq.o # Methods of capturing
  44. +IPCAD_OBJS+= psrc.o psrc-pcap.o # Initialize capturers
  45. +IPCAD_OBJS+= psrc-ipq.o psrc-ulog.o # Initialize capturers
  46. +IPCAD_OBJS+= psrc-file.o # Initialize capturers
  47. +IPCAD_OBJS+= psrc-dynamic.o # Initialize capturers
  48. +IPCAD_OBJS+= psrc-divert.o # Initialize capturers
  49. +IPCAD_OBJS+= wrap_oclose.o # Special file descriptors cache
  50. +IPCAD_OBJS+= genhash.o # General hashing
  51. +
  52. +all: ${TARGETS} man
  53. +
  54. +ipcad: ${IPCAD_OBJS}
  55. + ${CC} ${CFLAGS} -o $@ ${IPCAD_OBJS} ${LDFLAGS} ${LIBS}
  56. +
  57. +.SUFFIXES:
  58. +.SUFFIXES: .o .c .0 .8 .5
  59. +
  60. +.c.o:
  61. + ${CC} ${CPPFLAGS} ${CFLAGS} -o $@ -c $<
  62. +
  63. +.8.0:
  64. + ${NROFF} $< > $@
  65. +
  66. +.5.0:
  67. + ${NROFF} $< > $@
  68. +
  69. +cfgy.h cfgy.c: cfg.y
  70. + ${YACC} -p ipcacfg -d cfg.y
  71. + @mv y.tab.c cfgy.c
  72. + @mv y.tab.h cfgy.h
  73. +
  74. +cshelly.h cshelly.c: cshell.y
  75. + ${YACC} -p CS -d cshell.y
  76. + @mv y.tab.c cshelly.c
  77. + @mv y.tab.h cshelly.h
  78. +
  79. +cslex.c: cslex.l
  80. + ${LEX} -s -p -Cem -ocslex.c -PCS cslex.l
  81. +
  82. +cfglex.c: cfglex.l
  83. + ${LEX} -s -p -Cem -ocfglex.c -Pipcacfg cfglex.l
  84. +
  85. +
  86. +man: ipcad.8 ipcad.conf.5
  87. +
  88. +distdir = $(PACKAGE)-$(VERSION)
  89. +distdir:
  90. + rm -rf $(distdir)
  91. + mkdir $(distdir)
  92. + cp *.c *.h $(distdir)
  93. + cp ipcad.8 ipcad.conf.5 $(distdir)
  94. + cp *.y *.l $(distdir)
  95. + cp *.in configure install-sh $(distdir)
  96. + cp ipcad.conf.default $(distdir)
  97. + cp ipcad.conf.simple $(distdir)
  98. + cp ipcad.spec.in $(distdir)
  99. + cp Makefile.in Makefile $(distdir)
  100. + cp ChangeLog INSTALL README TODO BUGS AUTHORS COPYING FAQ $(distdir)
  101. + cd $(distdir) && make distclean
  102. +
  103. +dist: distdir
  104. + tar chof - $(distdir) | GZIP="--best" gzip -c > $(distdir).tar.gz
  105. + rm -rf $(distdir)
  106. +
  107. +clean:
  108. + rm -f *.o ${TARGETS} *.core 1
  109. + rm -f *.0
  110. +
  111. +distclean: clean
  112. + rm -f config.h
  113. + rm -f config.cache config.log config.status
  114. + rm -f Makefile
  115. + rm -f $(distdir).tar.gz
  116. + rm -f ipcad.spec
  117. + (echo "all: bootstrap"; echo; echo "bootstrap:"; \
  118. + echo " ./configure && make") > Makefile
  119. +
  120. +maintainer-clean: distclean
  121. + @echo "This command is intended for maintainers to use; it"
  122. + @echo "deletes files that may need special tools to rebuild."
  123. + rm -f Makefile
  124. + rm -f *.tab.* cfgy.? *lex.c
  125. + rm -f config.h.in configure
  126. +
  127. +install: all install-bin install-conf
  128. +
  129. +install-bin:
  130. + @${INSTALL} -d $(DESTDIR)${bindir}
  131. + ${INSTALL} ipcad $(DESTDIR)${bindir}
  132. +
  133. +install-man: man
  134. + ${INSTALL} -m 444 ipcad.8 $(DESTDIR)${MAN8}/ipcad.8
  135. + ${INSTALL} -m 444 ipcad.conf.5 $(DESTDIR)${MAN5}/ipcad.conf.5
  136. +
  137. +install-conf:
  138. + @${INSTALL} -d $(DESTDIR)${sysconfdir}
  139. + ${INSTALL} -m 644 ipcad.conf.simple $(DESTDIR)${sysconfdir}/ipcad.conf.simple
  140. + -@diff ${sysconfdir}/ipcad.conf \
  141. + ${sysconfdir}/ipcad.conf.default >/dev/null 2>&1; \
  142. + if [ "$$?" -eq 0 ] || [ ! -f ${sysconfdir}/ipcad.conf ]; then \
  143. + echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
  144. + ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
  145. + echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \
  146. + ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf; \
  147. + echo "**********************************************"; \
  148. + echo "* Please customize ${sysconfdir}/ipcad.conf *"; \
  149. + echo "**********************************************"; \
  150. + else \
  151. + echo ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
  152. + ${INSTALL} -m 644 ipcad.conf.default $(DESTDIR)${sysconfdir}/ipcad.conf.default; \
  153. + echo "*********************************************"; \
  154. + echo "* Updated ${sysconfdir}/ipcad.conf.default *"; \
  155. + echo "*********************************************"; \
  156. + fi
  157. + @echo ""
  158. + @echo "Now you might want to 'make install-man'"
  159. + @echo ""
  160. +
  161. +
  162. +uninstall:
  163. + rm -f ${bindir}/ipcad
  164. + rm -f ${sysconfdir}/ipcad.conf.default
  165. + rm -f ${sysconfdir}/ipcad.conf.simple
  166. + rm -f ${MAN8}/ipcad.8
  167. + rm -f ${MAN5}/ipcad.conf.5
  168. +