jw-pkg/make/zip-windows-files.mk
Jan Lindemann 316435bb78 $(MODDIR)/make/defs.mk: Split off defs-cpp.mk with C++ definitions
C++ definitions are numerous, and they shouldn't pollute variable space and
performance outside of directories containing C++ files. This commit pushes
them into a defs-cpp.mk file.

Signed-off-by: Jan Lindemann <jan@janware.com>
2019-02-27 20:46:54 +00:00

62 lines
2.7 KiB
Makefile

WINLIB = win32/dsprout/Debug/dsprout.lib
$(WINLIB): $(REQUIRED_H)
@echo $@ "is out of date or not existing." >&2
exit 1
%-win-bin.zip: $(WINLIB)
$(RM) -rf $(LIBPCKGTMPDIR)
mkdir -p $(LIBPCKGDIR) \
$(LIBPCKGTMPDIR)/include \
$(LIBPCKGTMPDIR)/lib \
$(LIBPCKGTMPDIR)/test/console \
$(LIBPCKGTMPDIR)/test/minicc/qt
cp $(REQUIRED_H) $(LIBPCKGTMPDIR)/include
cp tools/*.h $(LIBPCKGTMPDIR)/include
cp $(SHARED_INCLUDE)/*.h $(LIBPCKGTMPDIR)/include
cp $(WINLIB) $(LIBPCKGTMPDIR)/lib
$(CAT) test/dsprout/win32/dsprout.dsp | . scripts/distify_vcpp_dsp.sh ../.. > $(LIBPCKGTMPDIR)/test/console/dsprot.dsp
cp test/dsprout/*.cpp $(LIBPCKGTMPDIR)/test/console
cp test/minicc/qt/*.cpp test/minicc/qt/*.h $(LIBPCKGTMPDIR)/test/minicc/qt
$(CAT) test/minicc/qt/win32/miniccqt.dsp | . scripts/distify_vcpp_dsp.sh ../../.. > $(LIBPCKGTMPDIR)/test/minicc/qt/miniccqt.dsp
echo $(DIST_VERSION) > $(LIBPCKGTMPDIR)/version.txt
$(CAT) CHANGES > $(LIBPCKGTMPDIR)/changes.txt
$(CAT) COPYING > $(LIBPCKGTMPDIR)/copying.txt
$(CAT) LGPL > $(LIBPCKGTMPDIR)/lgpl.txt
cd $(LIBPCKGTMPDIR)/..; zip -r `basename $@` `basename $(LIBPCKGTMPDIR)`
mv $(LIBPCKGTMPDIR)/../`basename $@` $(LIBPCKGDIR)
%-win-src.zip:
mkdir -p $(DISTDIR)/src/$(PROJECT)
mkdir -p $(PCKG_DIR)
$(RM) -rf $(DISTDIR)/src/$(PROJECT)/*
mkdir -p $(DISTDIR)/src/$(PROJECT)/mod
cd $(TOPDIR); find . -type f | \
grep -ve 'include\|\.plg\|\.opt\|\.ncb\|Debug\|\.rep\|\.dsw\|\.dsp\|.*.\o' | \
grep -ve 'Makefile\|CVS\|contrib/nomake\|\.tar.gz\|/dist/\|experimental\|old\|\.*.\.swp\|.*~' | \
xargs tar -cf - | tar -C $(DISTDIR)/src/$(PROJECT) -xf -
echo $(DIST_VERSION) > $(DISTDIR)/src/$(PROJECT)/VERSION ;\
set -e; for mod in $(REQUIRED) ; do \
make -C $(MODDIR)/$$mod clean ;\
mkdir -p $(DISTDIR)/src/$(PROJECT)/mod/$$mod ;\
echo `ls $(MODDIR)/$$mod/*.h`; \
modfiles="`find $(MODDIR)/$$mod -maxdepth 1 -name *.h -o -name *.c -o -name *.cpp`"; \
echo "++++ $$modfiles"; \
if [ -n "$$modfiles" ]; then cp $$modfiles $(DISTDIR)/src/$(PROJECT)/mod/$$mod/; fi\
done ;\
set -e; for dir in $(SHARED_INCLUDE); do \
mod=shared_`basename $$dir` ;\
make -C $$dir clean ;\
mkdir -p $(DISTDIR)/src/$(PROJECT)/mod/$$mod ;\
modfiles="`find $$dir -maxdepth 1 -name '*.h' -o -name '*.c' -o -name '*.cpp' -o -name '*.sh'`"; \
echo "++++ $$modfiles"; \
if [ -n "$$modfiles" ]; then cp $$modfiles $(DISTDIR)/src/$(PROJECT)/mod/$$mod/; fi ;\
if [ -f "$$dir/Makefile" ]; then \
$(SED) $$dir/Makefile -e "s/^TOPDIR\ *=.*/TOPDIR = \.\.\/\.\./g" > $(DISTDIR)/src/$(PROJECT)/mod/$$mod/Makefile ;\
fi; \
done ;\
cp $(MODDIR)/Makefile $(DISTDIR)/src/$(PROJECT)/mod/
cd $(DISTDIR)/src; zip -r $(notdir $@) $(PROJECT)
mv $(DISTDIR)/src/$(notdir $@) $@