####################################################################### # # Copyright (C) 2006 Novell, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public # License along with this program; if not, write to the Free # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # ####################################################################### if DEBUG TARGET_CFG = Debug CFLAGS += -v -w else TARGET_CFG = Release endif SUBDIRS = package DIST_SUBDIRS = package EXTRA_DIST = $(CXXFILES) $(CXX_MOC_FILES) *.h *.sh CASAROOT = . CASALIBDIR = $(LIB) BUILD_VER = 1.1.1 # handle Mono secondary dependencies export MONO_PATH := $(MONO_PATH) PLATFORMINDEPENDENTSOURCEDIR = PLATFORMDEPENDENTSOURCEDIR = . ####this needs to be defined in configure.in MOC = /usr/lib/qt3/bin/moc CXX = g++ MODULE_NAME =libcasakwallet MODULE_EXT =so CXXFILES = $(srcdir)/casakwallet.cpp CXX_MOC_FILES = casakwallet.moc CXXFILES_CXX := INCLUDES = -I. \ -I/opt/kde3/include -I/usr/lib/qt3/include -I/usr/X11R6/include -I/opt/gnome/include/gnome-keyring-1/ CXXFLAGS = $(CPP_LIBFLAG) $(INCLUDES) EXTRA_CXXFLAGS = -fPIC -DPIC -DSSCS_LINUX_PLAT_F -DQT_THREAD_SUPPORT -DQT_CLEAN_NANESPACE \ -DQT_NO_ASCII_CAS -O2 -fmessage-length=0 -Wall -g -D_REENTRANT \ -DALIGNMENT -DN_PLAT_UNIX -DUNIX -DLINUX -DIAPX386 CXX_RESOURCES = LIBS = -lpthread -ldl LDFLAGS = -fno-exception -fno-check-new -Wl,-Bsymbolic -shared -pthread -O2 \ -Wl,-soname -Wl,libcasakwallet.so.1 EXTRA_LDFLAGS = -L/opt/kde3/$(LIB) -lkwalletclient \ -lqt-mt -L/usr/X11R6/$(LIB) -L/usr/lib/qt3/$(LIB) -lqt-mt OBJDIR = ./$(TARGET_CFG)/$(LIB) OBJS = $(addprefix $(OBJDIR)/, $(CXXFILES:%.cpp=%.o)) CUR_DIR := $(shell pwd) all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) # # Pattern based rules. # vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR) vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR) $(CXX_MOC_FILES): casakwallet.h $(MOC) $^ -o $@ $(OBJDIR)/%.o: %.cpp c++ -c -g $(CXXFLAGS) $(EXTRA_CXXFLAGS) -o $@ $< $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER):$(CXX_MOC_FILES) $(OBJDIR) $(OBJS) @echo [======== Linking $@ ========] c++ -o $@ $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) $(LIBS) cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) ln -sf $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).1 $(OBJDIR): [ -d $(OBJDIR) ] || mkdir -p $(OBJDIR) [ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR) [ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG) install-exec-local: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(mkinstalldirs) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(DESTDIR)$(libdir)/ uninstall-local: cd $(DESTDIR)$(libdir); rm -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) rmdir $(DESTDIR)$(libdir) clean-local: if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi if [ -f $(CXX_MOC_FILES) ]; then rm -f $(CXX_MOC_FILES); fi rm -rf *.suo $(CASALIBDIR) rm -rf *.suo $(CASABINDIR) .PHONY: package package-clean package-install package-uninstall package package-clean package-install package-uninstall: $(MAKE) -C package $@ maintainer-clean-local: rm -f configure Makefile.in casa-*.tar.gz rm -f aclocal.m4 conf*.sh configure.lineno rm -f config.guess config.sub config.status rm -f ltmain.sh libtool rm -f install-sh install-sh.lnk INSTALL INSTALL.lnk rm -f missing missing.lnk mkinstalldirs mkinstalldir.lnk rm -rf autom4te.cache