138 lines
4.4 KiB
Makefile
Executable File
138 lines
4.4 KiB
Makefile
Executable File
#######################################################################
|
|
#
|
|
# 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 =
|
|
DIST_SUBDIRS =
|
|
|
|
EXTRA_DIST = *.exp
|
|
|
|
CASAROOT = ../../..
|
|
|
|
CASALIBDIR = $(CASAROOT)/lib
|
|
|
|
BUILD_VER = 1.1.1
|
|
|
|
# handle Mono secondary dependencies
|
|
export MONO_PATH := $(MONO_PATH)
|
|
|
|
PLATFORMINDEPENDENTSOURCEDIR = ..
|
|
PLATFORMDEPENDENTSOURCEDIR = .
|
|
|
|
MODULE_NAME = jmicasa
|
|
MODULE_EXT = dll
|
|
|
|
CFILES = jmicasa.c
|
|
|
|
CSFILES_CSC :=
|
|
#INCLUDES = -I. -I.. -I$(CASAROOT)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux \
|
|
# -I/opt/gnome/include/gnome-keyring-1
|
|
INCLUDES = -I. -I.. -I$(CASAROOT)/include -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/win32 \
|
|
RESOURCES =
|
|
DEFINES =
|
|
CFLAGS += $(INCLUDES) $(DEFINES)
|
|
|
|
#LIBS = /LIBPATH:"$(MSC)\lib" /LIBPATH:"$(MSCS)\lib" /LIBPATH:"$(CASAROOT)/lib/Release"
|
|
LIBS = /LIBPATH:"$(MSC)\lib" /LIBPATH:"$(MSC)\PlatformSDK\lib" /LIBPATH:"$(CASAROOT)/lib/Release"
|
|
LDFLAGS = /VERSION:1.1.1 /MACHINE:IX86 \
|
|
/dll
|
|
|
|
#LIBS = -lpthread -ldl
|
|
#LDFLAGS = -Wl,-Bsymbolic -shared -Wl,--version-script=jmicasa_lux.exp \
|
|
-L$(CASALIBDIR)/$(TARGET_CFG) -lmicasa -Wl,-soname -Wl,libjmicasa.so.1
|
|
|
|
OBJDIR = ./$(TARGET_CFG)/lib
|
|
|
|
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
|
|
|
|
CUR_DIR := $(shell pwd)
|
|
|
|
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
|
|
|
|
#
|
|
# Pattern based rules.
|
|
#
|
|
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
|
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
|
|
|
|
$(OBJDIR)/%.o: %.c
|
|
$(CC) -c $(CFLAGS) -Fo$@ $<
|
|
|
|
$(OBJDIR)/%.o: %.cpp
|
|
$(CC) -c $(CFLAGS) -o $@ $<
|
|
|
|
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
|
|
@echo [======== Linking $@ ========]
|
|
$(LINK) $(LIBS) $(LDFLAGS) /OUT:$@ $(OBJS) kernel32.lib ole32.lib micasa.lib
|
|
|
|
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
|
|
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).lib
|
|
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)
|
|
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASABINDIR)/$(TARGET_CFG)
|
|
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASALIBDIR)/$(TARGET_CFG)
|
|
cp -f $(OBJDIR)/$(MODULE_NAME).lib $(CASABINDIR)$(TARGET_CFG)
|
|
|
|
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(OBJS)
|
|
# @echo [======== Linking $@ ========]
|
|
# $(LINK) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
|
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
|
|
|
|
|
|
#$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER): $(OBJDIR) $(OBJS)
|
|
# @echo [======== Linking $@ ========]
|
|
# cc -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
|
|
# cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
|
|
|
|
$(OBJDIR):
|
|
[ -d $(OBJDIR) ] || mkdir -p $(OBJDIR)
|
|
[ -d $(CASALIBDIR) ] || mkdir -p $(CASALIBDIR)
|
|
[ -d $(CASABINDIR) ] || mkdir -p $(CASABINDIR)
|
|
[ -d $(CASALIBDIR)/$(TARGET_CFG) ] || mkdir -p $(CASALIBDIR)/$(TARGET_CFG)
|
|
[ -d $(CASABINDIR)/$(TARGET_CFG) ] || mkdir -p $(CASABINDIR)/$(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)
|
|
|
|
#installcheck-local: install
|
|
# $(mkinstalldirs) $(DESTDIR)$(libdir)
|
|
# $(INSTALL_PROGRAM) $(DESTDIR)$(libdir)
|
|
# cd $(DESTDIR)$(libdir); $(MONO)
|
|
|
|
clean-local:
|
|
if [ -d $(TARGET_CFG) ]; then rm -rf $(TARGET_CFG); fi
|
|
|
|
distclean-local:
|
|
|
|
maintainer-clean-local:
|
|
rm -f Makefile.in
|
|
|