Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #96411

Re: Compilation model

From "Pascal J. Bourguignon" <pjb@informatimago.com>
Newsgroups comp.lang.c
Subject Re: Compilation model
Date 2016-11-12 12:52 +0100
Organization Informatimago
Message-ID <m28tsoncej.fsf@larissa.home> (permalink)
References <c7dca28a-32cc-49ec-a4c1-bf7dea851cb7@googlegroups.com>

Show all headers | View raw


Thiago Adams <thiago.adams@gmail.com> writes:

> I am start to think a compilation model that consider a group of .c files is good, and I want to know what do you think.
>
>
> For instance. Let's say I have a group of files that correspond to one functionality, send e-mail.
>
> file1.h, file1.c ...  fileN.h, fileN.c
>
> and the one published header. mail.h
>
> I think that makes sense to think about a big block (mail.c)
> […]
> Something created could be:
>
> #pragma source "file1.c"
> #pragma source "file2.c"

-----( main.c )---------------------------------------------------------
#include "file1.h"
#include "file2.h"
…
#include "fileN.h"

// No separate compilation:
#include "file1.c"
#include "file2.c"
…
#include "fileN.c"
------------------------------------------------------------------------


-----( Makefile )-------------------------------------------------------
all: main
main:main.c file1.h file1.c file2.h file2.c … fileN.h fileN.c
   $(CC) -o main -I. main.c
------------------------------------------------------------------------

--
__Pascal Bourguignon__

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Compilation model Thiago Adams <thiago.adams@gmail.com> - 2016-11-11 03:00 -0800
  Re: Compilation model BartC <bc@freeuk.com> - 2016-11-11 11:55 +0000
    Re: Compilation model Thiago Adams <thiago.adams@gmail.com> - 2016-11-11 04:08 -0800
  Re: Compilation model "Pascal J. Bourguignon" <pjb@informatimago.com> - 2016-11-12 12:52 +0100
    Re: Compilation model Thiago Adams <thiago.adams@gmail.com> - 2016-11-12 13:47 -0800
      Re: Compilation model Thiago Adams <thiago.adams@gmail.com> - 2016-11-12 17:10 -0800

csiph-web