graphlcd-base/glcddrivers/Makefile
author root@rika
Wed, 06 Feb 2008 17:37:50 +0000
changeset 5 37602e25a04a
parent 4 df6a40031aa5
child 6 611d053f0972
permissions -rw-r--r--
added picctl code
     1 #
     2 # Makefile for the GraphLCD driver library
     3 #
     4 
     5 -include ../Make.config
     6 
     7 CXXFLAGS += -fPIC
     8 
     9 VERMAJOR = 1
    10 VERMINOR = 0
    11 VERMICRO = 0
    12 
    13 BASENAME = libglcddrivers.so
    14 
    15 LIBNAME = $(BASENAME).$(VERMAJOR).$(VERMINOR).$(VERMICRO)
    16 
    17 OBJS = common.o config.o driver.o drivers.o port.o simlcd.o framebuffer.o gu140x32f.o gu256x64-372.o gu256x64-3900.o hd61830.o ks0108.o image.o sed1330.o sed1520.o t6963c.o noritake800.o serdisp.o avrctl.o g15daemon.o network.o gu126x64D-K610A4.o picctl.o
    18 
    19 HEADERS = config.h driver.h drivers.h
    20 
    21 
    22 ### Implicit rules:
    23 
    24 %.o: %.c
    25 	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
    26 
    27 # Dependencies:
    28 
    29 MAKEDEP = g++ -MM -MG
    30 DEPFILE = .dependencies
    31 $(DEPFILE): Makefile
    32 	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
    33 
    34 -include $(DEPFILE)
    35 
    36 ### Targets:
    37 
    38 all: $(LIBNAME)
    39 
    40 $(LIBNAME): $(OBJS)
    41 	$(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -ldl -lpthread -Wl,-soname="$(BASENAME).$(VERMAJOR)" -o $@
    42 	ln -sf $(LIBNAME) $(BASENAME)
    43 
    44 install: all
    45 	install -d $(LIBDIR)
    46 	install -m 755 $(LIBNAME) $(LIBDIR)/
    47 	install -d $(INCDIR)/glcddrivers
    48 	install -m 644 $(HEADERS) $(INCDIR)/glcddrivers/
    49 	( cd $(LIBDIR); ln -sf $(LIBNAME) $(BASENAME).$(VERMAJOR); ln -sf $(LIBNAME) $(BASENAME) )
    50 
    51 uninstall:
    52 	rm -f $(LIBDIR)/$(BASENAME)
    53 	rm -f $(LIBDIR)/$(BASENAME).$(VERMAJOR)
    54 	rm -f $(LIBDIR)/$(LIBNAME)
    55 	(for i in $(HEADERS); do rm -f $(INCDIR)/glcddrivers/$$i; done)
    56 	rmdir $(INCDIR)/glcddrivers
    57 
    58 clean:
    59 	rm -f $(OBJS) $(DEPFILE) $(LIBNAME) $(BASENAME) *~
    60