equal
deleted
inserted
replaced
1 # |
1 # |
2 # Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. |
7 # published by the Free Software Foundation. |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 # |
18 # |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 # or visit www.oracle.com if you need additional information or have any |
20 # or visit www.oracle.com if you need additional information or have any |
21 # questions. |
21 # questions. |
22 # |
22 # |
23 # |
23 # |
24 |
24 |
25 # Single gnu makefile for solaris, linux and windows (windows requires cygwin and mingw) |
25 # Single gnu makefile for solaris, linux and windows (windows requires cygwin and mingw) |
26 |
26 |
27 # Default arch; it is changed below as needed. |
27 # Default arch; it is changed below as needed. |
64 else |
64 else |
65 ARCH=i386 |
65 ARCH=i386 |
66 endif |
66 endif |
67 CC = $(MINGW)-gcc |
67 CC = $(MINGW)-gcc |
68 CONFIGURE_ARGS= --host=$(MINGW) --target=$(MINGW) |
68 CONFIGURE_ARGS= --host=$(MINGW) --target=$(MINGW) |
69 else #linux |
69 else #linux |
70 CPU = $(shell uname -m) |
70 CPU = $(shell uname -m) |
71 ARCH1=$(CPU:x86_64=amd64) |
71 ARCH1=$(CPU:x86_64=amd64) |
72 ARCH=$(ARCH1:i686=i386) |
72 ARCH=$(ARCH1:i686=i386) |
73 ifdef LP64 |
73 ifdef LP64 |
74 CFLAGS/sparcv9 += -m64 |
74 CFLAGS/sparcv9 += -m64 |
114 LDFLAGS += -ldl |
114 LDFLAGS += -ldl |
115 OUTFLAGS += -o $@ |
115 OUTFLAGS += -o $@ |
116 else #Windows |
116 else #Windows |
117 OS = windows |
117 OS = windows |
118 CC = gcc |
118 CC = gcc |
119 #CPPFLAGS += /D"WIN32" /D"_WINDOWS" /D"DEBUG" /D"NDEBUG" |
|
120 CFLAGS += /nologo /MD /W3 /WX /O2 /Fo$(@:.dll=.obj) /Gi- |
119 CFLAGS += /nologo /MD /W3 /WX /O2 /Fo$(@:.dll=.obj) /Gi- |
121 CFLAGS += LIBARCH=\"$(LIBARCH)\" |
120 CFLAGS += LIBARCH=\"$(LIBARCH)\" |
122 DLDFLAGS += /dll /subsystem:windows /incremental:no \ |
121 DLDFLAGS += /dll /subsystem:windows /incremental:no \ |
123 /export:decode_instruction |
122 /export:decode_instruction |
124 OUTFLAGS += /link /out:$@ |
123 OUTFLAGS += /link /out:$@ |