Browse Source

Makefile.am, clean.sh : Added '-lasound' to library build. Made cleaning process more standard.

master
kevin 4 years ago
parent
commit
4d5e88e766
2 changed files with 22 additions and 18 deletions
  1. 13
    10
      Makefile.am
  2. 9
    8
      build/clean.sh

+ 13
- 10
Makefile.am View File

111
 
111
 
112
 lib_LTLIBRARIES=
112
 lib_LTLIBRARIES=
113
 include_HEADERS=
113
 include_HEADERS=
114
-
114
+AM_LDFLAGS=
115
 
115
 
116
 AM_CPPFLAGS = -D _GNU_SOURCE  -I.. -I$(srcdir)/src  -I$(srcdir)/src/dsp  -I$(srcdir)/src/vop  -I$(srcdir)/src/app
116
 AM_CPPFLAGS = -D _GNU_SOURCE  -I.. -I$(srcdir)/src  -I$(srcdir)/src/dsp  -I$(srcdir)/src/vop  -I$(srcdir)/src/app
117
-AM_CFLAGS   = -Wno-multichar 
117
+AM_CFLAGS   = -Wall -Wno-multichar 
118
 AM_CXXFLAGS = 
118
 AM_CXXFLAGS = 
119
 
119
 
120
 # debug/release switches
120
 # debug/release switches
128
 
128
 
129
 # Linux specific compiler flags
129
 # Linux specific compiler flags
130
 if OS_LINUX
130
 if OS_LINUX
131
+  AM_LDFLAGS += -lasound  # why add this link flag? here's why: https://stackoverflow.com/questions/35480928/alsa-unexpected-results-when-called-from-shared-library
131
 if OS_64
132
 if OS_64
132
   AM_CFLAGS  += -m64
133
   AM_CFLAGS  += -m64
133
 endif	
134
 endif	
143
 include_HEADERS += $(cmHDR)
144
 include_HEADERS += $(cmHDR)
144
 lib_LTLIBRARIES += src/libcm.la
145
 lib_LTLIBRARIES += src/libcm.la
145
 
146
 
146
-
147
-# distclean-local sets the source tree back to it's minimal, pre-configure, state.
147
+# See: https://www.gnu.org/savannah-checkouts/gnu/automake/manual/html_node/Clean.html#Clean
148
+# 'distclean-local' is used by automake 'distclean' to perform customized local actions
149
+# ${exec_prefix} is the install prefix given to 'configure' by the user.
150
+# ${srcdir} is the directory of this Makefile and is set by autoconf.
148
 distclean-local:
151
 distclean-local:
149
 	rm -rf ${exec_prefix}/src        
152
 	rm -rf ${exec_prefix}/src        
150
-	rm -rf ${srcdir}/autom4te.cache
151
-	rm -rf ${srcdir}/build-aux
152
-	rm -f  ${srcdir}/m4/libtool.m4   ${srcdir}/m4/lt~obsolete.m4 ${srcdir}/m4/ltsugar.m4
153
-	rm -f  ${srcdir}/m4/ltversion.m4 ${srcdir}/m4/ltoptions.m4
154
-	rm -f  ${srcdir}/aclocal.m4      ${srcdir}/config.h.in ${srcdir}/config.h.in~
155
-	rm -f  ${srcdir}/Makefile.in     ${srcdir}/configure
153
+	rm -rf ${exec_prefix}/lib        
154
+	rm -rf ${exec_prefix}/include
155
+
156
+maintainer-clean-local:
157
+	${srcdir}/config.h.in~
158
+

+ 9
- 8
build/clean.sh View File

14
     
14
     
15
     rm -f  $1/bin/kc.app/Contents/MacOS/kc
15
     rm -f  $1/bin/kc.app/Contents/MacOS/kc
16
     
16
     
17
-    rm -rf $1/include
18
-    rm -rf $1/lib
19
-    rm -rf $1/bin
17
+    #rm -rf $1/include
18
+    #rm -rf $1/lib
19
+    #rm -rf $1/bin
20
     rm -rf $1/.deps
20
     rm -rf $1/.deps
21
     
21
     
22
 }
22
 }
30
 
30
 
31
 rm -rf osx/debug/a.out.dSYM
31
 rm -rf osx/debug/a.out.dSYM
32
 
32
 
33
-
34
-#rm -rf ../octave/results
35
-
36
-# remove all of emacs backup files (files ending width '~')
37
-# find ../ -name "*~" -exec rm {} \; 
33
+# delete everything created by 'autoreconf'.
34
+rm -rf ../build-aux
35
+rm -rf ../autom4te.cache
36
+rm -f  ../config.h.in ../config.h.in~ ../configure ../libtool.m4
37
+rm -f  ../Makefile.in ../aclocal.m4
38
+rm -f  ../m4/libtool.m4 ../m4/ltoptions.m4 ../m4/ltsugar.m4 ../m4/ltversion.m4 ../m4/lt~obsolete.m4
38
 
39
 
39
 
40
 
40
 
41
 

Loading…
Cancel
Save