-
Notifications
You must be signed in to change notification settings - Fork 4
Add support for *BSD to makefiles #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,7 +185,7 @@ define CreateDynamicLibraryOrExecutable | |
| $$($1_SYSROOT_LDFLAGS) -o $$($1_TARGET) $$($1_LD_OBJ_ARG) \ | ||
| $$($1_LIBS) $$($1_EXTRA_LIBS)) | ||
| ifeq ($$($1_CREATE_DEBUGINFO), true) | ||
| ifeq ($(call isTargetOs, linux), true) | ||
| ifeq ($(call isTargetOs, linux bsd), true) | ||
| # This cannot be run separately since it updates the original target | ||
| # file. | ||
| $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_create_debuginfo, \ | ||
|
|
@@ -206,14 +206,17 @@ define CreateDynamicLibraryOrExecutable | |
| $$($1_STRIP) $$($1_STRIPFLAGS) $$($1_TARGET)) | ||
| endif | ||
| ifeq ($$($1_CREATE_DEBUGINFO), true) | ||
| ifeq ($(call isTargetOs, linux), true) | ||
| ifeq ($(call isTargetOs, linux bsd), true) | ||
| # Run this after strip is called, since strip can sometimes mangle | ||
| # the embedded debuglink, which we want to avoid. | ||
| $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_add_debuginfo_link, \ | ||
| $(CD) $$($1_SYMBOLS_DIR) && \ | ||
| $$($1_OBJCOPY) --add-gnu-debuglink=$$($1_DEBUGINFO_FILES) $$($1_TARGET)) | ||
| endif | ||
| endif | ||
| ifeq ($(OPENJDK_TARGET_OS_ENV), bsd.netbsd) | ||
| /usr/sbin/paxctl +m $$@ | ||
|
||
| endif | ||
| ifneq ($(MACOSX_CODESIGN_MODE), disabled) | ||
| # Remove signature explicitly first to avoid warnings if the linker | ||
| # added a default adhoc signature. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,9 @@ case `uname -s` in | |
| Linux) | ||
| os=linux | ||
| ;; | ||
| *BSD) | ||
| os=bsd | ||
| ;; | ||
| CYGWIN*) | ||
| os=cygwin | ||
| ;; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,6 +38,7 @@ include lib/AwtLibraries.gmk | |
| include lib/ClientLibraries.gmk | ||
|
|
||
| ifeq ($(call isTargetOs, aix), false) | ||
| ifneq ($(OPENJDK_TARGET_OS_ENV), bsd.openbsd) | ||
|
||
| ############################################################################## | ||
| # Build libjsound | ||
| ############################################################################## | ||
|
|
@@ -51,11 +52,22 @@ ifeq ($(call isTargetOs, aix), false) | |
| -DUSE_PLATFORM_MIDI_IN=TRUE \ | ||
| # | ||
|
|
||
| ifeq ($(call isTargetOs, bsd), false) | ||
| LIBJSOUND_CFLAGS += \ | ||
| -DUSE_PLATFORM_MIDI_OUT=TRUE \ | ||
| -DUSE_PLATFORM_MIDI_IN=TRUE \ | ||
| # | ||
| endif | ||
|
|
||
| LIBJSOUND_LINK_TYPE := C | ||
| ifeq ($(call isTargetOs, macosx), true) | ||
| LIBJSOUND_LINK_TYPE := C++ | ||
| endif | ||
|
|
||
| ifeq ($(call isTargetOs, bsd), true) | ||
| LIBJSOUND_CFLAGS += $(ICONV_CFLAGS) | ||
| endif | ||
|
|
||
| $(eval $(call SetupJdkLibrary, BUILD_LIBJSOUND, \ | ||
| NAME := jsound, \ | ||
| LINK_TYPE := $(LIBJSOUND_LINK_TYPE), \ | ||
|
|
@@ -68,7 +80,9 @@ ifeq ($(call isTargetOs, aix), false) | |
| DISABLED_WARNINGS_clang_PLATFORM_API_MacOSX_MidiUtils.c := \ | ||
| unused-but-set-variable, \ | ||
| DISABLED_WARNINGS_clang_DirectAudioDevice.c := unused-function, \ | ||
| LDFLAGS_bsd := $(ICONV_LDFLAGS), \ | ||
| LIBS_linux := $(ALSA_LIBS), \ | ||
| LIBS_bsd := $(ALSA_LIBS), \ | ||
| LIBS_macosx := \ | ||
| -framework AudioToolbox \ | ||
| -framework AudioUnit \ | ||
|
|
@@ -81,6 +95,7 @@ ifeq ($(call isTargetOs, aix), false) | |
|
|
||
| TARGETS += $(BUILD_LIBJSOUND) | ||
| endif | ||
| endif | ||
|
|
||
| ifeq ($(call isTargetOs, macosx), true) | ||
| ############################################################################## | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We prefer space after comma when possible. https://openjdk.org/groups/build/doc/code-conventions.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that's nicer. Changed in latest version of the patch.