In order to compile programs that uses the libraries of IRIT, a makefile has to be constructed. Assuming IRIT is installed in /usr/local/irit, here is a simple makefile that can be used (for a unix environment):
IRIT_DIR = /usr/local/irit include $(IRIT_DIR)/makeflag.unx OBJS = program.o program: $(OBJS) $(CC) $(CFLAGS) -o program $(OBJS) $(LIBS) -lm $(MORELIBS)
The simplicity of this makefile is drawn from the complexity of makeflag.unx. The file makeflag.unx sets the CC, CFLAGS, LIBS, and MORELIBS for the machined using among other things. Furthermore, makeflag.unx also sets the default compilation rules from C sources to object files. The file makeflag.unx had to be modified once, when IRIT was installed on this system. If the used system is not a unix environment, then the file makefile.unx will have to be replaced with the proper makeflag file. In an OS2 environment, using the emx gcc compiler, the makefile is even simpler since the linking rule is also defined in makeflag.os2:
IRIT_DIR = \usr\local\irit include $(IRIT_DIR)\makeflag.os2 OBJS = program.o program.exe: $(OBJS)
Finally, here is a proper makefile for Windows NT:
IRIT_DIR = \usr\local\irit include $(IRIT_DIR)\makeflag.wnt OBJS = program.obj program.exe: $(OBJS) $(IRITCONLINK) -out:program.exe $(OBJS) $(LIBS) $(W32CONLIBS)