changeset 112:380a1d95976d

8073856: Include all API classes into library JAR Summary: Makefile is corrected to keep all files from jdk.dio.* packages. Reviewed-by: alkonsta
author snazarki
date Wed, 25 Feb 2015 20:05:40 +0400
parents 2f025f4bfa0a
children 3e046a6fbeec
files Makefile
diffstat 1 files changed, 21 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Feb 25 12:45:03 2015 +0300
+++ b/Makefile	Wed Feb 25 20:05:40 2015 +0400
@@ -49,17 +49,20 @@
 
 BUILD_DEVICEACCESS := true
 
+DIO_JAVA_API_DIRS := \
+	src/share/classes/jdk
+
 # specify java src directories
-DIO_JAVA_SRC_DIRS := \
-                     src/se/classes \
-                     src/share/classes
+DIO_JAVA_IMPL_DIRS := \
+	src/se/classes \
+	src/share/classes/com
 
 # specify native src directories
 DIO_NATIVE_SRC_DIRS := \
-                       src/se/native \
-                       src/share/native \
-                       src/se/linux/native \
-                       src/share/linux/native
+	src/se/native \
+	src/share/native \
+	src/se/linux/native \
+	src/share/linux/native
 
 STRIP_PACKAGES ?=
 # always strip out these apis (not yet implemented)
@@ -82,7 +85,8 @@
 # find all src files
 CPP_SRC_FILES := $(call find-suffix-files, $(DIO_NATIVE_SRC_DIRS),cpp)
 C_SRC_FILES :=  $(call find-suffix-files, $(DIO_NATIVE_SRC_DIRS),c)
-JAVA_SRC_FILES := $(call find-suffix-files, $(DIO_JAVA_SRC_DIRS),java)
+JAVA_IMPL_FILES := $(call find-suffix-files, $(DIO_JAVA_IMPL_DIRS),java)
+JAVA_API_FILES := $(call find-suffix-files, $(DIO_JAVA_API_DIRS),java)
 SAM_JAVA_SRC_FILES := $(call find-suffix-files, $(DIO_SAM_JAVA_SRC_DIR),java)
 
 DIO_INCLUDE_DIRS := $(sort $(dir $(call find-suffix-files, $(DIO_NATIVE_SRC_DIRS),h)))
@@ -91,37 +95,37 @@
 ifneq (,$(findstring i2c, $(STRIP_PACKAGES_INTERNAL)))
   CPP_SRC_FILES := $(foreach f,$(CPP_SRC_FILES),$(if $(findstring i2c,$(f)),,$(f)))
   C_SRC_FILES := $(foreach f,$(C_SRC_FILES),$(if $(findstring i2c,$(f)),,$(f)))
-  JAVA_SRC_FILES := $(foreach f,$(JAVA_SRC_FILES),$(if $(findstring i2c,$(f)),,$(f)))
+  JAVA_IMPL_FILES := $(foreach f,$(JAVA_IMPL_FILES),$(if $(findstring i2c,$(f)),,$(f)))
 endif
 ifneq (,$(findstring spibus, $(STRIP_PACKAGES_INTERNAL)))
   CPP_SRC_FILES := $(foreach f,$(CPP_SRC_FILES),$(if $(findstring spibus,$(f)),,$(f)))
   C_SRC_FILES := $(foreach f,$(C_SRC_FILES),$(if $(findstring spibus,$(f)),,$(f)))
-  JAVA_SRC_FILES := $(foreach f,$(JAVA_SRC_FILES),$(if $(findstring spibus,$(f)),,$(f)))
+  JAVA_IMPL_FILES := $(foreach f,$(JAVA_IMPL_FILES),$(if $(findstring spibus,$(f)),,$(f)))
 endif
 ifneq (,$(findstring uart, $(STRIP_PACKAGES_INTERNAL)))
   CPP_SRC_FILES := $(foreach f,$(CPP_SRC_FILES),$(if $(findstring uart,$(f)),,$(f)))
   C_SRC_FILES := $(foreach f,$(C_SRC_FILES),$(if $(findstring uart,$(f)),,$(f)))
