|
[Sponsors] |
May 16, 2001, 21:05 |
about making makefile
|
#1 |
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. |
|
May 16, 2001, 22:39 |
Re: about making makefile
|
#2 |
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 __________________________________________________ |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17: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 02: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 18:51 |