# core_portme.mak

Summary

core_portme.mak |
Variables |
OUTFLAG | Use this flag to define how to to get an executable (e.g -o)
CC | Use this flag to define compiler to use
CFLAGS | Use this flag to define compiler options.
LFLAGS_END | Define any libraries needed for linking or other flags that should come at the end of the link line (e.g.
PORT_SRCS | Port specific source files can be added here
LOAD | Define this flag if you need to load to a target, as in a cross compile environment.
RUN | Define this flag if running does not consist of simple invocation of the binary.
SEPARATE_COMPILE | Define if you need to separate compilation from link stage.
PORT_OBJS | Port specific object files can be added here
Build Targets |
port_prebuild | Generate any files that are needed before actual build starts.
port_postbuild | Generate any files that are needed after actual build end.
port_postrun | Do platform specific after run stuff.
port_prerun | Do platform specific after run stuff.
port_postload | Do platform specific after load stuff.
port_preload | Do platform specific before load stuff.
Variables |
OPATH |
PERL | Define perl executable to calculate the geomean if running separate.

### Variables

### OUTFLAG

Use this flag to define how to to get an executable (e.g -o)

### CC

Use this flag to define compiler to use

### CFLAGS

Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS=”other flags”

### LFLAGS_END

Define any libraries needed for linking or other flags that should come at the end of the link line (e.g. linker scripts). Note: On certain platforms, the default clock_gettime implementation is supported but requires linking of librt.

### PORT_SRCS

Port specific source files can be added here

### LOAD

Define this flag if you need to load to a target, as in a cross compile environment.

### RUN

Define this flag if running does not consist of simple invocation of the binary. In a cross compile environment, you need to define this.

### SEPARATE_COMPILE

Define if you need to separate compilation from link stage. In this case, you also need to define below how to create an object file, and how to link.

### PORT_OBJS

Port specific object files can be added here

### Build Targets

### port_prebuild

Generate any files that are needed before actual build starts. E.g. generate profile guidance files. Sample PGO generation for gcc enabled with PGO=1

- First, check if PGO was defined on the command line, if so, need to add -fprofile-use to compile line.
- Second, if PGO reference has not yet been generated, add a step to the prebuild that will build a profile-generate version and run it.

Note | Using REBUILD=1

Use make PGO=1 to invoke this sample processing.

### port_postbuild

Generate any files that are needed after actual build end. E.g. change format to srec, bin, zip in order to be able to load into flash

### port_postrun

Do platform specific after run stuff. E.g. reset the board, backup the logfiles etc.

### port_prerun

Do platform specific after run stuff. E.g. reset the board, backup the logfiles etc.

### port_postload

Do platform specific after load stuff. E.g. reset the reset power to the flash eraser

### port_preload

Do platform specific before load stuff. E.g. reset the reset power to the flash eraser

### Variables

### OPATH

Path to the output folder. Default | current folder.

### PERL

Define perl executable to calculate the geomean if running separate.

Close