kalasag.org

kalasag.org

Git

This blob has been accessed 350 times via Git panel.

  1. # Makefile for Kalasag
  2. #
  3. # STEALTH MODE: Only works on Linux systems right now.
  4. #
  5. # The snprintf included with the package is for use with NEXTSTEP only,
  6. # (Thanks Timothy <tjl@luomat.org>) although it may work elsewhere.
  7. # We've not tried it under any other OS to date. It shouldn't be needed
  8. # by any modern OS.
  9. #
  10. # Others have used the snprintf from:
  11. #
  12. # http://www.ijs.si/software/snprintf/
  13. #
  14. # We've not tried this yet but others have had good success. Our only
  15. # piece of advice for those running an OS without built in snprintf()
  16. # is to upgrade. :)
  17. #
  18. #
  19. # Generic compiler (usually linked to gcc on most platforms)
  20. CC = cc
  21.  
  22. # GNU..
  23. #CC = gcc
  24.  
  25. # Normal systems flags
  26. CFLAGS = -O3 -funroll-loops -fomit-frame-pointer -Wall -w -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fasynchronous-unwind-tables -fexceptions -fpie -Wl,-pie -fstack-clash-protection -fstack-protector -fstack-protector-strong -fcf-protection -pipe -Werror=format-security -Werror=implicit-function-declaration -Wl,-z,defs -Wl,-z,now -Wl,-z,relro
  27.  
  28. # Debug mode for kalasag
  29. #CFLAGS = -Wall -g -DNODAEMON -DDEBUG
  30. #CFLAGS = -Wall -g -DNODAEMON
  31. #CFLAGS = -Wall -g -DDEBUG
  32.  
  33. # Profiler mode for kalasag
  34. #CFLAGS = -pg -O -Wall -DNODAEMON
  35. #LIBS = /usr/lib/libefence.a
  36.  
  37. INSTALLDIR = /opt
  38. CHILDDIR=/kalasag
  39.  
  40. all:
  41.                 @echo "Usage: make <systype>"
  42.                 @echo "<systype> is one of: linux, linux-x86_64, debian-linux, bsd, solaris, hpux, hpux-gcc,"
  43.                 @echo "freebsd, osx, openbsd, netbsd, bsdi, aix, osf, irix, generic"
  44.                 @echo ""
  45.                 @echo "This code requires snprintf()/vsnprintf() system calls"
  46.                 @echo "to work. If you run a modern OS it should work on"
  47.                 @echo "your system with 'make generic'. If you get it to"
  48.                 @echo "work on an unlisted OS please write us with the"
  49.                 @echo "changes."
  50.                 @echo ""
  51.                 @echo "Install: make install"
  52.                 @echo ""
  53.                 @echo "NOTE: This will install the package in this"
  54.                 @echo "      directory: $(INSTALLDIR)"
  55.                 @echo ""
  56.                 @echo "Edit the makefile if you wish to change these paths."
  57.                 @echo "Any existing files will be overwritten."
  58.                 @echo ""
  59.  
  60. clean:         
  61.                 /bin/rm ./kalasag
  62.  
  63. uninstall:     
  64.                 @if [ -f /usr/lib/systemd/system/kalasag.service ]; then systemctl stop kalasag.service; systemctl disable kalasag.service; rm -f /usr/lib/systemd/system/kalasag.service; fi
  65.                 @if [ -d $(INSTALLDIR)$(CHILDDIR) ]; then rm -rf $(INSTALLDIR)$(CHILDDIR)/*; fi
  66.  
  67. install:       
  68.                 @if [ ! -d $(INSTALLDIR)$(CHILDDIR) ]; then mkdir -p $(INSTALLDIR)$(CHILDDIR); fi
  69.                 @chmod 700 $(INSTALLDIR)$(CHILDDIR)
  70.                 @cp ./kalasag.conf $(INSTALLDIR)$(CHILDDIR)
  71.                 @cp ./kalasag.ignore $(INSTALLDIR)$(CHILDDIR)
  72.                 @cp ./kalasag $(INSTALLDIR)$(CHILDDIR)
  73.                 @if [ -d /usr/lib/systemd/system ]; then cp ./kalasag.service /usr/lib/systemd/system/; systemctl enable kalasag.service; fi
  74.                 @chmod 600 $(INSTALLDIR)$(CHILDDIR)/kalasag.ignore
  75.                 @chmod 600 $(INSTALLDIR)$(CHILDDIR)/kalasag.conf
  76.                 @chmod 700 $(INSTALLDIR)$(CHILDDIR)/kalasag
  77.                 @echo ""
  78.                 @echo 'Issue "systemctl restart kalasag.service" after editing $(INSTALLDIR)$(CHILDDIR)/kalasag.conf.'
  79.                 @echo ""
  80.  
  81. linux:         
  82.                 SYSTYPE=linux
  83.                 @echo "Making $(SYSTYPE)"
  84.                 $(CC) $(CFLAGS) -DLINUX -DSUPPORT_STEALTH -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c $(LIBS)
  85.  
  86. linux-x86_64:          
  87.                 SYSTYPE=linux
  88.                 @echo "Making $(SYSTYPE)"
  89.                 $(CC) $(CFLAGS) -m64 -DLINUX -DSUPPORT_STEALTH -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c $(LIBS)
  90.  
  91. debian-linux:          
  92.                 SYSTYPE=debian-linux
  93.                 @echo "Making $(SYSTYPE)"
  94.                 $(CC) $(CFLAGS) -DLINUX -DDEBIAN -DSUPPORT_STEALTH -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c $(LIBS)
  95.  
  96.  
  97. bsd:           
  98.                 SYSTYPE=bsd
  99.                 @echo "Making $(SYSTYPE)"
  100.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  101.  
  102.  
  103. openbsd:               
  104.                 SYSTYPE=openbsd
  105.                 @echo "Making $(SYSTYPE)"
  106.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  107.  
  108.  
  109. freebsd:               
  110.                 SYSTYPE=freebsd
  111.                 @echo "Making $(SYSTYPE)"
  112.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  113.  
  114. osx:           
  115.                 SYSTYPE=osx
  116.                 @echo "Making $(SYSTYPE)"
  117.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  118.  
  119.  
  120. netbsd:        
  121.                 SYSTYPE=netbsd
  122.                 @echo "Making $(SYSTYPE)"
  123.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  124.  
  125.  
  126. bsdi:          
  127.                 SYSTYPE=bsdi
  128.                 @echo "Making $(SYSTYPE)"
  129.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  130.  
  131.  
  132. generic:               
  133.                 SYSTYPE=generic
  134.                 @echo "Making $(SYSTYPE)"
  135.                 $(CC) $(CFLAGS) -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  136.  
  137.  
  138. hpux:          
  139.                 SYSTYPE=hpux
  140.                 @echo "Making $(SYSTYPE)"
  141.                 $(CC) -Ae -DHPUX -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  142.  
  143.  
  144. hpux-gcc:
  145.                 SYSTYPE=hpux-gcc
  146.                 @echo "Making $(SYSTYPE)"
  147.                 $(CC) $(CFLAGS) -DHPUX -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  148.  
  149.  
  150. solaris:               
  151.                 SYSTYPE=solaris
  152.                 @echo "Making $(SYSTYPE)"
  153.                 $(CC) -lnsl -lsocket -lresolv -lc -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  154.  
  155.  
  156. aix:           
  157.                 SYSTYPE=aix
  158.                 @echo "Making $(SYSTYPE)"
  159.                 $(CC) $(CFLAGS) -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  160.  
  161.  
  162. osf:
  163.                 SYSTYPE=osf
  164.                 @echo "Making $(SYSTYPE)"
  165.                 $(CC) $(CFLAGS) -taso -ldb -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  166.  
  167.  
  168. irix:
  169.                 SYSTYPE=irix
  170.                 @echo "Making $(SYSTYPE)"
  171.                 $(CC) $(CFLAGS) -O -n32 -mips3 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  172.  
  173.  
  174. # NeXTSTEP Users. NeXT used to work, but we changed the log function and
  175. # it now uses vsnprintf() to format strings. This means that this
  176. # version does not work under NeXTSTEP until we can find a workable
  177. # vsnprintf() call to put in the program. Sorry. If you have some good
  178. # vsnprintf() code to use under NeXT please send it to us and we'll
  179. # include it on the next update.
  180. #next:         
  181. #               SYSTYPE=next
  182. #               @echo "Making $(SYSTYPE)"
  183. #               $(CC) $(CFLAGS) -DNEXT -DHAS_NO_SNPRINTF -posix -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  184.  
filedropkalasag.git-1c9f013.tar.bz2 new
20.95 KB
76 downloads
filedropkalasag.git-1c9f013.zip
25.81 KB
28 downloads
filedropkalasag.git-3ca3612.tar.bz2
20.80 KB
42 downloads
filedropkalasag.git-3ca3612.zip
25.66 KB
27 downloads
filedropkalasag.git-2ffeaa6.tar.bz2
20.80 KB
54 downloads
filedropkalasag.git-2ffeaa6.zip
25.65 KB
31 downloads
filedropkalasag.git-2834a11.tar.bz2
20.84 KB
296 downloads
filedropkalasag.git-2834a11.zip
25.72 KB
163 downloads
filedropkalasag.git-afd7b31.tar.bz2
20.84 KB
217 downloads
filedropkalasag.git-afd7b31.zip
25.71 KB
113 downloads
filedropkalasag.git-97c89e1.tar.bz2
20.82 KB
308 downloads
filedropkalasag.git-97c89e1.zip
25.68 KB
215 downloads
filedropkalasag.git-1141d13.tar.bz2
20.65 KB
852 downloads
filedropkalasag.git-1141d13.zip
25.37 KB
208 downloads
filedropkalasag.git-ee3c17b.tar.bz2
20.65 KB
818 downloads
filedropkalasag.git-ee3c17b.zip
25.34 KB
198 downloads
filedropkalasag.git-4032c54.tar.bz2
20.63 KB
305 downloads
filedropkalasag.git-4032c54.zip
25.13 KB
214 downloads
filedropkalasag.git-e51a2a6.tar.bz2
20.65 KB
305 downloads
filedropkalasag.git-e51a2a6.zip
25.13 KB
190 downloads
filedropkalasag.git-599c93a.tar.bz2
20.63 KB
295 downloads
filedropkalasag.git-599c93a.zip
25.11 KB
1,520 downloads
filedropkalasag.git-acdc640.tar.bz2
20.63 KB
286 downloads
filedropkalasag.git-acdc640.zip
25.10 KB
207 downloads