Listing 4a—You can use this makefile to build a embedded system program for ETS. I use CL, the Visual C++ compiler, to compile the C modules into object modules and Phar Lap’s linker, linkloc, to link the modules with the libraries necessary. b—In contrast to the Visual C++ makefile, this makefile looks much like a Unix makefile, which isn’t surprising since QNX looks and feels much like Unix. This makes many developers, myself included, feel at home being able to use arcane commands like vi and awk.

a)
# Makefile for Phar Lap ETS
RCTL1=test1.c servo.c gait.c
RCTL1HDR=global.h servo.h gait.h
rctl1.exe: $(RCTL1) $(RCTL1HDR)
  cl /c /Z7 $(RCTL1)
  linkloc @vc.emb  -exe rctl1.exe -cvsym \
    test1.obj servo.obj gait.obj -cvsym

b)

# Makefile for QNX
RCTL1=test1.c servo.c gait.c
RCTL1HDR=global.h servo.h gait.h
rctl1: $(RCTL1) $(RCTL1HDR)
  cc -o rctl1 $(RCTL1)