next up previous contents index
Next: Bibliography Up: 2. Application Programmer's Guide Previous: 2.7 Reference   Contents   Index

2.8 How to Compile Your Application

To compile your application program, you can make use of the template makefile shown below. This is the makefile for the producer-consumer example. Change the variable YAPIROOT to the directory where you installed YAPI, and change the variable OBJS according to your sources.

Program 2.8.1   Makefile
YAPI          = $(YAPIROOT)

INCLUDES      = -I$(YAPI)/include
LIBS          = $(YAPIROOT)/lib/libyapi.a

CXX           = g++

OBJS          = consumer.o \
                producer.o \
                pc.o \

EXE           = ./run.exe

all:    $(EXE)

test:   $(EXE)

$(EXE): $(OBJS)
        $(CXX) $(LDFLAGS) $(OBJS) $(LIBS) -o $(EXE)

clean:; rm -rf $(OBJS) $(EXE)

© Copyright Koninklijke Philips Electronics NV 2006