Update the trunk with autotools makefile changes

This commit is contained in:
soochoi
2006-03-09 21:17:47 +00:00
parent d7592ef237
commit 2cd093dcf6
61 changed files with 4224 additions and 0 deletions

34
c_jwrapper/Makefile.am Normal file
View File

@@ -0,0 +1,34 @@
#######################################################################
#
# 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.
#
#
#######################################################################
SUBDIRS = src jnsscs
DIST_SUBDIRS = src jnsscs
EXTRA_DIST = c_jwrapper*
.PHONY: package package-clean package-install package-uninstall
package package-clean package-install package-uninstall:
$(MAKE) -C $(TARGET_OS) $@
maintainer-clean-local:
rm -f Makefile.in

View File

@@ -0,0 +1,34 @@
#######################################################################
#
# 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.
#
#
#######################################################################
SUBDIRS = $(TARGET_OS)
DIST_SUBDIRS = linux
EXTRA_DIST = *.c jnsscs*
.PHONY: package package-clean package-install package-uninstall
package package-clean package-install package-uninstall:
$(MAKE) -C $(TARGET_OS) $@
maintainer-clean-local:
rm -f Makefile.in

View File

@@ -0,0 +1,125 @@
#######################################################################
#
# 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 = ../../..
if X86
CASALIBDIR = $(CASAROOT)/lib64
else
CASALIBDIR = $(CASAROOT)/lib
endif
BUILD_VER = 1.1.1
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR = ..
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME = libjmicasa
MODULE_EXT = so
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
RESOURCES =
DEFINES =
CFLAGS += $(INCLUDES) $(DEFINES)
LIBS = -lpthread -lc -ldl
LDFLAGS = -Wl,-Bsymbolic -shared -Wl,--version-script=jmicasa_lux.exp -Wl,-rpath -Wl,/usr/lib \
-L$(CASALIBDIR)/$(TARGET_CFG) -lmicasa -Wl,-soname -Wl,libjmicasa.so.1
if X86
OBJDIR = ./$(TARGET_CFG)/lib64
else
OBJDIR = ./$(TARGET_CFG)/lib
endif
OBJS = $(addprefix $(OBJDIR)/, $(CFILES:%.c=%.o))
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT).$(BUILD_VER)
#
# Pattern based rules.
#
vpath %.c $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
vpath %.cpp $(PLATFORMDEPENDENTSOURCEDIR) $(PLATFORMINDEPENDENTSOURCEDIR)
$(OBJDIR)/%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<
$(OBJDIR)/%.o: %.cpp
$(CC) -c $(CFLAGS) -o $@ $<
#$(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 $(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)
#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

119
c_jwrapper/src/Makefile.am Normal file
View File

@@ -0,0 +1,119 @@
#######################################################################
#
# 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 =$(JAVAFILES) com/novell/casa/*.java
CASAROOT = ../..
if X86
CASALIBDIR = $(CASAROOT)/lib64
else
CASALIBDIR = $(CASAROOT)/lib
endif
JAVAROOT = .
JAVAC= javac
# handle Mono secondary dependencies
export MONO_PATH := $(MONO_PATH)
PLATFORMINDEPENDENTSOURCEDIR =
PLATFORMDEPENDENTSOURCEDIR = .
MODULE_NAME = miCASA
MODULE_EXT = jar
JAVAFILES = $(srcdir)/com/novell/casa/MiCasa.java \
$(srcdir)/com/novell/casa/NetCredential.java \
$(srcdir)/com/novell/casa/MiCasaException.java
JAVA_CLASS_FILES = com/novell/casa/MiCasa.class \
com/novell/casa/NetCredential.class \
com/novell/casa/MiCasaException.class
CSFILES_CSC :=
INCLUDES = $(CASAROOT)/include
RESOURCES =
CFLAGS += $(INCLUDES) $(DEFINES)
LIBS =
LDFLAGS =
if X86
OBJDIR = ./$(TARGET_CFG)/lib64
else
OBJDIR = ./$(TARGET_CFG)/lib
endif
OBJS =
CUR_DIR := $(shell pwd)
all: $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT)
$(srcdir)/com/novell/casa/MiCasa.class:$(srcdir)/com/novell/casa/MiCasa.java
@echo making Micasa.class
$(JAVAC) -classpath $(JAVAROOT) $^
$(CASAROOT)/include/com_novell_casa_MiCasa.h:$(srcdir)/com/novell/casa/MiCasa.class
javah -d $(INCLUDES) com.novell.casa.MiCasa
$(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT): $(OBJDIR) $(CASAROOT)/include/com_novell_casa_MiCasa.h
jar cvf $(OBJDIR)/miCASA.jar $(JAVA_CLASS_FILES)
cp -f $(OBJDIR)/$(MODULE_NAME).$(MODULE_EXT) $(CASALIBDIR)/$(TARGET_CFG)/$(MODULE_NAME).$(MODULE_EXT)
$(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)
#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
cd $(srcdir)/com/novell/casa && rm -f *.class
cd $(CASAROOT)/include && rm -f com_novell_casa_MiCasa.h
distclean-local:
maintainer-clean-local:
rm -f Makefile.in