#************************************************************************** #* #* FreeType demo utilities sub-Makefile #* #* This Makefile is to be included by "freetype/demo/Makefile". Its #* purpose is to compile MiGS (the Minimalist Graphics Subsystem) #* #* It is written for GNU Make. Other make utilities are not #* supported.. !! #* #* #* The following variables must be defined : #* #* CFLAGS : C flags to use when compiling the utilities. This #* must NOT include the '-c' flag used to specify a #* simple compilation. #* #* IFLAG : include path flag. This is typically "-I" but some #* compilers use a different convention.. #* #* LFLAG : add link directory flag. Usually '-L' but could be #* different.. #* #* OBJ_DIR : target location of the object files #* #* UTIL_DIR : location of the utilities sources. I.e. this #* directory (usually "freetype/demo/graph"). #* #* #* It also defines the following variables #* #* SIMPLE_UTILS : list of object files for the non-graphical utilities #* #* GRAPH_UTILS : all object files, including the graphics sub-system #* #* GRAPH_FLAGS : additional compile flags for graphical apps #* GRAPH_LINK : additional link flags for graphical apps #* #************************************************************************** ########################################################################## # # # # # GRAPH_INCLUDES := graph GRAPH_LIB := $(OBJ_)graph.a GRAPH_LINK := $(GRAPH_LIB) GRAPH_ := graph$(SEP) GRAPH_H := $(GRAPH_)graph.h \ $(GRAPH_)grtypes.h \ $(GRAPH_)grobjs.h \ $(GRAPH_)grdevice.h \ $(GRAPH_)grblit.h GRAPH_OBJS := $(OBJ_)grblit.$O \ $(OBJ_)grobjs.$O \ $(OBJ_)grfont.$O \ $(OBJ_)grdevice.$O \ $(OBJ_)grinit.$O # Add the rules used to detect and compile graphics driver depending # on the current platform.. # include $(wildcard config/*/rules.mk) ######################################################################### # # Build the "graph" library from its objects. This should be changed # in the future in order to support more systems. Probably something # like a `config/' hierarchy with a system-specific rules file # to indicate how to make a library file, but for know, I'll stick to # unix and OS/2-gcc.. # # $(GRAPH_LIB): $(GRAPH_OBJS) ar -r $@ $(GRAPH_OBJS) # pattern rule for normal sources # $(OBJ_)%.$O: $(GRAPH_)%.c $(GRAPH_H) $(CC) $(CFLAGS) $(GRAPH_INCLUDES:%=$I%) $T$@ $< # a special rule is used for 'grinit.o' as it needs the definition # of some macros like "-DDEVICE_X11" or "-DDEVICE_OS2_PM" # $(OBJ_)grinit.$O: $(GRAPH_)grinit.c $(CC) $(CFLAGS) $(GRAPH_INCLUDES:%=$I%) $I$(DEVICE_INCLUDES:%=$I%) $T$@ $< \ $(DEVICES:%=$DDEVICE_%)