forked from libxmp/libxmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.lite
53 lines (42 loc) · 1.63 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
AUTOCONF = autoconf
DIST = libxmp-lite-stagedir
DFILES = INSTALL install-sh config.sub config.guess aclocal.m4 autogen.sh libxmp.map \
lite/README lite/configure.ac lite/Makefile.in lite/libxmp-lite.pc.in \
lite/Makefile.vc.in 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 jni/Application.mk $(DIST)/jni/Application.mk
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