1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
$NetBSD: patch-ad,v 1.2 1999/09/14 02:19:15 jlam Exp $
--- src/config/platforms/netbsd.mk.orig Fri Jul 9 15:13:57 1999
+++ src/config/platforms/netbsd.mk Sat Sep 11 11:17:45 1999
@@ -30,8 +30,37 @@
## compiler/loader options are used. It will probably also be used
## in constructing the name object file destination directory.
-OS_ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ | sed "s/\//-/")
+# Get value of OS_ARCH from environment variable MACHINE.
+#
+OS_ARCH = ${MACHINE}
+
+# Set OS_ENDIAN to appropriate value. For NetBSD, most architectures are
+# big-endian, so test for the architectures which are little-endian and
+# reset OS_ENDIAN. Why doesn't GNU make have an OR statement!?
+#
+OS_ENDIAN = BigEndian32
+
+ifeq ($(OS_ARCH),alpha)
+OS_ENDIAN = LittleEndian32
+endif
+ifeq ($(OS_ARCH),arm32)
+OS_ENDIAN = LittleEndian32
+endif
+ifeq ($(OS_ARCH),i386)
+OS_ENDIAN = LittleEndian32
+endif
+ifeq ($(OS_ARCH),pc532)
+OS_ENDIAN = LittleEndian32
+endif
+ifeq ($(OS_ARCH),pica)
OS_ENDIAN = LittleEndian32
+endif
+ifeq ($(OS_ARCH),pmax)
+OS_ENDIAN = LittleEndian32
+endif
+ifeq ($(OS_ARCH),vax)
+OS_ENDIAN = LittleEndian32
+endif
# Define tools
CC = gcc
@@ -65,17 +94,20 @@
endif
# Includes
-OS_INCLUDES =
+OS_INCLUDES +=
G++INCLUDES = -I/usr/include/g++
# Compiler flags
PLATFORM_FLAGS = -pipe -DNETBSD -DNetBSD
PORT_FLAGS = -DHAVE_STRERROR
-OS_CFLAGS = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
+OS_CFLAGS += $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
PLATFORM_FLAGS +=
PORT_FLAGS +=
+# Linker flags
+OS_DLLFLAGS +=
+
# Shared library flags
MKSHLIB = $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
@@ -90,5 +122,12 @@
ABI_NATIVE = unix
ABI_FE = Unix
+
+##################################################################
+## ABIPKGDIR defines the directory containing the Makefile to use to
+## build a set of distribution archives (.deb, .rpm, .tgz, .exe, etc)
+## This is relative to $(ABI_ROOT)/src/pkg
+
+ABIPKGDIR = netbsd
# End of NetBSD defs
|