< prev index next >

src/utils/hsdis/Makefile

Print this page


   1 #
   2 # Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # The Universal Permissive License (UPL), Version 1.0
   6 #
   7 # Subject to the condition set forth below, permission is hereby granted to
   8 # any person obtaining a copy of this software, associated documentation
   9 # and/or data (collectively the "Software"), free of charge and under any
  10 # and all copyright rights in the Software, and any and all patent rights
  11 # owned or freely licensable by each licensor hereunder covering either (i)
  12 # the unmodified Software as contributed to or provided by such licensor,
  13 # or (ii) the Larger Works (as defined below), to deal in both
  14 #
  15 # (a) the Software, and
  16 #
  17 # (b) any piece of software and/or hardware listed in the lrgrwrks.txt file
  18 # if one is included with the Software (each a "Larger Work" to which the
  19 # Software is contributed by such licensors),
  20 #
  21 # without restriction, including without limitation the rights to copy,
  22 # create derivative works of, display, perform, and distribute the Software


 183 
 184 ifeq            ($(BINUTILS),)
 185 # Pop all the way out of the workspace to look for binutils.
 186 # ...You probably want to override this setting.
 187 BINUTILSDIR     = $(shell cd build/binutils;pwd)
 188 else
 189 BINUTILSDIR     = $(shell cd $(BINUTILS);pwd)
 190 endif
 191 
 192 CPPFLAGS        += -I$(BINUTILSDIR)/include -I$(BINUTILSDIR)/bfd -I$(TARGET_DIR)/bfd
 193 CPPFLAGS        += -DLIBARCH_$(LIBARCH) -DLIBARCH=\"$(LIBARCH)\" -DLIB_EXT=\"$(LIB_EXT)\"
 194 
 195 TARGET_DIR      = build/$(OS)-$(JDKARCH)
 196 TARGET          = $(TARGET_DIR)/hsdis-$(LIBARCH)$(LIB_EXT)
 197 
 198 SOURCE          = hsdis.c
 199 
 200 LIBRARIES =     $(TARGET_DIR)/bfd/libbfd.a \
 201                 $(TARGET_DIR)/opcodes/libopcodes.a \
 202                 $(TARGET_DIR)/libiberty/libiberty.a




 203 
 204 DEMO_TARGET     = $(TARGET_DIR)/hsdis-demo
 205 DEMO_SOURCE     = hsdis-demo.c
 206 
 207 .PHONY:  all clean demo both
 208 
 209 all:  $(TARGET)
 210 
 211 both: all all64
 212 
 213 %64:
 214         $(MAKE) LP64=1 ${@:%64=%}
 215 
 216 demo: $(TARGET) $(DEMO_TARGET)
 217 
 218 $(LIBRARIES): $(TARGET_DIR) $(TARGET_DIR)/Makefile
 219         if [ ! -f $@ ]; then cd $(TARGET_DIR); make all-opcodes; fi
 220 
 221 $(TARGET_DIR)/Makefile:
 222         (cd $(TARGET_DIR); CC=$(CC) CFLAGS="$(CFLAGS)" AR="$(AR)" $(BINUTILSDIR)/configure --disable-nls $(CONFIGURE_ARGS))
   1 #
   2 # Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # The Universal Permissive License (UPL), Version 1.0
   6 #
   7 # Subject to the condition set forth below, permission is hereby granted to
   8 # any person obtaining a copy of this software, associated documentation
   9 # and/or data (collectively the "Software"), free of charge and under any
  10 # and all copyright rights in the Software, and any and all patent rights
  11 # owned or freely licensable by each licensor hereunder covering either (i)
  12 # the unmodified Software as contributed to or provided by such licensor,
  13 # or (ii) the Larger Works (as defined below), to deal in both
  14 #
  15 # (a) the Software, and
  16 #
  17 # (b) any piece of software and/or hardware listed in the lrgrwrks.txt file
  18 # if one is included with the Software (each a "Larger Work" to which the
  19 # Software is contributed by such licensors),
  20 #
  21 # without restriction, including without limitation the rights to copy,
  22 # create derivative works of, display, perform, and distribute the Software


 183 
 184 ifeq            ($(BINUTILS),)
 185 # Pop all the way out of the workspace to look for binutils.
 186 # ...You probably want to override this setting.
 187 BINUTILSDIR     = $(shell cd build/binutils;pwd)
 188 else
 189 BINUTILSDIR     = $(shell cd $(BINUTILS);pwd)
 190 endif
 191 
 192 CPPFLAGS        += -I$(BINUTILSDIR)/include -I$(BINUTILSDIR)/bfd -I$(TARGET_DIR)/bfd
 193 CPPFLAGS        += -DLIBARCH_$(LIBARCH) -DLIBARCH=\"$(LIBARCH)\" -DLIB_EXT=\"$(LIB_EXT)\"
 194 
 195 TARGET_DIR      = build/$(OS)-$(JDKARCH)
 196 TARGET          = $(TARGET_DIR)/hsdis-$(LIBARCH)$(LIB_EXT)
 197 
 198 SOURCE          = hsdis.c
 199 
 200 LIBRARIES =     $(TARGET_DIR)/bfd/libbfd.a \
 201                 $(TARGET_DIR)/opcodes/libopcodes.a \
 202                 $(TARGET_DIR)/libiberty/libiberty.a
 203 
 204 ifeq ($(OS),windows)
 205 LIBRARIES +=    $(TARGET_DIR)/zlib/libz.a
 206 endif
 207 
 208 DEMO_TARGET     = $(TARGET_DIR)/hsdis-demo
 209 DEMO_SOURCE     = hsdis-demo.c
 210 
 211 .PHONY:  all clean demo both
 212 
 213 all:  $(TARGET)
 214 
 215 both: all all64
 216 
 217 %64:
 218         $(MAKE) LP64=1 ${@:%64=%}
 219 
 220 demo: $(TARGET) $(DEMO_TARGET)
 221 
 222 $(LIBRARIES): $(TARGET_DIR) $(TARGET_DIR)/Makefile
 223         if [ ! -f $@ ]; then cd $(TARGET_DIR); make all-opcodes; fi
 224 
 225 $(TARGET_DIR)/Makefile:
 226         (cd $(TARGET_DIR); CC=$(CC) CFLAGS="$(CFLAGS)" AR="$(AR)" $(BINUTILSDIR)/configure --disable-nls $(CONFIGURE_ARGS))
< prev index next >