From 5e7cff6951ed570eb44e02de9d1416f5531c7183 Mon Sep 17 00:00:00 2001 From: Niko Liikanen Date: Thu, 24 Aug 2006 16:03:49 +0000 Subject: [PATCH] Win32 tweaks --- Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3aa165b..295b315 100644 --- 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 -- 2.43.0