Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-09

make files

6 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank W McCormick

Hi all

Can someone give me a simple example of a makefile suitable for just simple compiling of one file ? I am so used to running FPC from the command line that make is foreign to me.

Thanks

-------------- Frank McCormick Montreal --------------
James Mills
to Frank W McCormick
Frank W McCormick wrote 5 lines
Hi all Can someone give me a simple example of a makefile suitable for just simple compiling of one file ? I am so used to running FPC from the command line that make is foreign to me.

Catch!

cheers
James

- -Zero Defect Software Engineers Group - ZDSEG - -You need only two tools. WD-40 and duct tape. -If it doesn't move and it should, use WD-40. -If it moves and shouldn't, use the tape.
Jeff Pohlmeyer
Can someone give me a simple example of a makefile suitable for just simple compiling of one file ? I am so used to running FPC from the command line that make is foreign to me.

[EXAMPLE]

#!/bin/bash

all:
ppc386 somefile.pas

debug:
ppc386 -vewh -gl -Crtoi somefile.pp

clean:
rm -f *.o *.ppu

install: all
cp somefile /usr/local/bin

uninstall:
rm -f /usr/local/bin/somefile

[/EXAMPLE]

Notes:
The #!/bin/bash line isn't really necessary unless you have some shell-specific commands in your makefile. ( It is best to avoid this if possible )

The indentation of the commands below each section MUST be done with tabs, not spaces. This always catches me because I have have tab emulation turned on in my editor.

Identifiers after the colon on a section line insure that the other section is up to date.

The word "all" isn't magic, it is just conventional. If you invoke make without any arguments, it will default to the first section, regardless of what it is named.

Lots more info here:
http://www.gnu.org/manual/make/index.html

HTH,
- Jeff

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com

L D Blake
to Jeff Pohlmeyer

Hello,

Could someone please provide unsubscribe information for this list?

OR... could the list admin, please boot me off <G>.

Thanks.

Best regards, L D Blake
Carlo Kok
to L D Blake
L D Blake wrote 5 lines
Hello, Could someone please provide unsubscribe information for this list? OR... could the list admin, please boot me off <G>.

See the link added to the bottom of every message.

Carlo Kok