+++ /dev/null
-NAME = core
-
-WORKDIR = $(PWD)/../..
-TMP = $(WORKDIR)/tmp/linux
-TGT = $(HOME)/local
-
-CXX = g++
-CC = gcc
-AR = ar
-CP = cp
-
-LIBFILE = libmsp$(NAME)
-
-MAKEFLAGS += -s --no-print-directory
-INCLUDE = -Isource -I$(TMP)/include
-LIB = -L$(TMP)
-DEBUG =
-CFLAGS = $(DEBUG) $(INCLUDE) -pipe -Wall
-CXXFLAGS = $(CFLAGS)
-
-PIC = -fPIC
-SHARED = .so
-STATIC = .a
-
-override CFLAGS += `pkg-config --cflags sigc++-2.0`
-override LDFLAGS += `pkg-config --libs sigc++-2.0`
-override CXXFLAGS += `pkg-config --cflags sigc++-2.0`
-
-SRC = source
-SUBDIRS = core time
-OBJS = $(foreach SUBDIR, $(SUBDIRS), $(addprefix $(TMP)/$(SUBDIR)/, $(addsuffix .o, $(notdir $(basename $(wildcard $(SRC)/$(SUBDIR)/*.cpp))))))
-
-pkgincludedir = include/msp
-libdir = lib
-
-foo = "echo $</$(SUBDIR); mkdir -p $</$(SUBDIR); $(CP) -r $(SRC)/$(SUBDIR)/*.h $</$(SUBDIR)"
-.PHONY: all
-all: $(TMP) $(TMP)/$(LIBFILE)$(SHARED) $(TMP)/$(LIBFILE)$(STATIC) tmpheaders
-
-# Create temp directory
-$(TMP):
- mkdir -p $@
-
-# Dynamic library
-$(TMP)/$(LIBFILE)$(SHARED): $(OBJS)
- echo "Compiling $(notdir $@)"
- $(CXX) $^ -shared -o $@ $(LIB) $(LDFLAGS)
-
-# Static library
-$(TMP)/$(LIBFILE)$(STATIC): $(OBJS)
- echo "Compiling $(notdir $@)"
- $(AR) rcs $@ $^
-
-# Copy headers to temp
-.PHONY: tmpheaders
-tmpheaders: $(TMP)/$(pkgincludedir)
- $(foreach SUBDIR, $(SUBDIRS), \
- mkdir -p $</$(SUBDIR) ; \
- $(CP) -R $(SRC)/$(SUBDIR)/*.h $</$(SUBDIR) ; \
- )
-# $(foreach SUBDIR, $(SUBDIRS), $(CP) -r $(SRC)/$(SUBDIR)/*.h $</$(SUBDIR))
-
-$(TMP)/$(pkgincludedir):
- mkdir -p $@
-
-# Library object file
-$(TMP)/%.o: $(SRC)/%.cpp $(wildcard $(SRC)/*.h)
- mkdir -p $(dir $@)
- echo "Compiling $(NAME)/$(notdir $(basename $@))"
- $(CXX) $(PIC) $(CXXFLAGS) -c $< -o $@
-
-# Installs
-.PHONY: install
-install: install_lib
-
-$(TGT)/$(pkgincludedir):
- mkdir -p $@
-
-$(TGT)/$(libdir):
- mkdir -p $@
-
-.PHONY: install_headers
-install_headers: $(TGT)/$(pkgincludedir)
- echo "Installing $(NAME) headers to $<"
- $(foreach SUBDIR, $(SUBDIRS), $(CP) $(SRC)/$(SUBDIR)/*.h $</$(SUBDIR))
-
-.PHONY: install_lib
-install_lib: $(TGT)/$(libdir) $(TMP)/$(LIBFILE)$(SHARED)
- echo "Installing dynamic library to $<"
- $(CP) $(TMP)/$(LIBFILE)$(SHARED) $<
-
-.PHONY: install_staticlib
-install_staticlib: $(TGT)/$(libdir) $(TMP)/$(LIBFILE)$(STATIC)
- echo "Installing static library to $<"
- $(CP) $(TMP)/$(LIBFILE)$(STATIC) $<