]> git.tdb.fi Git - libs/datafile.git/commitdiff
Win32 tweaks
authorNiko Liikanen <cloud@neo-midgar.com>
Thu, 24 Aug 2006 16:03:49 +0000 (16:03 +0000)
committerNiko Liikanen <cloud@neo-midgar.com>
Thu, 24 Aug 2006 16:03:49 +0000 (16:03 +0000)
Makefile

index 3aa165b5bf8615a59582a397181150218ede944c..295b31576b9699b1e95bd7b89eb66dd6aa91a237 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,11 +5,17 @@ CXX           = g++
 CC             = gcc
 AR             = ar
 CP             = cp
+
 INCLUDE                = -Isource -I$(TMP)/include
 LIB            = -L$(TMP)
 DEBUG          = 
 CFLAGS         = $(DEBUG) $(INCLUDE) -pipe -Wall `pkg-config --cflags sigc++-2.0` `sdl-config --cflags`
 CXXFLAGS       = $(CFLAGS)
+MAKEFLAGS      += -s --no-print-directory
+
+PIC            = -fPIC
+SHARED         = .so
+STATIC         = .a
 
 LIBRARY                = parser
 LIBFILE                = libmspparser
@@ -20,19 +26,19 @@ pkgincludedir       = include/msp/$(LIBRARY)
 libdir         = lib
 
 .PHONY: all
-all: $(TMP) $(TMP)/$(LIBFILE).so $(TMP)/$(LIBFILE).a tmpheaders
+all: $(TMP) $(TMP)/$(LIBFILE)$(SHARED) $(TMP)/$(LIBFILE)$(STATIC) tmpheaders
 
 # Create temp directory
 $(TMP):
        mkdir -p $@
 
 # Dynamic library
-$(TMP)/$(LIBFILE).so: $(LIBOBJS)
+$(TMP)/$(LIBFILE)$(SHARED): $(LIBOBJS)
        echo "Compiling $(notdir $@)"
-       $(CXX) $^ -shared -o $@ $(LIB) $(LIBRARYLIBS)
+       $(CXX) $^ -shared -o $@ $(LIB)
 
 # Static library
-$(TMP)/$(LIBFILE).a: $(LIBOBJS)
+$(TMP)/$(LIBFILE)$(STATIC): $(LIBOBJS)
        echo "Compiling $(notdir $@)"
        $(AR) rcs $@ $^
 
@@ -47,7 +53,7 @@ $(TMP)/$(pkgincludedir):
 # Library object file
 $(TMP)/%.o: $(SRC)/%.cpp $(wildcard $(SRC)/*.h)
        echo "Compiling $(LIBRARY)/$(notdir $(basename $@))"
-       $(CXX) -fPIC $(CXXFLAGS) -c $< -o $@
+       $(CXX) $(PIC) $(CXXFLAGS) -c $< -o $@
 
 # Installs
 .PHONY: install