Removed useless libraries, added the Makefile.depend.
authorFrancois Fleuret <francois@fleuret.org>
Wed, 27 Mar 2013 11:25:49 +0000 (12:25 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Wed, 27 Mar 2013 11:25:49 +0000 (12:25 +0100)
Makefile

index c8463c8..5ed1536 100644 (file)
--- a/Makefile
+++ b/Makefile
 # You should have received a copy of the GNU General Public License
 # along with selector.  If not, see <http://www.gnu.org/licenses/>.
 
-ifeq ($(STATIC),yes)
-  LDFLAGS=-static -lm -ljpeg -lpng -lz -lglpk
-else
-  LDFLAGS= -lm -ljpeg -lpng -lz -lglpk
-endif
+LDFLAGS= -lm -lglpk
 
 ifeq ($(DEBUG),yes)
   OPTIMIZE_FLAG = -ggdb3 -DDEBUG -fno-omit-frame-pointer
@@ -37,8 +33,6 @@ endif
 
 CXXFLAGS = -Wall $(OPTIMIZE_FLAG) $(PROFILE_FLAG) $(CXXGLPK)
 
-# LDFLAGS=-lglpk
-
 all: clueless-kmean
 
 clueless-kmean: \
@@ -48,5 +42,10 @@ clueless-kmean: \
        clueless-kmean.o
        $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
 
+Makefile.depend: *.h *.cc Makefile
+       $(CC) -M *.cc > Makefile.depend
+
 clean:
-       rm -f *.o clueless-kmean
+       rm -f *.o Makefile.depend clueless-kmean
+
+-include Makefile.depend