kalasag.org

kalasag.org

Git

This blob has been accessed 920 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
  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.                 /bin/systemctl stop kalasag.service
  65.                 /bin/systemctl disable kalasag.service
  66.                 /bin/rm /usr/lib/systemd/system/kalasag.service
  67.                 /bin/rm $(INSTALLDIR)$(CHILDDIR)/*
  68.                 /bin/rmdir $(INSTALLDIR)$(CHILDDIR)
  69.  
  70. install:       
  71.                 @echo "Creating directory $(INSTALLDIR)"
  72.                 @if [ ! -d $(INSTALLDIR) ]; then /bin/mkdir $(INSTALLDIR); fi
  73.                 @echo "Setting directory permissions"
  74.                 @echo "Creating kalasag directory $(INSTALLDIR)$(CHILDDIR)"
  75.                 @if [ ! -d $(INSTALLDIR)$(CHILDDIR) ]; then /bin/mkdir $(INSTALLDIR)$(CHILDDIR); fi
  76.                 @echo "Setting directory permissions"
  77.                 chmod 700 $(INSTALLDIR)$(CHILDDIR)
  78.                 @echo "Copying files"
  79.                 cp ./kalasag.conf $(INSTALLDIR)$(CHILDDIR)
  80.                 cp ./kalasag.ignore $(INSTALLDIR)$(CHILDDIR)
  81.                 cp ./kalasag $(INSTALLDIR)$(CHILDDIR)
  82.                 if [ -d /usr/lib/systemd/system ]; then cp ./kalasag.service /usr/lib/systemd/system/; /bin/systemctl enable kalasag.service; fi
  83.                 @echo "Setting permissions"
  84.                 chmod 600 $(INSTALLDIR)$(CHILDDIR)/kalasag.ignore
  85.                 chmod 600 $(INSTALLDIR)$(CHILDDIR)/kalasag.conf
  86.                 chmod 700 $(INSTALLDIR)$(CHILDDIR)/kalasag
  87.                 @echo ""
  88.                 @echo ""
  89.                 @echo "Edit $(INSTALLDIR)$(CHILDDIR)/kalasag.conf and change"
  90.                 @echo "your settings if you haven't already. (route, etc)"
  91.                 @echo ""
  92.  
  93. linux:         
  94.                 SYSTYPE=linux
  95.                 @echo "Making $(SYSTYPE)"
  96.                 $(CC) $(CFLAGS) -DLINUX -DSUPPORT_STEALTH -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c $(LIBS)
  97.  
  98. linux-x86_64:          
  99.                 SYSTYPE=linux
  100.                 @echo "Making $(SYSTYPE)"
  101.                 $(CC) $(CFLAGS) -m64 -DLINUX -DSUPPORT_STEALTH -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c $(LIBS)
  102.  
  103. debian-linux:          
  104.                 SYSTYPE=debian-linux
  105.                 @echo "Making $(SYSTYPE)"
  106.                 $(CC) $(CFLAGS) -DLINUX -DDEBIAN -DSUPPORT_STEALTH -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c $(LIBS)
  107.  
  108.  
  109. bsd:           
  110.                 SYSTYPE=bsd
  111.                 @echo "Making $(SYSTYPE)"
  112.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  113.  
  114.  
  115. openbsd:               
  116.                 SYSTYPE=openbsd
  117.                 @echo "Making $(SYSTYPE)"
  118.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  119.  
  120.  
  121. freebsd:               
  122.                 SYSTYPE=freebsd
  123.                 @echo "Making $(SYSTYPE)"
  124.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  125.  
  126. osx:           
  127.                 SYSTYPE=osx
  128.                 @echo "Making $(SYSTYPE)"
  129.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  130.  
  131.  
  132. netbsd:        
  133.                 SYSTYPE=netbsd
  134.                 @echo "Making $(SYSTYPE)"
  135.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  136.  
  137.  
  138. bsdi:          
  139.                 SYSTYPE=bsdi
  140.                 @echo "Making $(SYSTYPE)"
  141.                 $(CC) $(CFLAGS) -DBSD44 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  142.  
  143.  
  144. generic:               
  145.                 SYSTYPE=generic
  146.                 @echo "Making $(SYSTYPE)"
  147.                 $(CC) $(CFLAGS) -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  148.  
  149.  
  150. hpux:          
  151.                 SYSTYPE=hpux
  152.                 @echo "Making $(SYSTYPE)"
  153.                 $(CC) -Ae -DHPUX -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  154.  
  155.  
  156. hpux-gcc:
  157.                 SYSTYPE=hpux-gcc
  158.                 @echo "Making $(SYSTYPE)"
  159.                 $(CC) $(CFLAGS) -DHPUX -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  160.  
  161.  
  162. solaris:               
  163.                 SYSTYPE=solaris
  164.                 @echo "Making $(SYSTYPE)"
  165.                 $(CC) -lnsl -lsocket -lresolv -lc -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  166.  
  167.  
  168. aix:           
  169.                 SYSTYPE=aix
  170.                 @echo "Making $(SYSTYPE)"
  171.                 $(CC) $(CFLAGS) -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  172.  
  173.  
  174. osf:
  175.                 SYSTYPE=osf
  176.                 @echo "Making $(SYSTYPE)"
  177.                 $(CC) $(CFLAGS) -taso -ldb -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  178.  
  179.  
  180. irix:
  181.                 SYSTYPE=irix
  182.                 @echo "Making $(SYSTYPE)"
  183.                 $(CC) $(CFLAGS) -O -n32 -mips3 -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  184.  
  185.  
  186. # NeXTSTEP Users. NeXT used to work, but we changed the log function and
  187. # it now uses vsnprintf() to format strings. This means that this
  188. # version does not work under NeXTSTEP until we can find a workable
  189. # vsnprintf() call to put in the program. Sorry. If you have some good
  190. # vsnprintf() code to use under NeXT please send it to us and we'll
  191. # include it on the next update.
  192. #next:         
  193. #               SYSTYPE=next
  194. #               @echo "Making $(SYSTYPE)"
  195. #               $(CC) $(CFLAGS) -DNEXT -DHAS_NO_SNPRINTF -posix -o ./kalasag ./kalasag.c ./kalasag_io.c ./kalasag_util.c
  196.  
filedropkalasag.git-1c9f013.tar.bz2 new
20.95 KB
32 downloads
filedropkalasag.git-1c9f013.zip
25.81 KB
10 downloads
filedropkalasag.git-3ca3612.tar.bz2
20.80 KB
33 downloads
filedropkalasag.git-3ca3612.zip
25.66 KB
10 downloads
filedropkalasag.git-2ffeaa6.tar.bz2
20.80 KB
38 downloads
filedropkalasag.git-2ffeaa6.zip
25.65 KB
12 downloads
filedropkalasag.git-2834a11.tar.bz2
20.84 KB
36 downloads
filedropkalasag.git-2834a11.zip
25.72 KB
13 downloads
filedropkalasag.git-afd7b31.tar.bz2
20.84 KB
34 downloads
filedropkalasag.git-afd7b31.zip
25.71 KB
12 downloads
filedropkalasag.git-97c89e1.tar.bz2
20.82 KB
33 downloads
filedropkalasag.git-97c89e1.zip
25.68 KB
12 downloads
filedropkalasag.git-1141d13.tar.bz2
20.65 KB
36 downloads
filedropkalasag.git-1141d13.zip
25.37 KB
11 downloads
filedropkalasag.git-ee3c17b.tar.bz2
20.65 KB
32 downloads
filedropkalasag.git-ee3c17b.zip
25.34 KB
11 downloads
filedropkalasag.git-4032c54.tar.bz2
20.63 KB
30 downloads
filedropkalasag.git-4032c54.zip
25.13 KB
9 downloads
filedropkalasag.git-e51a2a6.tar.bz2
20.65 KB
340 downloads
filedropkalasag.git-e51a2a6.zip
25.13 KB
200 downloads
filedropkalasag.git-599c93a.tar.bz2
20.63 KB
328 downloads
filedropkalasag.git-599c93a.zip
25.11 KB
1,537 downloads
filedropkalasag.git-acdc640.tar.bz2
20.63 KB
319 downloads
filedropkalasag.git-acdc640.zip
25.10 KB
221 downloads