DEBUGFLAGS=-g -DDEBUG\r
endif\r
\r
+ifeq (Darwin,$(shell uname -s))\r
+link=static\r
+else\r
+link=both\r
+endif\r
+\r
+targets_both = staticlib sharedlib\r
+targets_shared = sharedlib\r
+targets_static = staticlib\r
+\r
SRC_DIR=$(CWD)/../../src/\r
INCLUDE_DIR=$(CWD)/../../matroska\r
MUX_SRC_DIR=$(CWD)/../../test/mux/\r
LINKFLAGS=-L. -L$(LIBEBML_LIB_DIR) $(LDFLAGS)\r
DEPENDFLAGS = $(CXXFLAGS) $(INCLUDE)\r
\r
-ifeq (Darwin,$(shell uname -s))\r
-all: staticlib\r
-else\r
-all: staticlib sharedlib\r
-endif\r
+all: $(targets_$(link))\r
\r
staticlib: $(LIBRARY)\r
\r
test9.o: $(TAG_SRC_DIR)test9.cpp\r
$(CXX) -c $(COMPILEFLAGS) -o $@ $<\r
\r
-ifeq (Darwin,$(shell uname -s))\r
-install: install_staticlib install_headers\r
-else\r
-install: install_staticlib install_sharedlib install_headers\r
-endif\r
+install: $(targets_$(link):%=install_%) install_headers \r
\r
install_headers:\r
$(INSTALL) $(INSTALL_DIR_OPTS) -d $(includedir)\r