From: Niko Liikanen Date: Mon, 4 Sep 2006 11:04:46 +0000 (+0000) Subject: Updated Makefile X-Git-Tag: fs-1.0~18 X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=commitdiff_plain;h=5314a18c66589de5004bf925d22330a5cdad85a0 Updated Makefile --- diff --git a/Makefile b/Makefile index c316117..1424119 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,31 @@ -LIBRARY = path -LIBFILE = libmsppath +NAME = path -TMP = $(HOME)/nightwatch/tmp -TGT = $(HOME)/nightwatch +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 +CFLAGS = $(DEBUG) $(INCLUDE) -pipe -Wall CXXFLAGS = $(CFLAGS) -MAKEFLAGS += -s --no-print-directory PIC = -fPIC SHARED = .so STATIC = .a SRC = source -LIBOBJS = $(addprefix $(TMP)/, $(addsuffix .o, $(notdir $(basename $(wildcard $(SRC)/*.cpp))))) +OBJS = $(addprefix $(TMP)/, $(addsuffix .o, $(notdir $(basename $(wildcard $(SRC)/*.cpp))))) -pkgincludedir = include/msp/$(LIBRARY) +pkgincludedir = include/msp/$(NAME) libdir = lib .PHONY: all @@ -34,12 +36,12 @@ $(TMP): mkdir -p $@ # Dynamic library -$(TMP)/$(LIBFILE)$(SHARED): $(LIBOBJS) +$(TMP)/$(LIBFILE)$(SHARED): $(OBJS) echo "Compiling $(notdir $@)" $(CXX) $^ -shared -o $@ $(LIB) # Static library -$(TMP)/$(LIBFILE)$(STATIC): $(LIBOBJS) +$(TMP)/$(LIBFILE)$(STATIC): $(OBJS) echo "Compiling $(notdir $@)" $(AR) rcs $@ $^ @@ -53,12 +55,12 @@ $(TMP)/$(pkgincludedir): # Library object file $(TMP)/%.o: $(SRC)/%.cpp $(wildcard $(SRC)/*.h) - echo "Compiling $(LIBRARY)/$(notdir $(basename $@))" + echo "Compiling $(NAME)/$(notdir $(basename $@))" $(CXX) $(PIC) $(CXXFLAGS) -c $< -o $@ # Installs .PHONY: install -install: install_lib +install: install_lib $(TGT)/$(pkgincludedir): mkdir -p $@ @@ -68,7 +70,7 @@ $(TGT)/$(libdir): .PHONY: install_headers install_headers: $(TGT)/$(pkgincludedir) - echo "Installing $(LIBRARY) headers to $<" + echo "Installing $(NAME) headers to $<" $(CP) $(SRC)/*.h $< .PHONY: install_lib