summaryrefslogtreecommitdiffstats
path: root/nscore.mk
blob: 59c1b726c5c5a26985608b2e18e7acf59c7da5d0 (plain)
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
#
# BEGIN COPYRIGHT BLOCK
# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#
# Shared rules for modules depending on nscore

# AIX uname
AIXOS_VERSION := $(shell uname -v)
AIXOS_RELEASE := $(shell uname -r)
AIXOS = $(AIXOS_VERSION).$(AIXOS_RELEASE)

#
# Compiler
#
# Windows NT
ifeq ($(ARCH), WINNT)
  CFLAGS += -DOS_windows -DNT 
  PROCESSOR := $(shell uname -p)
  ifeq ($(PROCESSOR), I386)
    CFLAGS += -DCPU_x86
  else
  ifeq ($(PROCESSOR), ALPHA)
    CFLAGS += -DCPU_alpha
  else
  ifeq ($(PROCESSOR), MIPS)
    CFLAGS += -DCPU_mips
  endif
  endif
  endif
endif
# Solaris
ifeq ($(ARCH), SOLARIS)
  CFLAGS += -DCPU_sparc -DOS_solaris
endif
#Solarisx86
ifeq ($(ARCH), SOLARISx86)
  CFLAGS += -DOS_solaris
endif

# HP-UX
ifeq ($(ARCH), HPUX)
  CFLAGS += -DCPU_hppa -DOS_hpux
  CFLAGS += -D_NO_THREADS_
endif
# AIX
ifeq ($(ARCH), AIX)
  CFLAGS += -DCPU_powerpc -DOS_aix
endif
# IRIX
ifeq ($(ARCH), IRIX)
  CFLAGS += -DCPU_mips -DOS_irix
  CFLAGS += -D_NO_THREADS_
endif
# OSF1
ifeq ($(ARCH), OSF1)
  CFLAGS += -DCPU_alpha -DOS_osf1
endif
ifeq ($(ARCH), UNIXWARE)
  CFLAGS += -DSYSV -DSVR4 -DCPU_i486 -DOS_unixware
endif
ifeq ($(ARCH), UnixWare)
  CFLAGS += -DSYSV -DCPU_i486 -DOS_unixware
  SYSV_REL := $(shell uname -r)
ifeq ($(SYSV_REL), 5)
  CFLAGS += -DSVR5
else
  CFLAGS += -DSVR4
endif
endif
ifeq ($(ARCH), SCO)
  CFLAGS += -DSYSV -DCPU_i486 -DOS_sco
endif
ifeq ($(ARCH), NCR)
  CFLAGS += -DSYSV -DSVR4 -DCPU_i486 -DOS_ncr
endif