72 lines
1.8 KiB
Makefile
72 lines
1.8 KiB
Makefile
#----------------------------------------------------------------------
|
|
# Makefile for the main svgalib source.
|
|
#----------------------------------------------------------------------
|
|
|
|
# *** NO SERVICIBLE PARTS HERE!
|
|
# All options are in Makefile.cfg.
|
|
|
|
#include ../Makefile.cfg
|
|
|
|
srcdir = $(shell sh -c pwd)
|
|
prefix = /export/imx6/rootfs/rootfs-mx6g2c-new-nand/usr/local/test
|
|
|
|
#VPATH = $(srcdir)/src
|
|
|
|
#----------------------------------------------------------------------
|
|
# Compiler Section (overrides Makefile.cfg)
|
|
#----------------------------------------------------------------------
|
|
|
|
INCLUDES = -I$(srcdir)/gl/ -I$(srcdir)/test/
|
|
CFLAGS =
|
|
|
|
CC = arm-linux-gnueabihf-gcc
|
|
#----------------------------------------------------------------------
|
|
# Rules Section
|
|
#----------------------------------------------------------------------
|
|
fblib = gl/fbtool.o gl/point.o # line.o rectangle.o circle.o
|
|
|
|
testfb = /test/test.o
|
|
|
|
|
|
ALLOBJS = $(fblib) $(testfb)
|
|
frist:clean test
|
|
.c.o:
|
|
$(CC) $(CFLAGS) -c -o $*.o $<
|
|
|
|
|
|
.PHONY: all dep clean install
|
|
|
|
test: $(ALLOBJS)
|
|
$(CC) $(ALLOBJS) -o test_fb7 -lm
|
|
|
|
$(ALLOBJS): .depend
|
|
|
|
dep:
|
|
rm -f .depend
|
|
make .depend
|
|
|
|
.depend:
|
|
echo '# fblib dependencies' >>.depend.gl
|
|
$(CC) $(INCLUDES) -MM $(patsubst %.o,$(srcdir)/gl/%.c,$(fblib)) >>.depend.gl
|
|
sed 's#^\(.*\.o\):#gl/\1:#g' <.depend.gl >>.depend
|
|
rm -f .depend.gl
|
|
echo '# test dependencies' >>.depend.test
|
|
$(CC) $(INCLUDES) -MM $(patsubst %.o,$(srcdir)/src/%.c,$(testfb)) >.depend.test
|
|
sed 's#^\(.*\.o\):#test/\1:#g' <.depend.test >>.depend
|
|
rm -f .depend.test
|
|
|
|
|
|
clean:
|
|
@rm -fv gl/*.o gl/*.gch test/*.o test/*.gch test/test_fb7
|
|
install: clean test
|
|
@cp -vf $(srcdir)/test/test_fb7 $(prefix)
|
|
@chmod 777 $(prefix)/test_fb7
|
|
FORCE: # dummy target.
|
|
|
|
#
|
|
# include a dependency file if one exists
|
|
#
|
|
ifeq (.depend,$(wildcard .depend))
|
|
include .depend
|
|
endif
|