Makefile: #glib_dir = /usr/local/include/glib-1.2 glib_dir = /usr/src/glib1.2-1.2.10 irssi_dir = /usr/src/irssi-0.8.10 all: note @make misc @make DH @make FiSH @echo @ls -l libfish.so @echo @echo -e "Compiling finished -->> $(PWD)/\033[1mlibfish.so\033[0m" @echo note: @echo @echo -e "######################## \033[7m\033[1mFiSH for irssi COMPILING NOTES\033[0m ########################" @echo "--------------------------------------------------------------------------------" @echo "You'll need MIRACL (http://indigo.ie/~mscott/) to compile FiSH! It is suggested" @echo "to recompile miracl.a on your target machine (compile instructions can be found" @echo -e "in miracl.zip/\033[1mlinux.txt\033[0m). Also, make sure you are using the correct mirdef.h" @echo -e "(especially in case of exotic systems). On \033[1mAMD64\033[0m systems use 'mirdef_amd64.h'" @echo -e "and have a look at miracl.zip/amd64.txt, use 'mirdef_macosx.h' for \033[1mMacOSX\033[0m. You" @echo -e "can test MIRACL with \033[1mpk-demo\033[0m. BSD fails in pk-demo.cpp and wants a '(time_t *)'" @echo "in line 54." @echo @echo -e "Using irssi source from: \033[1m$(irssi_dir)\033[0m" @echo -e "Using glib source from: \033[1m$(glib_dir)\033[0m (required to compile irssi)" @echo "-- Please make sure you have both installed!" @echo @echo -e "-- If you plan to use a \033[4mcustom\033[0m password for your blow.ini (via /setinipw)," @echo -e "-- you can \033[4mskip\033[0m the following note!" @echo "You are adviced to change default_iniKey in FiSH.h - But remember, changing the" @echo "default blow.ini password will make your old keys in blow.ini unusable!" @echo @echo -e "\033[1m>> \033[4mUsual procedure to compile FiSH:\033[0m" @echo " unzip FiSH-irssi.v0.99-source.zip;cd FiSH-irssi.v0.99-source" @echo " mkdir MIRACL;cd MIRACL;cp ../mir_amd64 amd64;cp ../mir_macosx macosx" @echo " wget http://indigo.ie/~mscott/miracl.zip" @echo -e " \033[4munzip -j -aa -L miracl.zip\033[0m (see linux.txt/amd64.txt for more info)" @echo -e " \033[4mbash linux\033[0m (or '\033[4mbash amd64\033[0m' / '\033[4mbash macosx\033[0m')" @echo " cp miracl.a ../;cd .." @echo " " @echo -e " \033[4mmake\033[0m (or '\033[4mmake macosx\033[0m' / '\033[4mmake amd64\033[0m')" @echo " cp libfish.so ~/irssi/lib/irssi/modules" @echo "--------------------------------------------------------------------------------" @echo @echo "Press ENTER to continue or CTRL+C to abort..."; read junk @if [ ! -f "miracl.a" ]; then echo "miracl.a not found! You didn't compile MIRACL, did you?"; echo; exit 1; fi @if [ ! -f "$(glib_dir)/glibconfig.h" ] && [ ! -f "$(glib_dir)/include/glibconfig.h" ] && [ ! -f "$(glib_dir)/glib/glibconfig.h" ]; then echo "glibconfig.h not found! Please install glib and modify 'glib_dir' ..."; echo; exit 1; fi @make -s clean @echo "Compiling now..." @echo clean: @echo @echo Cleaning up... @echo @rm -f SHA-256.o @rm -f base64.o @rm -f blowfish.o @rm -f cfgopts.o @rm -f DH1080.o @rm -f FiSH.o @rm -f libfish.so @rm -f DH1080.so DH: gcc -static -c DH1080.c gcc -static -shared DH1080.o miracl.a SHA-256.o base64.o -o DH1080.so misc: gcc -c -static SHA-256.c gcc -c -static base64.c gcc -c -static blowfish.c gcc -c -static cfgopts.c FiSH: gcc -I. -I$(glib_dir) -I$(glib_dir)/include -I$(glib_dir)/glib -I$(irssi_dir) -I$(irssi_dir)/src -I$(irssi_dir)/src/core -I$(irssi_dir)/src/fe-common/core -static -O2 -Wall -c FiSH.c -fPIC -DPIC -o FiSH.o gcc -static -shared FiSH.o SHA-256.o base64.o blowfish.o cfgopts.o DH1080.o miracl.a -o libfish.so mac: macosx macosx: note @if [ -f "mirdef_macosx.h" ]; then echo; echo "Using mirdef_macosx.h ..."; cp mirdef_macosx.h mirdef.h;echo; fi gcc -c -fno-common SHA-256.c gcc -c -fno-common base64.c gcc -c -fno-common blowfish.c gcc -c -fno-common cfgopts.c ranlib miracl.a gcc -fno-common -c DH1080.c gcc -bundle -flat_namespace -undefined suppress DH1080.o miracl.a SHA-256.o base64.o -o DH1080.so gcc -I. -I$(glib_dir) -I$(glib_dir)/include -I$(glib_dir)/glib -I$(irssi_dir) -I$(irssi_dir)/src -I$(irssi_dir)/src/core -I$(irssi_dir)/src/fe-common/core -fno-common -O2 -Wall -c FiSH.c -fPIC -DPIC -o FiSH.o gcc -bundle -flat_namespace -undefined suppress FiSH.o SHA-256.o base64.o blowfish.o cfgopts.o DH1080.o miracl.a -o libfish.so @echo @ls -l libfish.so @echo @echo -e "Compiling finished -->> $(PWD)/\033[1mlibfish.so\033[0m" @echo amd64: note @if [ -f "mirdef_amd64.h" ]; then echo; echo "Using mirdef_amd64.h ..."; cp mirdef_amd64.h mirdef.h;echo; fi gcc -c -static -fPIC SHA-256.c gcc -c -static -fPIC base64.c gcc -c -static -fPIC blowfish.c gcc -c -static -fPIC cfgopts.c gcc -static -c -fPIC DH1080.c gcc -static -fPIC -shared DH1080.o miracl.a SHA-256.o base64.o -o DH1080.so gcc -I. -I$(glib_dir) -I$(glib_dir)/include -I$(glib_dir)/glib -I$(irssi_dir) -I$(irssi_dir)/src -I$(irssi_dir)/src/core -I$(irssi_dir)/src/fe-common/core -static -O2 -Wall -c FiSH.c -fPIC -DPIC -o FiSH.o gcc -static -fPIC -shared FiSH.o SHA-256.o base64.o blowfish.o cfgopts.o DH1080.o miracl.a -o libfish.so @echo @ls -l libfish.so @echo @echo -e "Compiling finished -->> $(PWD)/\033[1mlibfish.so\033[0m" @echo ################################################################################## Output: gcc -c -static -fPIC SHA-256.c SHA-256.c: In function 'SHA256_memory': SHA-256.c:164: warning: incompatible implicit declaration of built-in function 'memset' gcc -c -static -fPIC base64.c base64.c: In function 'b64toh': base64.c:28: warning: incompatible implicit declaration of built-in function 'strlen' base64.c: In function 'htob64': base64.c:91: warning: incompatible implicit declaration of built-in function 'strlen' gcc -c -static -fPIC blowfish.c blowfish.c: In function 'encrypt_string': blowfish.c:146: warning: incompatible implicit declaration of built-in function 'malloc' blowfish.c:147: warning: incompatible implicit declaration of built-in function 'strncpy' blowfish.c:148: warning: incompatible implicit declaration of built-in function 'memset' blowfish.c:149: warning: incompatible implicit declaration of built-in function 'strlen' blowfish.c: In function 'decrypt_string': blowfish.c:186: warning: incompatible implicit declaration of built-in function 'malloc' blowfish.c:187: warning: incompatible implicit declaration of built-in function 'strncpy' blowfish.c:188: warning: incompatible implicit declaration of built-in function 'memset' blowfish.c:189: warning: incompatible implicit declaration of built-in function 'strlen' blowfish.c: In function 'encrypt_key': blowfish.c:212: warning: incompatible implicit declaration of built-in function 'strcpy' blowfish.c:214: warning: incompatible implicit declaration of built-in function 'strlen' gcc -c -static -fPIC cfgopts.c gcc -static -c -fPIC DH1080.c DH1080.c: In function 'DH1080_gen': DH1080.c:63: warning: incompatible implicit declaration of built-in function 'memset' DH1080.c:77: warning: incompatible implicit declaration of built-in function 'memset' DH1080.c: In function 'DH1080_comp': DH1080.c:120: warning: incompatible implicit declaration of built-in function 'strspn' DH1080.c:120: warning: incompatible implicit declaration of built-in function 'strlen' DH1080.c:122: warning: incompatible implicit declaration of built-in function 'memset' DH1080.c:139: warning: incompatible implicit declaration of built-in function 'memset' gcc -static -fPIC -shared DH1080.o miracl.a SHA-256.o base64.o -o DH1080.so /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtbeginT.o: relocation R_X86_64_32 against `__deregister_frame_info' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.1.2/crtbeginT.o: could not read symbols: Bad value collect2: ld returned 1 exit status make: *** [amd64] Error 1