Skip to content

Commit

Permalink
Add support for building .S files into .o objects
Browse files Browse the repository at this point in the history
With the introduction of assembler source files (.S) for BPF code, to be
compiled into object files (.o), the obj-name macro in Makefunctions
needs to be extended to account for .S source files.

Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
  • Loading branch information
kvanhees committed Sep 1, 2021
1 parent a58bb51 commit 04a1634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefunctions
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Functions used by the individual Build files.
#
# Oracle Linux DTrace.
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at
# http://oss.oracle.com/licenses/upl.

Expand All @@ -14,7 +14,7 @@ current-dir = $(dir $(lastword $(MAKEFILE_LIST)))
# given primary. If called with an absolute pathname, return it unchanged.
# Syntax: $(call *-name,primary,filename)

obj-name = $(addprefix $(objdir)/$(subst /,-,$($(1)_DIR))-,$(subst /,-,$(2:.c=.o)))
obj-name = $(addprefix $(objdir)/$(subst /,-,$($(1)_DIR))-,$(subst /,-,$(patsubst %.S,%.o,$(2:.c=.o))))
src-name = $(if $(filter-out $(abspath $(2)),$(2)),$(addprefix $($(1)_DIR),$(2)),$(2))

# Functions to generate the name of a header file and DOF object file for a
Expand Down

0 comments on commit 04a1634

Please sign in to comment.