[SOFTX86]
[reactos.git] / lib / 3rdparty / softx86 / Makefile
1 # Linux makefile for compiling SOFTX86
2 # (C) 2003 Jonathan Campbell all rights reserved.
3 #
4 # Requirements:
5 # GCC 3.xx
6 # NASM 0.95 and better
7 #
8 # This Makefile really just calls Make to compile sub-projects.
9
10 # make it all
11 all:: __autodetect_softx87 __autodetect_nasm
12 make -C samples
13 make -C softx86
14 if [ -d softx87 ]; then make -C softx87; fi
15 make -C softx86dbg
16
17 # clean it all
18 clean:: __fake_makes
19 make -C samples clean
20 make -C softx86 clean
21 if [ -d softx87 ]; then make -C softx87 clean; fi
22 make -C softx86dbg clean
23
24 # clean it all for distribution
25 distclean:: __fake_makes
26 make -C samples distclean
27 make -C softx86 distclean
28 if [ -d softx87 ]; then make -C softx87 distclean; fi
29 make -C softx86dbg distclean
30 rm -f softx86dbg/Makefile.softx86
31 rm -f samples/Makefile.nasm
32 rm -f lib/*.exp # clean up excess files from MSVC++
33 rm -f softx86.ncb
34 rm -f softx86.opt
35
36 # copy libsoftx86 and friends to the /usr/include and /usr/lib directories.
37 install::
38 if [ -f install.sh ]; then sh install.sh; fi
39
40 # run shell script that looks for soft87 project source
41 # tree (to be extracted within this source tree)
42 __autodetect_softx87:
43 ./autodetect_softx87.sh
44
45 # run shell script to look for NASM
46 __autodetect_nasm:
47 ./autodetect_nasm.sh
48
49 # create temporary empty versions of the
50 # include Makefiles that some rely on
51 # so they work. They will be deleted when
52 # "make clean" or "make distclean" is finished
53 __fake_makes:
54 if [[ !( -f samples/Makefile.nasm ) ]]; then echo "# nothing" >samples/Makefile.nasm; fi
55 if [[ !( -f softx86dbg/Makefile.softx86 ) ]]; then echo "# nothing" >softx86dbg/Makefile.softx86; fi
56