mirror of
https://github.com/OldUnreal/libxmp.git
synced 2026-04-02 21:37:43 -07:00
For lazily enabling debug mode by editing the generated makefile. Also ship the autogen.sh script in generated release tarball.
59 lines
1.7 KiB
Makefile
59 lines
1.7 KiB
Makefile
|
|
DIST = libxmp-lite-stagedir
|
|
DFILES = lite/README INSTALL install-sh configure configure.ac \
|
|
config.sub config.guess Makefile.in lite/libxmp-lite.pc.in \
|
|
libxmp.map lite/Makefile.vc.in lite/Makefile.os2 lite/Makefile.w32 \
|
|
lite/watcom.mif.in aclocal.m4 autogen.sh
|
|
DDIRS = src loaders test cmake m4
|
|
|
|
all: dist
|
|
|
|
include lite/src/Makefile
|
|
include lite/src/loaders/Makefile
|
|
include cmake/Makefile
|
|
include m4/Makefile
|
|
include test/Makefile
|
|
|
|
dist: dist-prepare dist-subdirs cmake-prepare vc-prepare watcom-prepare dist-dist check-no-it
|
|
mv $(DIST)/libxmp-lite-*.tar.gz .
|
|
ls -l libxmp-lite-*.tar.gz
|
|
|
|
dist-prepare:
|
|
rm -Rf $(DIST)
|
|
mkdir -p $(DIST)
|
|
cp -RPp $(DFILES) $(DIST)/
|
|
|
|
space = $(eval) $(eval)
|
|
cmake-prepare:
|
|
@echo Generate cmake/libxmp-sources.cmake
|
|
@sed -e 's!@SRCS@!\n$(subst $(space), , $(OBJS:.o=.c\n))!' $(DIST)/cmake/libxmp-sources.cmake.in > $(DIST)/cmake/libxmp-sources.cmake
|
|
|
|
vc-prepare:
|
|
@echo Generate Makefile.vc
|
|
@sed -e 's!@OBJS@!$(subst /,\\,$(OBJS:.o=.obj))!' $(DIST)/Makefile.vc.in > $(DIST)/Makefile.vc
|
|
|
|
watcom-prepare:
|
|
@echo Generate watcom.mif
|
|
@sed -e 's!@OBJS@!$(OBJS:.o=.obj)!' $(DIST)/watcom.mif.in > $(DIST)/watcom.mif
|
|
|
|
dist-subdirs: dist-makefile $(addprefix dist-,$(DDIRS))
|
|
(cd lite; tar cf - .) | (cd $(DIST); tar xf -)
|
|
mkdir -p $(DIST)/include/libxmp-lite
|
|
cp include/xmp.h $(DIST)/include/libxmp-lite/
|
|
mkdir -p $(DIST)/jni
|
|
cp jni/Application.mk $(DIST)/jni/Application.mk
|
|
cp lite/CMakeLists.txt $(DIST)/CMakeLists.txt
|
|
|
|
dist-makefile:
|
|
head -3 Makefile.in > lite/Makefile.in
|
|
cat lite/Makefile.in.in >> lite/Makefile.in
|
|
|
|
dist-dist:
|
|
(cd $(DIST); autoconf; ./configure)
|
|
$(MAKE) -C $(DIST) dist distcheck || false
|
|
|
|
check-no-it:
|
|
(cd $(DIST); autoconf; ./configure --disable-it)
|
|
$(MAKE) -C $(DIST) || false
|
|
|