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
|
#----------------------------------------------------------------------
# Makefile for SVGAlib GL routines.
#----------------------------------------------------------------------
# *** NO SERVICIBLE PARTS HERE!
# All options are in Makefile.cfg.
include ../Makefile.cfg
srcdir = ..
VPATH = $(srcdir)/gl
INCLUDES += -I$(srcdir)/src
ifeq (a.out, $(TARGET_FORMAT))
DEFINES += -DSVGA_AOUT
endif
ifeq (y, $(NO_ASM))
DEFINES += -DNO_ASSEMBLY
endif
#----------------------------------------------------------------------
# Rules Section
#----------------------------------------------------------------------
MODULES = grlib.o driver.o line.o palette.o scale.o text.o font8x8.o \
cbitmap.o mem.o
all: libvgagl.a
.PHONY: all clean dep
libvgagl.so: libvgagl.so.$(VERSION)
libvgagl.so.$(VERSION): $(MODULES)
$(CC) -s -shared -Wl,-soname,libvgagl.so.$(MAJOR_VER) -o libvgagl.so.$(VERSION) \
$(MODULES) $(SHLIBLIBS) -L$(srcdir)/sharedlib -lvga
ln -sf libvgagl.so.$(VERSION) libvgagl.so
ln -sf libvgagl.so.$(VERSION) libvgagl.so.$(MAJOR_VER)
libvgagl.a: $(MODULES)
rm -f libvgagl.a
$(AR) rcs libvgagl.a $(MODULES)
.c.o:
$(CC) $(CFLAGS) -c -o $*.o $<
.S.s:
$(CC) $(CFLAGS) -E $< >$@
.s.o:
$(CC) $(CFLAGS) -c -o $*.o $<
.c.s:
$(CC) $(CFLAGS) -S -o $*.s $<
.o:
$(CC) $(CFLAGS) $(LDFLAGS) -o $* $*.o $(LIBS)
chmod 4755 $*
$(MODULES): .depend.gl
dep:
rm -f .depend.gl
make depend
.depend.gl:
echo '# GL Module dependencies' >>.depend.gl
$(CC) $(INCLUDES) -MM $(patsubst %.o,$(srcdir)/gl/%.c,$(MODULES)) >>.depend.gl
clean:
rm -f .depend.gl *.bak *.o *~ libvgagl.a libvgagl.so*
#
# include a dependency file if one exists
#
ifeq (.depend.gl,$(wildcard .depend.gl))
include .depend.gl
endif
|