25.5 Choosing Makefiles. 4tH 4tH Forth compiler
Annonce
Annonce
CHAPTER 25. COMPILING THE SOURCE
You can compile each function manually by issuing the command: cc $(CFLAGS) -O -c <function>.c
You’ll end up with 11 objectfiles. You can add these functions to a library by issuing: ar r lib4th.a <function>.o
479
The resulting library must be moved to the /usr/lib directory. When using MS-DOS we strongly advise you to create a library for each memory-model, like "4ths.lib" for a small memory-model library, "4thl.lib" for a large memory-model library, etc. When you compile a function for a particular memory-model you’ll have to add the memorymodel switch.
Then create a library by issuing this command for each function: lib 4th<model>.lib + <function>.obj
Whether you use a makefile or create the library manually, you should end up with a working 4tH library. If you are unable to make a working makefile, write a script- or batchfile.
If you have to recreate the library, it will save you a lot of work.
25.5
Choosing Makefiles
There are several different Makefiles for different platforms. The default of the generic package is Linux. If that one doesn’t work for you, you can resort to the following variants:
F
ILENAME
D
ESCRIPTION
Makefile The default Makefile for your package
Makefile.LIN
A Makefile for the Linux platform, will work for most distributions and flavors
Makefile.UNX
A very vanilla Makefile, most likely to work on a host of different *nix platforms
Makefile.BSD
A vanilla Makefile, targetted at BSD-like platforms like
HP-UX, NeXT, etc.
Makefile.COH
A Makefile for the Coherent 4.2 platform
Makefile.OSX
A Makefile for the Apple OS/X platform
Makefile.NAN
A Makefile to cross compile for the Linux Ben Nanonote platform
Makefile.W32
A Makefile (for cross compilation) using the MinGW compiler for the MS-Windows 32-bit platform
Makefile.DOS
A Makefile (for cross compilation) using the DJGPP compiler for the MS-DOS platform
The easiest and most reliable way to activate the Makefile required is to delete or rename the orginal and rename the Makefile of your choice to Makefile. Then issue: make
And most likely you’ll get a functioning executable. If it doesn’t work read the Makefile and the README file of your package for more details. Don’t forget to inform us if something doesn’t work as advertised or if you have any comments or experiences to share.
Download
Annonce