From: Niko Liikanen Date: Mon, 4 Sep 2006 11:03:10 +0000 (+0000) Subject: New Makefile to work with subdirs (For Win32 build) X-Git-Tag: 1.0~39 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=532e493717b0b569e6997c1b55c573ecaa421894;p=libs%2Fcore.git New Makefile to work with subdirs (For Win32 build) --- diff --git a/Makefile b/Makefile index 9fe2580..a443052 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,39 @@ -LIBRARY = framework -LIBFILE = libmspframework +NAME = core -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 `pkg-config --cflags sigc++-2.0` +CFLAGS = $(DEBUG) $(INCLUDE) -pipe -Wall CXXFLAGS = $(CFLAGS) -LIBLDFLAGS = `pkg-config --libs sigc++-2.0` -MAKEFLAGS += -s --no-print-directory 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 -LIBOBJS = $(addprefix $(TMP)/, $(addsuffix .o, $(notdir $(basename $(wildcard $(SRC)/*.cpp))))) +SUBDIRS = core time +OBJS = $(foreach SUBDIR, $(SUBDIRS), $(addprefix $(TMP)/$(SUBDIR)/, $(addsuffix .o, $(notdir $(basename $(wildcard $(SRC)/$(SUBDIR)/*.cpp)))))) -pkgincludedir = include/msp/$(LIBRARY) +pkgincludedir = include/msp libdir = lib +foo = "echo $