diff --git a/Makefile b/Makefile index a477119..d95c86b 100644 --- a/Makefile +++ b/Makefile @@ -48,19 +48,7 @@ fclean: clean ## Remake the project re: fclean all -## Package lib -install: lib$(NAME).a $(INCPUB:%=$(INCDIR)/%.h) - @if ! [ -w $(TARGET) ]; then echo "make install: not enough permissions on target." && exit 1; fi - $(INST) -m 755 -d $(TARGET)$(TGTDIR)/lib/$(NAME)/$(VERSION)/include - $(INST) -m 644 lib$(NAME).a $(TARGET)$(TGTDIR)/lib/$(NAME)/$(VERSION) - $(foreach inc, $(INCPUB), \ - $(INST) -m 755 -d $(TARGET)$(TGTDIR)/lib/$(NAME)/$(VERSION)/include/$(shell dirname $(inc).h)$(\n) \ - $(INST) -m 644 $(INCDIR)/$(inc).h $(TARGET)$(TGTDIR)/lib/$(NAME)/$(VERSION)/include/$(shell dirname $(inc).h)$(\n)) - $(INST) -m 755 -d $(TARGET)$(TGTMANDIR)/man3 - $(foreach man, $(MAN3), \ - $(INST) -m 644 $(MANDIR)/man3/$(man) $(TARGET)$(TGTMANDIR)/man3$(\n)) - ## Doz rulz are phunny -.PHONY: all clean fclean re install +.PHONY: all clean fclean re # END OF FILE diff --git a/Makefile.cfg b/Makefile.cfg index 17f034a..f5115de 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -12,16 +12,11 @@ NAME = monochrome VERSION = 1.1 -# DIRECTORIES -## PROJECT +# PROJECT DIRECTORIES INCDIR = ./include SRCDIR = ./src OBJDIR = ./obj MANDIR = ./man -## TARGET -TARGET = / -TGTDIR = /usr/cross -TGTMANDIR = /usr/share/man # SOURCE FILES SRC = ML_vram_adress \ @@ -49,7 +44,21 @@ INCPUB = monochrome INCINT = monochrome/internals # MANPAGES -MAN3 = $(shell basename -a $(shell find $(MANDIR)/man3 -type f) $(shell find $(MANDIR)/man3 -type l)) +MAN3 = $(addsuffix .3,libmonochrome \ + ml_bmp ml_bmp_8_and ml_bmp_8_or ml_bmp_8_xor \ + ml_bmp_8_and_cl ml_bmp_8_or_cl ml_bmp_8_xor_cl \ + ml_bmp_16_and ml_bmp_16_or ml_bmp_16_xor \ + ml_bmp_16_and_cl ml_bmp_16_or_cl ml_bmp_16_xor_cl \ + ml_bmp_and ml_bmp_or ml_bmp_xor \ + ml_bmp_and_cl ml_bmp_or_cl ml_bmp_xor_cl \ + ml_line ml_horizontal_line ml_vertical_line \ + ml_circle ml_filled_circle \ + ml_ellipse ml_filled_ellipse \ + ml_ellipse_in_rect ml_filled_ellipse_in_rect \ + ml_polygon ml_filled_polygon \ + ml_scroll ml_vertical_scroll ml_horizontal_scroll \ + ml_vram ml_vram_adress ml_clear_screen ml_clear_vram \ + ml_display_vram ml_contrast ml_get_contrast ml_set_contrast) # BIN UTILITIES ## Platform diff --git a/debian/.gitignore b/debian/.gitignore index cd3d018..244b0c6 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -1 +1 @@ -/root +/all diff --git a/debian/changelog b/debian/changelog index 02b1fee..c4aa4c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,2 +1,6 @@ libmonochrome (1.1) stable; urgency=low - * First static version. + + * Initial release + + -- Thomas Touhey Mon, 9 May 2016 22:09:52 +0100 + diff --git a/debian/control b/debian/control index 4c3d2d4..bdca8fd 100644 --- a/debian/control +++ b/debian/control @@ -1,12 +1,14 @@ Source: libmonochrome -Priority: optional +Priority: extra Section: libs -Maintainer: Thomas "CakeIsALie5" Touhey -Uploader: Thomas "CakeIsALie5" Touhey +Maintainer: Thomas Touhey +Build-Depends: sh3eb-elf-gcc-4.9 (=4.9.2), sh3eb-elf-binutils-4.9 (=4.9.2) +Uploader: Thomas Touhey Standards-Version: 3.9.6 Vcs-Browser: http://git.planet-casio.com/cakeisalie5/libmonochrome.git Homepage: http://git.planet-casio.com/cakeisalie5/libmonochrome -Package: libmonochrome-dev +Package: cfx-libmonochrome-dev Architecture: all +Depends: sh3eb-elf-gcc, sh3eb-elf-binutils Description: Fast and efficient drawing static library for CASIO fx calculators. diff --git a/debian/copyright b/debian/copyright index 05cc425..d73734e 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,5 +1,5 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: libmonochrome +Upstream-Name: cfx-libmonochrome-dev Upstream-Contact: Thomas Touhey Source: http://git.planet-casio.com/cakeisalie5/libmonochrome diff --git a/debian/debian-binary b/debian/debian-binary new file mode 100644 index 0000000..cd5ac03 --- /dev/null +++ b/debian/debian-binary @@ -0,0 +1 @@ +2.0 diff --git a/debian/rules b/debian/rules old mode 100644 new mode 100755 index 079b7ea..0202369 --- a/debian/rules +++ b/debian/rules @@ -1,9 +1,75 @@ #!/usr/bin/make -f +#******************************************************************************# +# # +# debian/rules # +# | Project : libmonochrome # +# # +# By: thomas # +# Last updated: 2015/12/23 10:02:49 # +# # +#******************************************************************************# +# Who said you had to use automatic tools to make Debian packages ? # +#******************************************************************************# +# LOAD CONFIG +include $(CURDIR)/../Makefile.cfg +PKG = cfx-lib$(NAME)-dev +ARCH = all -# TODO : what are the rules that should be made ? +# STYLE VARS +define \n -%: - rm -rf root - mkdir -p root - # Make library and populate root - make -C ../ install TARGET="debian/root" + +endef + +# RULES +## Build the source into compiled programs/formatted documents in the build-tree. +build: build-arch build-indep + +## Build the source into arch-dependent formatted documents in the build-tree. +build-arch: + +## Build the source into arch-independent formatted documents in the build-tree. +build-indep: + make -C .. + +## Install files into a file tree for each binary package under the debian dir. +## If defined, binary* targets effectively depend on this target. +install: + mkdir -p $(ARCH) + $(INST) -m 755 -d $(ARCH)/usr/sh3eb-elf/lib/$(NAME)/$(VERSION)/include + $(INST) -m 644 ../lib$(NAME).a $(ARCH)/usr/sh3eb-elf/lib/$(NAME)/$(VERSION) + $(foreach inc, $(INCPUB), \ + $(if $(shell dirname $(inc).h), \ + $(INST) -m 755 -d $(ARCH)/usr/sh3eb-elf/lib/$(NAME)/$(VERSION)/include/$(shell dirname $(inc).h)$(\n)) \ + $(INST) -m 644 ../$(INCDIR)/$(inc).h $(ARCH)/usr/sh3eb-elf/lib/$(NAME)/$(VERSION)/include/$(shell dirname $(inc).h)$(\n)) + $(INST) -m 755 -d $(ARCH)/usr/share/man/man3 + $(foreach man, $(MAN3), \ + $(INST) -m 644 ../$(MANDIR)/man3/$(man) $(ARCH)/usr/share/man/man3$(\n)) + +## Create all binary packages +binary: binary-arch binary-indep + +## Create arch-dependent binary packages in the parent directory +binary-arch: + +## Create arch-independent binary packages in the parent directory +binary-indep: + cd all && tar cf ../data.tar.gz * + rm -f md5sums + cd $(ARCH) && for i in $$(find * -type f); do md5sum "$$i" >> ../md5sums; done + tar cf control.tar.gz control md5sums + ar rc ../$(PKG)_$(VERSION)_$(ARCH).deb data.tar.gz control.tar.gz debian-binary + rm data.tar.gz control.tar.gz md5sums + +## Clean all compiled/generated/useless files in the build-tree. +clean: + rm -rf $(ARCH) + make -C .. fclean + +## Non-standard: remakes everything +re: clean build install binary + +## Phony everything +.PHONY: build build-arch build-indep install binary binary-arch binary-indep clean re + +# END OF FILE