-  JAVA_SRC_FILES := $(foreach f,$(JAVA_SRC_FILES),$(if $(findstring uart,$(f)),,$(f)))
+  JAVA_IMPL_FILES := $(foreach f,$(JAVA_IMPL_FILES),$(if $(findstring uart,$(f)),,$(f)))
 endif
 ifneq (,$(findstring counter, $(STRIP_PACKAGES_INTERNAL)))
   CPP_SRC_FILES := $(foreach f,$(CPP_SRC_FILES),$(if $(findstring counter,$(f)),,$(f)))
   C_SRC_FILES := $(foreach f,$(C_SRC_FILES),$(if $(findstring counter,$(f)),,$(f)))
-  JAVA_SRC_FILES := $(foreach f,$(JAVA_SRC_FILES),$(if $(findstring counter,$(f)),,$(f)))
+  JAVA_IMPL_FILES := $(foreach f,$(JAVA_IMPL_FILES),$(if $(findstring counter,$(f)),,$(f)))
 endif
 ifneq (,$(findstring pwm, $(STRIP_PACKAGES_INTERNAL)))
   CPP_SRC_FILES := $(foreach f,$(CPP_SRC_FILES),$(if $(findstring pwm,$(f)),,$(f)))
   C_SRC_FILES := $(foreach f,$(C_SRC_FILES),$(if $(findstring pwm,$(f)),,$(f)))
-  JAVA_SRC_FILES := $(foreach f,$(JAVA_SRC_FILES),$(if $(findstring pwm,$(f)),,$(f)))
+  JAVA_IMPL_FILES := $(foreach f,$(JAVA_IMPL_FILES),$(if $(findstring pwm,$(f)),,$(f)))
 endif
 ifneq (,$(findstring gpio, $(STRIP_PACKAGES_INTERNAL)))
   CPP_SRC_FILES := $(foreach f,$(CPP_SRC_FILES),$(if $(findstring gpio,$(f)),,$(f)))
   C_SRC_FILES := $(foreach f,$(C_SRC_FILES),$(if $(findstring gpio,$(f)),,$(f)))
-  JAVA_SRC_FILES := $(foreach f,$(JAVA_SRC_FILES),$(if $(findstring gpio,$(f)),,$(f)))
+  JAVA_IMPL_FILES := $(foreach f,$(JAVA_IMPL_FILES),$(if $(findstring gpio,$(f)),,$(f)))
 endif
 ifneq (,$(findstring mmio, $(STRIP_PACKAGES_INTERNAL)))
   CPP_SRC_FILES := $(foreach f,$(CPP_SRC_FILES),$(if $(findstring mmio,$(f)),,$(f)))
   C_SRC_FILES := $(foreach f,$(C_SRC_FILES),$(if $(findstring mmio,$(f)),,$(f)))
-  JAVA_SRC_FILES := $(foreach f,$(JAVA_SRC_FILES),$(if $(findstring mmio,$(f)),,$(f)))
+  JAVA_IMPL_FILES := $(foreach f,$(JAVA_IMPL_FILES),$(if $(findstring mmio,$(f)),,$(f)))
 endif
 
 # calculate obj files needed
@@ -192,9 +196,9 @@
 	@echo linking $@
 	@$(TARGET_LD) -o $(SO_OUT_DIR)/$@ $(foreach o,$(CPP_OBJ_FILES) $(C_OBJ_FILES),$(NATIVE_OUT_DIR)/$(o)) $(TARGET_LD_FLAGS)
 
-$(LIB_NAME).jar: $(JAVA_SRC_FILES) dirs
+$(LIB_NAME).jar: $(JAVA_IMPL_FILES) $(JAVA_API_FILES) dirs
 	@echo Compiling Java source files to $(JAR_OUT_DIR)/$@
-	@$(JAVAC) -d $(JAVA_OUT_DIR) $(JAVA_SRC_FILES)
+	@$(JAVAC) -d $(JAVA_OUT_DIR) $(JAVA_IMPL_FILES) $(JAVA_API_FILES)
 	@sed -e  "s/BUILD_NUMBER/b$(BUILD_NUMBER)/g" src/se/manifest.mf > $(BUILD_DIR)/manifest.mf
 	@$(JAR) cfm $(JAR_OUT_DIR)/$@ $(BUILD_DIR)/manifest.mf -C $(JAVA_OUT_DIR) .