70 lines
2.5 KiB
Makefile
Executable File
70 lines
2.5 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
||
#******************************************************************************#
|
||
# #
|
||
# debian/rules #
|
||
# | Project : libmonochrome #
|
||
# #
|
||
# By: thomas <thomas@touhey.fr> #
|
||
# Last updated: 2015/12/23 10:02:49 #
|
||
# #
|
||
#******************************************************************************#
|
||
# Who said you had to use automatic tools to make Debian packages ? #
|
||
#******************************************************************************#
|
||
# LOAD CONFIG
|
||
include $(CURDIR)/rules.cfg
|
||
|
||
# STYLE VARS
|
||
define \n
|
||
|
||
|
||
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:
|
||
$(foreach lib, $(LIB), \
|
||
$(INST) -m 644 ../$(LIBDIR)/$(lib) $(ARCH)$(LIBROOT)/$(lib)$(\n))
|
||
$(foreach inc, $(INC), \
|
||
$(INST) -m 644 ../$(INCDIR)/$(inc) $(ARCH)$(INCROOT)/$(inc)$(\n))
|
||
$(foreach man, $(MAN), \
|
||
$(INST) -m 644 ../$(MANDIR)/$(man) $(ARCH)$(MANROOT)/$(man)$(\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
|