Skip to content

Commit

Permalink
Makefiles: split external build from Praat-itself
Browse files Browse the repository at this point in the history
This introduces intermediate targets all-external and clean-external
that deal with the bundled external packages, and also all-self and
clean-self that deal with the Praat sources themselves.

This is inspired by praat#1238, and makes it slightly easier to
build externals while ignoring warnings, and then building
Praat itself while paying attention to warnings.
  • Loading branch information
adriaandegroot committed Nov 13, 2020
1 parent c77fa20 commit cb73cce
Showing 1 changed file with 24 additions and 16 deletions.
40 changes: 24 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,31 @@ include makefile.defs
.PHONY: all clean install

# Makes the Praat executable in the source directory.
all:
all: all-external all-self
$(LINK) -o $(EXECUTABLE) main/main_Praat.o $(MAIN_ICON) fon/libfon.a \
artsynth/libartsynth.a FFNet/libFFNet.a \
gram/libgram.a EEG/libEEG.a \
LPC/libLPC.a dwtools/libdwtools.a \
fon/libfon.a stat/libstat.a dwsys/libdwsys.a \
sys/libsys.a melder/libmelder.a kar/libkar.a \
external/espeak/libespeak.a \
external/portaudio/libportaudio.a \
external/flac/libflac.a external/mp3/libmp3.a \
external/glpk/libglpk.a \
external/clapack/libclapack.a \
external/gsl/libgsl.a \
$(LIBS)

all-external:
$(MAKE) -C external/clapack
$(MAKE) -C external/gsl
$(MAKE) -C external/glpk
$(MAKE) -C external/mp3
$(MAKE) -C external/flac
$(MAKE) -C external/portaudio
$(MAKE) -C external/espeak

all-self:
$(MAKE) -C kar
$(MAKE) -C melder
$(MAKE) -C sys
Expand All @@ -33,28 +50,20 @@ all:
$(MAKE) -C FFNet
$(MAKE) -C artsynth
$(MAKE) -C main main_Praat.o $(ICON)
$(LINK) -o $(EXECUTABLE) main/main_Praat.o $(MAIN_ICON) fon/libfon.a \
artsynth/libartsynth.a FFNet/libFFNet.a \
gram/libgram.a EEG/libEEG.a \
LPC/libLPC.a dwtools/libdwtools.a \
fon/libfon.a stat/libstat.a dwsys/libdwsys.a \
sys/libsys.a melder/libmelder.a kar/libkar.a \
external/espeak/libespeak.a \
external/portaudio/libportaudio.a \
external/flac/libflac.a external/mp3/libmp3.a \
external/glpk/libglpk.a \
external/clapack/libclapack.a \
external/gsl/libgsl.a \
$(LIBS)

clean:
clean: clean-external clean-self
$(RM) praat

clean-external:
$(MAKE) -C external/clapack clean
$(MAKE) -C external/gsl clean
$(MAKE) -C external/glpk clean
$(MAKE) -C external/mp3 clean
$(MAKE) -C external/flac clean
$(MAKE) -C external/portaudio clean
$(MAKE) -C external/espeak clean

clean-self:
$(MAKE) -C kar clean
$(MAKE) -C melder clean
$(MAKE) -C sys clean
Expand All @@ -68,7 +77,6 @@ clean:
$(MAKE) -C FFNet clean
$(MAKE) -C artsynth clean
$(MAKE) -C main clean
$(RM) praat

install:
$(INSTALL)

0 comments on commit cb73cce

Please sign in to comment.