CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

about making makefile

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 16, 2001, 20:05
Default about making makefile
  #1
JunseokKim
Guest
 
Posts: n/a
I have a couple of C programs, and I wonder what are people's usesage of makefile.

My compilers are cc, gcc.

For detail, I have five files.

main.c main.h

file2.c file2.h

file3.c file3.h

file4.c file4.h

file5.c file5.h

These files are interconnected, that is they are using each other's function definitions.

what are possible makefile forms?

Thanks in advance.

  Reply With Quote

Old   May 16, 2001, 21:39
Default Re: about making makefile
  #2
Sebastien Perron
Guest
 
Posts: n/a
This is in no way related to CFD. But here is an exemple of a simple makefile:

_____________________________________________

CC= gcc STD= _GNU_SOURCE DEBUG= -O2 OBJS=\ dos_cvrt.o\ unix2dos.o\ dos2unix.o\ put_ch.o

.c.o:

$(CC) -c $(DEBUG) -Wall -D$(STD) $<

all: dos_cvrt unix_cvrt

dos_cvrt: $(OBJS)

$(CC) $(OBJS) -o dos_cvrt

unix_cvrt : dos_cvrt

rm -f unix_cvrt

ln dos_cvrt unix_cvrt

clean:

rm -f *.o *.core

clobber:

rm -f *.o *.core dos_cvrt unix_cvrt

__________________________________________________
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
swak4foam building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 15:40.