02.05.2013 Views

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Building Projects With <strong>Source</strong> <strong>Integrity</strong><br />

Templates and<br />

Configuration<br />

Language<br />

Templates and<br />

Variable<br />

Expansion<br />

4. You could also add those included files as members of the project<br />

with the pj finddep command:<br />

c:\usr\work\hello.c depends on:<br />

c:\wcc\include\fin_func.h<br />

Add ‘c:\wcc\include\fin_func.h’ to project?<br />

[ynq](y):<br />

To add the file, press .<br />

This procedure only needs to be done once for each project, although<br />

the makefile will have to be updated (with pj mkmf) if new members<br />

are added to the project. You should also<br />

add the makefile as a member of the project<br />

put the makefile under revision control<br />

To build the project, simply give the command pj build.<br />

If SYSTEM is defined in the environment as “nt”<br />

@@<br />

@set OS=$getenv(SYSTEM)<br />

@OS@<br />

TEXT@OS@TEXT<br />

Line one expands to a literal @ character.<br />

Line two sets a variable named OS to “nt” but does not produce<br />

any output in the makefile.<br />

Line three produces a line in the expanded makefile containing<br />

the value of the variable OS (in this example, “nt”).<br />

Line four produces a line in the makefile containing the text<br />

TEXTntTEXT<br />

If a template named base.t contains the following lines<br />

@set version=1<br />

@set system=$getenv(SYSTEM)<br />

# Generated @SYSTEM@ makefile, Version @version@<br />

OBJ=@Objects@<br />

target.exe: $(OBJ)<br />

bcc -o $@@ $(OBJ)<br />

@Depends<br />

and the environment variable SYSTEM is set to “nt”, running the<br />

command<br />

pj mkmf -T base.t -M makefile<br />

240 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!