]> git.tdb.fi Git - libs/datafile.git/commitdiff
Updated Makefile
authorNiko Liikanen <cloud@neo-midgar.com>
Mon, 4 Sep 2006 11:04:25 +0000 (11:04 +0000)
committerNiko Liikanen <cloud@neo-midgar.com>
Mon, 4 Sep 2006 11:04:25 +0000 (11:04 +0000)
Makefile

index 5109b2be70a23349ab08ce3ad9f35b5b61599085..24322e9d306c3a8c7cb6896a5f553ecefab4ae6b 100644 (file)
--- 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