1
2
3
4
5
6
7
8
9
10
11
|
#
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
# 2017
# Jonathan Schleifer <js@heap.zone>
#
# https://heap.zone/git/?p=buildsys.git
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice is present in all copies.
#
|
|
|
|
1
2
3
4
5
6
7
8
9
10
11
|
#
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016,
# 2017, 2018
# Jonathan Schleifer <js@heap.zone>
#
# https://heap.zone/git/?p=buildsys.git
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice is present in all copies.
#
|
︙ | | | ︙ | |
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
INSTALL = @INSTALL@
SHELL = @SHELL@
MSGFMT = @MSGFMT@
JAVAC = @JAVAC@
JAVACFLAGS = @JAVACFLAGS@
JAR = @JAR@
WINDRES = @WINDRES@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
plugindir ?= ${libdir}/${PACKAGE_NAME}
datarootdir = @datarootdir@
datadir = @datadir@
includedir = @includedir@
includesubdir ?= ${PACKAGE_NAME}
localedir = @localedir@
localename ?= ${PACKAGE_NAME}
mandir = @mandir@
mansubdir ?= man1
OBJS1 = ${SRCS:.c=.o}
OBJS2 = ${OBJS1:.cc=.o}
|
>
>
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
INSTALL = @INSTALL@
SHELL = @SHELL@
MSGFMT = @MSGFMT@
JAVAC = @JAVAC@
JAVACFLAGS = @JAVACFLAGS@
JAR = @JAR@
WINDRES = @WINDRES@
BUILD_AND_HOST_ARE_DARWIN = @BUILD_AND_HOST_ARE_DARWIN@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
plugindir ?= ${libdir}/${PACKAGE_NAME}
datarootdir = @datarootdir@
datadir = @datadir@
includedir = @includedir@
includesubdir ?= ${PACKAGE_NAME}
INSTALL_INCLUDES ?= yes
localedir = @localedir@
localename ?= ${PACKAGE_NAME}
mandir = @mandir@
mansubdir ?= man1
OBJS1 = ${SRCS:.c=.o}
OBJS2 = ${OBJS1:.cc=.o}
|
︙ | | | ︙ | |
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
.SUFFIXES: .beam .c .c.dep .cc .cc.dep .class .cxx .cxx.dep .d .erl .lib.o .java .mo .m .m.dep .mm .mm.dep .moslib.o .o .plugin.o .po .py .pyc .rc .S .S.dep .xpm
.PHONY: all subdirs subdirs-after pre-depend depend install install-includes install-extra uninstall uninstall-extra clean distclean locales ${SUBDIRS} ${SUBDIRS_AFTER}
all:
${MAKE} pre-all
${MAKE} subdirs
${MAKE} depend
${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${MORPHOS_LIB} ${MORPHOS_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales
${MAKE} subdirs-after
${MAKE} post-all
pre-all post-all:
subdirs: ${SUBDIRS}
subdirs-after: ${SUBDIRS_AFTER}
|
|
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
.SUFFIXES: .beam .c .c.dep .cc .cc.dep .class .cxx .cxx.dep .d .erl .lib.o .java .mo .m .m.dep .mm .mm.dep .moslib.o .o .plugin.o .po .py .pyc .rc .S .S.dep .xpm
.PHONY: all subdirs subdirs-after pre-depend depend install install-includes install-extra uninstall uninstall-extra clean distclean locales ${SUBDIRS} ${SUBDIRS_AFTER}
all:
${MAKE} pre-all
${MAKE} subdirs
${MAKE} depend
${MAKE} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST} ${SHARED_LIB} ${SHARED_LIB_NOINST} ${FRAMEWORK} ${FRAMEWORK_NOINST} ${MORPHOS_LIB} ${MORPHOS_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} ${JARFILE} locales
${MAKE} subdirs-after
${MAKE} post-all
pre-all post-all:
subdirs: ${SUBDIRS}
subdirs-after: ${SUBDIRS_AFTER}
|
︙ | | | ︙ | |
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
out="$@"; \
if ${LD} -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${LIB_LDFLAGS} ${LIB_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi
${FRAMEWORK}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
rm -fr $@
${MKDIR_P} $@
${MAKE} INSTALL_INCLUDES_IF_SUBDIR=${includesubdir} INSTALL_INCLUDES_DESTINATION=$$PWD/$@/Headers install-includes
if test -f Info.plist; then \
i=Info.plist; \
${INSTALL_STATUS}; \
if ${INSTALL} -m 644 $$i $@/$$i; then \
|
|
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
out="$@"; \
if ${LD} -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA} ${LIB_LDFLAGS} ${LIB_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi
${FRAMEWORK} ${FRAMEWORK_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
rm -fr $@
${MKDIR_P} $@
${MAKE} INSTALL_INCLUDES_IF_SUBDIR=${includesubdir} INSTALL_INCLUDES_DESTINATION=$$PWD/$@/Headers install-includes
if test -f Info.plist; then \
i=Info.plist; \
${INSTALL_STATUS}; \
if ${INSTALL} -m 644 $$i $@/$$i; then \
|
︙ | | | ︙ | |
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
|
else \
${LINK_FAILED}; \
fi
${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
out="$@"; \
objs=""; \
ars=""; \
for i in ${OBJS} ${OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
out="$@"; \
objs=""; \
ars=""; \
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done
locales: ${MO_FILES}
.c.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
|
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>
|
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
|
else \
${LINK_FAILED}; \
fi
${STATIC_LIB} ${STATIC_LIB_NOINST}: ${EXT_DEPS} ${OBJS} ${OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
if test x"${BUILD_AND_HOST_ARE_DARWIN}" = x"yes"; then \
if /usr/bin/libtool -static -o $@ ${OBJS} ${OBJS_EXTRA}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
else \
out="$@"; \
objs=""; \
ars=""; \
for i in ${OBJS} ${OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done; \
fi
${STATIC_PIC_LIB} ${STATIC_PIC_LIB_NOINST}: ${EXT_DEPS} ${LIB_OBJS} ${LIB_OBJS_EXTRA}
${LINK_STATUS}
rm -f $@
if test x"${BUILD_AND_HOST_ARE_DARWIN}" = x"yes"; then \
if /usr/bin/libtool -static -o $@ ${LIB_OBJS} ${LIB_OBJS_EXTRA}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
else \
out="$@"; \
objs=""; \
ars=""; \
for i in ${LIB_OBJS} ${LIB_OBJS_EXTRA}; do \
case $$i in \
*.a) \
ars="$$ars $$i" \
;; \
*.o) \
objs="$$objs $$i" \
;; \
esac \
done; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
mkdir -p $$dir; \
cd $$dir; \
${AR} x ../$$i; \
for j in *.o; do \
objs="$$objs $$dir/$$j"; \
done; \
cd ..; \
done; \
if ${AR} cr $@ $$objs && ${RANLIB} $@; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
rm -f $@; \
fi; \
for i in $$ars; do \
dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
rm -fr $$dir; \
done; \
fi
locales: ${MO_FILES}
.c.o:
${COMPILE_STATUS}
in="$<"; \
out="$@"; \
|
︙ | | | ︙ | |
671
672
673
674
675
676
677
678
679
680
681
682
683
684
|
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${libdir} ${INSTALL_LIB}; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
${INSTALL_OK}; \
else \
|
>
>
>
>
>
>
>
>
>
>
>
|
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
|
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${libdir} ${INSTALL_LIB}; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${FRAMEWORK}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; \
if ${MKDIR_P} ${DESTDIR}${prefix}/Library/Frameworks && cp -R $$i ${DESTDIR}${prefix}/Library/Frameworks/; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \
${INSTALL_OK}; \
else \
|
︙ | | | ︙ | |
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
|
if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${INCLUDES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
for i in "" ${MO_FILES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES && ${INSTALL} -m 644 $$i ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
${INSTALL_OK}; \
else \
|
>
|
|
|
|
|
|
|
|
|
>
|
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
|
if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done
if test x"${INSTALL_INCLUDES}" = x"yes"; then \
for i in "" ${INCLUDES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${includedir}/${includesubdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${includedir}/${includesubdir}/$$i; then \
${INSTALL_OK}; \
else \
${INSTALL_FAILED}; \
fi \
done \
fi
for i in "" ${MO_FILES}; do \
test x"$$i" = x"" && continue; \
${INSTALL_STATUS}; \
if ${MKDIR_P} ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES && ${INSTALL} -m 644 $$i ${DESTDIR}${localedir}/$${i%.mo}/LC_MESSAGES/${localename}.mo; then \
${INSTALL_OK}; \
else \
|
︙ | | | ︙ | |
789
790
791
792
793
794
795
796
797
798
799
800
801
802
|
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi; \
done
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${libdir}/$$i; then \
if rm -f ${DESTDIR}${libdir}/$$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
|
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi; \
done
for i in "" ${FRAMEWORK}; do \
test x"$$i" = x"" && continue; \
if test -d ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
if rm -fr ${DESTDIR}${prefix}/Library/Frameworks/$$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
fi \
fi \
done
-rmdir ${DESTDIR}${prefix}/Library/Frameworks >/dev/null 2>&1
-rmdir ${DESTDIR}${prefix}/Library >/dev/null 2>&1
for i in "" ${STATIC_LIB} ${STATIC_PIC_LIB}; do \
test x"$$i" = x"" && continue; \
if test -f ${DESTDIR}${libdir}/$$i; then \
if rm -f ${DESTDIR}${libdir}/$$i; then \
${DELETE_OK}; \
else \
${DELETE_FAILED}; \
|
︙ | | | ︙ | |