1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
#**************************************************************************
#*
#* 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 := $(TOP2_)graph
GRAPH_LIB := $(OBJ_)graph.$A
#GRAPH_LINK := $(GRAPH_LIB)
GRAPH_ := $(TOP2_)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
# Default value for COMPILE_GRAPH_LIB
# this value can be modified by the system-specific graphics drivers..
#
COMPILE_GRAPH_LIB = ar -r $@ $(GRAPH_OBJS)
# Add the rules used to detect and compile graphics driver depending
# on the current platform..
#
include $(wildcard $(TOP2)/graph/*/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/<system>' hierarchy with a system-specific rules file
# to indicate how to make a library file, but for now, I'll stick to
# unix, Win32 and OS/2-gcc..
#
#
$(GRAPH_LIB): $(GRAPH_OBJS)
$(COMPILE_GRAPH_LIB)
# 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 $(GRAPH_H)
$(CC) $(CFLAGS) $(GRAPH_INCLUDES:%=$I%) \
$(DEVICE_INCLUDES:%=$I%) \
$(DEVICES:%=$DDEVICE_%) $T$@ $<