#/*----------------------------------------------------------------------------- # * Copyright (c) 1997-2009 Mark Hummel DBA Raquette Software. # * All rights reserved # * # * This file contains source code written by Raquette Software, # * 68 Stewart Street, Franklin MA 02038. It may not be used without # * express written permission. The expression of the information # * contained herein is protected under federal copyright laws and # * all copying without permission is prohibited and may be subject # * to criminal penalties. The Author assumes no responsibility for # * errors, omissions, or damages caused by the use of these programs # * or from use of the information contained herein. # * # *----------------------------------------------------------------------------- # */ # # Extract installation flags and paths for vrq # VRQ_VERSION = $(shell vrq --version|head -n 1|cut -c 5-|cut -d , -f1) PLUGIN_DIR = $(shell vrq --pkglibdir) INCLUDE_DIR = $(shell vrq --includedir) CXXFLAGS = $(shell vrq --cflags) LDFLAGS = $(shell vrq --ldflags) # # name of plugin # PLUGIN=example1 # # Build object file # all: $(PLUGIN).so $(PLUGIN).o: $(PLUGIN).cc $(PLUGIN).h $(CXX) -I . -I $(INCLUDE_DIR) $(CXXFLAGS) \ -DVRQ_VERSION=\"$(VRQ_VERSION)\" -c $< -fPIC -DPIC -o $@ # # Build DLL # $(PLUGIN).so: $(PLUGIN).o $(CXX) $(LDFLAGS) -shared $< -Wl,-soname -Wl,$@ -o $@ # # Install plugin # install: $(PLUGIN).so install -c '$<' $(PLUGIN_DIR) # # Print installation flags and paths # env: echo "VRQ_VERSION: $(VRQ_VERSION)" echo "PLUGIN_DIR: $(PLUGIN_DIR)" echo "INCLUDE_DIR: $(INCLUDE_DIR)" echo "CXXFLAGS: $(CXXFLAGS)" echo "LDFLAGS: $(LDFLAGS)" # # remove built files # clean: -rm $(PLUGIN).o $(PLUGIN).so