forked from svn2github/freearc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile
22 lines (22 loc) · 1.35 KB
/
compile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
exe=Tests/arc
for option; do if [[ $option == -DFREEARC_GUI ]]; then exe=Tests/freearc; fi; done
ctempdir=/tmp/out/FreeArc
tempdir=$ctempdir$1$2$3
mkdir -p $tempdir
mkdir -p $ctempdir
defines="-DFREEARC_PACKED_STRINGS -DFREEARC_UNIX -DFREEARC_INTEL_BYTE_ORDER -optc-DFREEARC_UNIX -optc-DFREEARC_INTEL_BYTE_ORDER"
# ******** -DFREEARC_WIN -DFREEARC_MOTOROLA_BYTE_ORDER -DFREEARC_ONLY_ALIGNED_ACCESS *******
cp unix-common.mak common.mak
cd Compression
chmod +x compile
./compile
cd ..
make
rm $exe
c_modules="$ctempdir/Environment.o $ctempdir/URL.o $ctempdir/Common.o $ctempdir/CompressionLibrary.o $ctempdir/C_PPMD.o $ctempdir/C_LZP.o $ctempdir/C_LZMA.o $ctempdir/C_BCJ.o $ctempdir/C_GRZip.o $ctempdir/C_Dict.o $ctempdir/C_REP.o $ctempdir/C_MM.o $ctempdir/C_TTA.o $ctempdir/C_Tornado.o $ctempdir/C_Delta.o $ctempdir/C_External.o $ctempdir/C_Encryption.o -optl-s -lstdc++ -lncurses -lcurl"
for option; do if [[ $option == -DFREEARC_GUI ]]; then c_modules="$c_modules $ctempdir/GuiEnvironment.o"; fi; done
options="-iCompression -iCompression/_TABI -threaded -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances -fno-monomorphism-restriction -fbang-patterns"
ghc_rts_options="+RTS -A2m"
hsc2hs Compression/_TABI/tabi.hsc
ghc --make $* Arc.hs $options $defines $c_modules -odir $tempdir -hidir $tempdir -o $exe $ghc_rts_options
rm Compression/CompressionLib_stub.?