forked from libxmp/libxmp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.lite
59 lines (48 loc) · 1.9 KB
/
Makefile.lite
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# THIS MAKEFILE IS FOR GENERATING LIBXMP-LITE DISTRIBUTION ARCHIVE
# THIS MAKEFILE IS **NOT** FOR BUILDING THE LIBXMP-LITE LIBRARY!!!
AUTOCONF = autoconf
DIST = libxmp-lite-stagedir
DFILES = INSTALL install-sh config.sub config.guess aclocal.m4 autogen.sh libxmp.map \
src/lite/libxmp-lite.pc.in src/lite/libxmp-lite-config.cmake \
src/lite/libxmp-lite-config.cmake.autotools \
src/lite/libxmp-lite-config-version.cmake.autotools.in \
lite/README lite/configure.ac \
lite/Makefile.in lite/Makefile.vc.in \
lite/Makefile.dos lite/Makefile.os2 \
lite/Makefile.w32 lite/watcom.mif.in
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: $(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 lite/CMakeLists.txt $(DIST)/CMakeLists.txt
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