Creating a Makefile and Compiling Model Code
- Updated2025-10-27
- 1 minute(s) read
Creating a Makefile and Compiling Model Code
Create a makefile for the compiler and operating system your model will use.
-
Create a makefile (.mak) to compile the model source code.
For examples of makefiles designed to compile models that work with the VeriStand Model Framework, refer to the example .mak and .mk files installed in the <RootDrive>\VeriStand\<xxxx>\ModelInterface\custom\examples directory.
Note <RootDrive> is the drive where NI software installs and <xxxx> is the VeriStand version number. - Place your model code components in the same directory as the makefile.
- Place your model framework components, ni_modelframework.h and ni_modelframework.c, in the same directory as the makefile.
- Run the makefile to compile your model code.
Related Information
- Adapting the C Template to Model Code
Use the template.c file that the VeriStand Model Framework installs as a starting point for your model code.
- Real-Time Controllers and Real-Time Operating System Compatibility
- Model Code Components
The files model.h and model.c are used to implement your models.
- Model Framework Components
The model framework includes files that define properties, identify functions for export, implement an interface, and create interdependent structures.