xmakem

Purpose:

This executable is an internal TRP method and not intended for end-users.

Enter:

 

Where:

 

Example:

1. xmakem output is a Makefile for standard CyFlex application

2. xmakem -u Given a standard .makes file: set_usr $@ bin/ata_drv -T1 set_usr $@ root ata_drv.cpp comm.cpp comstup.cpp ata_int.cpp $

Produces a ‘Makefile’ which will have the command “usemsg /asset/bin/ata_drv ata_drv.use” added to it.

if the ata_drv.use doesn t already exist the generic use file is copied from cyflex/asset/cmds/.

3. xmakem -x output is Makefile for x application

4. xmakem -x -u output is Makefile for x application with usemsg information. 5. xmakem srcn=4 libn=4 sysn=4 Generates a Makefile where the default nodes are set to node 4

6. xmakem with a .makes and -xapp for building XWindow applications

bin/Xevent_test -xapp event_test.c log_error.c $

7. xmakem with a .makes and -u for use information set_usr $@ bin/ata_drv -T1 set_usr $@ root comm.cpp comstup.cpp ata_drv.cpp -u ata_int.cpp $

8. xmakem with a .makes and ‘@’ option. xmakem recognizes these ‘@’ options as overrides statements. “@CCOPTIONS= ” “@EXTRA_DEFINES= ” “@EXTRA_LIBRARIES= ” “@DEP_LIBRARIES= ” “@LDEP_FLAGS= ” “@EMPRESSPATH= ” “@EMPRESSLIBDIRS= ” “@EMPRESSLIBS= ” “@QNX” “@ENDQNX” “@SL_LINUX” “@END_SL_LINUX” “@LINUX” “@ENDLINUX” “@ISSUE_SYSTEM_CMD” “@NOSHARED” “USEMSG_START”

These means if these options are detected they will be used instead of the statements produced normally by xmakem.

“@INCLUDES= ” is also recognized but any additional include paths will be appended to the end of the line.

Note: xmakem follows these steps 1. Reads .makes file and produces an Imakefile 2. It calls ‘xmkmf ‘ to read the Imakefile and produce a Makefile 3. It moves any existing makefile to makefile.xmakem

You cannot combine x-application and a non x-application in the same directory and .makes

Notes:

 

Options: -x create a Makefile for X Window Application. -r reset the REVISION define to 1 in revision.h -u create Makefile to add use information. -s create Shared Library version for Cyflex (default) -ns do not create Shared Libary Version for Cyflex -nostatic to prevent static libraries being used in CyFlex ms compiler option for small model.

SHEAP include the Smart Memory libraries.

srcn=n Sets default source node to n. The default is srcn=1.

libn=n Sets default lib node to n. The default is libn=1.

sysn=n Sets default system node to n. The default is sysn=1.

root=asset.00.Apr.A Sets default root path. The default is root=assetx

option flags for inside .makes

-xapp on tells xmakem that all applications in the .makes file are to be built for xwindows

-u on a source file tells xmakem that use information for the application is in this file.

You can use these commands now when running ‘make’ for an application.

1. make lint Run lint on all the source code for an application.

2. make lint1 FILE=generic.c Run lint on only one file.

3. make revision Increment the #define REVISION in the revision.h file. For this to work properly the application file witch contains the main() needs to be modified to include these lines:

#include “revision.h”

4. make depend Update the *.h,*.hpp file dependencies for the source files specified in the .makes.

5. xmkmf If the Imakefile is editted you can produce a new Makefile by running this command.

See Also: