mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
make, scripts: Re-add files necessary for building ytools
Re-add everthing needed for building and packaging ytools. This is a big commit, 2002 lines of code. It mostly consists of C/C++ machinery, plus some documentation-related stuff. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
0a9340af49
commit
bf16c6714b
27 changed files with 1975 additions and 0 deletions
44
make/include.mk
Normal file
44
make/include.mk
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
include $(JWBDIR)/make/defs.mk
|
||||
include $(JWBDIR)/make/defs-cpp.mk
|
||||
include $(JWBDIR)/make/dev-utils.mk
|
||||
|
||||
# variables
|
||||
SRC_H += $(PROJ_H) $(wildcard $(HDRDIR_SCOPE_SUFFIX)/*.h)
|
||||
|
||||
# mandatory targets
|
||||
all: $(PROJ_H)
|
||||
clean: clean.include
|
||||
install: install_HDR
|
||||
|
||||
# not wäry naaice
|
||||
ifneq ($(HDRDIR_SCOPE_SUFFIX),)
|
||||
install_HDR: dir_install_hdr_suffix.done
|
||||
|
||||
dir_install_hdr_suffix.done:
|
||||
$(INSTALL) -d -o $(HDRDIROWNER) -g $(HDRDIRGROUP) -m $(HDRDIRMODE) $(INSTALL_HDRDIR)/$(HDRDIR_SCOPE_SUFFIX)
|
||||
touch $@
|
||||
endif
|
||||
|
||||
# convenience targets
|
||||
project-header: $(PROJ_H)
|
||||
|
||||
# rules
|
||||
clean.include:
|
||||
$(RM) -rf *.h *~ .*.swp *.done $(PROJ_H) $(HDRDIR_SCOPE_SUFFIX)
|
||||
|
||||
$(PROJ_H): $(filter-out $(PROJ_H) $(PROJECT)/$(PROJ_H),$(wildcard *.h $(PROJECT)/*.h))
|
||||
echo "#ifndef _$(PROJECT_CAPNAME)_H" > $@.tmp
|
||||
echo "#define _$(PROJECT_CAPNAME)_H" >> $@.tmp
|
||||
echo >> $@.tmp
|
||||
for h in $(sort $(patsubst $(PROJECT)/%,%,$^)); do echo "#include <$(PROJECT)/$$h>"; done >> $@.tmp
|
||||
echo >> $@.tmp
|
||||
echo "#endif /* #ifndef _$(PROJECT_CAPNAME)_H */" >> $@.tmp
|
||||
mv $@.tmp $@
|
||||
|
||||
install-links:
|
||||
DEVELOPMENT=false make do-install-links
|
||||
|
||||
do-install-links:
|
||||
@$(call install_links,HDR)
|
||||
|
||||
include $(JWBDIR)/make/rules.mk
|
||||
Loading…
Add table
Add a link
Reference in a new issue