build sigar.nlm

This commit is contained in:
Doug MacEachern 2005-08-28 07:28:31 +00:00
parent 03d16b015b
commit 716c3c5856
1 changed files with 68 additions and 0 deletions

68
src/os/netware/Makefile Normal file
View File

@ -0,0 +1,68 @@
NDKBASE = c:/novell
#SYS:/ drive mount
NDRIVE = g:
NDK_ROOT = $(NDKBASE)/ndk
SDK_LIBC = $(NDK_ROOT)/libc
JBINDINGS = ../../../bindings/java
JBUILD = $(JBINDINGS)/build
DEF_FILE = $(JBUILD)/sigar.def
JINCLUDES = -I$(NDRIVE)/JAVA/include -I$(NDRIVE)/JAVA/include/netware
INCLUDES = $(JINCLUDES) -I../../../include -I. -I$(JBUILD)/src
OBJDIR = $(JBUILD)/obj/x86-netware
LIBDIR = $(JBINDINGS)/sigar-bin/lib
SIGARLIB = $(LIBDIR)/sigar.nlm
DB = NDEBUG
# DB = DEBUG
ifeq ($(DB),NDEBUG)
OPT = -O2
else
OPT = -g
endif
CC = mwccnlm
CFLAGS = -DNETWARE -D$(DB) -nostdinc $(OPT)
CFLAGS += -gccinc -inline off -opt nointrinsics -align 4 -inst mmx -proc 686
PRELUDE = $(SDK_LIBC)/imports/libcpre.o
LD = mwldnlm
LDFLAGS = -nostdlib $(PRELUDE) $(DEF_FILE) $(NW_OBJ) $(SIGAR_OBJ) $(JNI_OBJ) -o $(SIGARLIB) -type generic
INCLUDES += \
-I$(SDK_LIBC)/include \
-I$(SDK_LIBC)/include/nks \
-I$(SDK_LIBC)/include/winsock
CFLAGS += $(INCLUDES)
NW_SRC = .\netware_sigar.c
SIGAR_SRC = \
..\..\sigar.c \
..\..\sigar_cache.c \
..\..\sigar_getline.c \
..\..\sigar_fileinfo.c \
..\..\sigar_util.c
JNI_SRC = $(JBINDINGS)\src\jni\javasigar.c
NW_OBJ = $(NW_SRC:.c=.o)
SIGAR_OBJ = $(SIGAR_SRC:.c=.o)
JNI_OBJ = $(JNI_SRC:.c=.o)
all: $(OBJDIR) $(SIGARLIB)
clean:
-$(RM) -r $(OBJDIR)
$(OBJDIR):
@mkdir $(OBJDIR)
$(SIGARLIB): $(SIGAR_OBJ) $(NW_OBJ) $(JNI_OBJ) $(DEF_FILE)
@echo Linking $@
@-$(RM) $@
@$(LD) $(LDFLAGS)