From: Niko Liikanen Date: Mon, 4 Sep 2006 11:04:25 +0000 (+0000) Subject: Updated Makefile X-Git-Tag: 1.0~34 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=3f34bdc7e83d7084aa56f8c2c07600520262cbf3;p=libs%2Fdatafile.git Updated Makefile --- diff --git a/Makefile b/Makefile index 5109b2b..24322e9 100644 --- a/Makefile +++ b/Makefile @@ -1,28 +1,31 @@ -TMP = $(HOME)/nightwatch/tmp -TGT = $(HOME)/nightwatch +NAME = parser + +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` `sdl-config --cflags` +CFLAGS = $(DEBUG) $(INCLUDE) -pipe -Wall CXXFLAGS = $(CFLAGS) -MAKEFLAGS += -s --no-print-directory PIC = -fPIC SHARED = .so STATIC = .a -LIBRARY = parser -LIBFILE = libmspparser 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 @@ -33,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 $@ $^ @@ -52,7 +55,7 @@ $(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 @@ -67,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