# Building a target-specific library

When the target-dependent files have been provided, construction of a library proceeds as follows:

``

    cd util
    cc -o makemake makemake.c

`(Since makemake is written portably in 'classic' C it should just compile and go. The options to C compilers vary, but most support this way of making an executable program call`ed makemake `from the source` makemake.c)

``

    cd ..
    util\makemake targetdir [hostdir]

`(`hostdir `is needed only if it is different from` targetdir`) (under DOS, use` util/makemake`...)`

``

    cd hostdir
    make depend

`(this augme`nts Makefile; as a si`de-effect it also makes the assembler-sourced objects.)`

``

    make

`(this makes` armlib.o`... if everything succeeds).`