diff options
author | andreas 'randy' weinberger <vdr@smue.org> | 2010-02-21 19:58:27 +0100 |
---|---|---|
committer | andreas 'randy' weinberger <vdr@smue.org> | 2010-02-21 19:58:27 +0100 |
commit | 10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3 (patch) | |
tree | 60ad7c856565f03e145b2996d1bb5f9cd64c0532 /glcddrivers/Makefile | |
download | graphlcd-base-10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3.tar.gz graphlcd-base-10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3.tar.bz2 |
initial git upload, based on graphlcd-base-0.1.5
Diffstat (limited to 'glcddrivers/Makefile')
-rw-r--r-- | glcddrivers/Makefile | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/glcddrivers/Makefile b/glcddrivers/Makefile new file mode 100644 index 0000000..bd4f375 --- /dev/null +++ b/glcddrivers/Makefile @@ -0,0 +1,60 @@ +# +# Makefile for the GraphLCD driver library +# + +-include ../Make.config + +CXXFLAGS += -fPIC + +VERMAJOR = 1 +VERMINOR = 0 +VERMICRO = 0 + +BASENAME = libglcddrivers.so + +LIBNAME = $(BASENAME).$(VERMAJOR).$(VERMINOR).$(VERMICRO) + +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 + +HEADERS = config.h driver.h drivers.h + + +### Implicit rules: + +%.o: %.c + $(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $< + +# Dependencies: + +MAKEDEP = g++ -MM -MG +DEPFILE = .dependencies +$(DEPFILE): Makefile + @$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@ + +-include $(DEPFILE) + +### Targets: + +all: $(LIBNAME) + +$(LIBNAME): $(OBJS) + $(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -ldl -lpthread -Wl,-soname="$(BASENAME).$(VERMAJOR)" -o $@ + ln -sf $(LIBNAME) $(BASENAME) + +install: all + install -d $(LIBDIR) + install -m 755 $(LIBNAME) $(LIBDIR)/ + install -d $(INCDIR)/glcddrivers + install -m 644 $(HEADERS) $(INCDIR)/glcddrivers/ + ( cd $(LIBDIR); ln -sf $(LIBNAME) $(BASENAME).$(VERMAJOR); ln -sf $(LIBNAME) $(BASENAME) ) + +uninstall: + rm -f $(LIBDIR)/$(BASENAME) + rm -f $(LIBDIR)/$(BASENAME).$(VERMAJOR) + rm -f $(LIBDIR)/$(LIBNAME) + (for i in $(HEADERS); do rm -f $(INCDIR)/glcddrivers/$$i; done) + rmdir $(INCDIR)/glcddrivers + +clean: + rm -f $(OBJS) $(DEPFILE) $(LIBNAME) $(BASENAME) *~ + |