File: Makefile

package info (click to toggle)
ibcs 971113-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,108 kB
  • ctags: 2,061
  • sloc: ansic: 14,910; makefile: 280; sh: 203; asm: 47; perl: 18; pascal: 2
file content (167 lines) | stat: -rw-r--r-- 3,547 bytes parent folder | download
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#
# Makefile for the iBCS emulator files
#
# $Id: Makefile,v 1.60 1996/11/11 21:20:43 jaggy Exp $
# $Source: /usr/CVS/ibcs/iBCSemul/Makefile,v $
#

######## You should not need to change anything in this file ########

# Build the compile flags etc. based on the selected options in ../CONFIG.
# Edit ../CONFIG if you don't want the defaults!

include ../CONFIG

MODULEDIR = $(DEST)/lib/modules/`kernelversion`/misc

EMUOPTS	=

x86_OBJS = emulate.o sysi86.o wysev386.o xnx.o

SPARC_OBJS = solaris.o

OBJS	= $(x86_OBJS) map.o coff.o hrtsys.o ioctl.o ipc.o mmap.o open.o \
	secureware.o socket.o poll.o ptrace.o signal.o socksys.o stat.o \
	stream.o sysconf.o sysfs.o sysinfo.o sysisc.o syslocal.o \
	timod.o ulimit.o utsname.o vtkd.o xstat.o \
	binfmt_lib.o bsdioctl.o


ifeq ($(ARCH),sparc)
OBJS := $(OBJS) $(SPARC_OBJS)
endif

ifeq ($(HAVE_QUOTA),yes)
EMUOPTS := $(EMUOPTS) -DHAVE_QUOTA
endif

ifeq ($(EMU_SCO),yes)
EMUOPTS := $(EMUOPTS) -DEMU_SCO
endif
ifeq ($(EMU_ISC),yes)
EMUOPTS := $(EMUOPTS) -DEMU_ISC
endif
ifeq ($(EMU_SVR4),yes)
EMUOPTS := $(EMUOPTS) -DEMU_SVR4
OBJS	:= $(OBJS) svr4.o
endif
ifeq ($(EMU_BSD),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_BSD
OBJS	:= $(OBJS) bsd.o bsdsignal.o bsdsocket.o bsdstat.o
endif
ifeq ($(EMU_WYSE),yes)
EMUOPTS := $(EMUOPTS) -DEMU_WYSE
endif
ifeq ($(EMU_WYSEMP),yes)
EMUOPTS := $(EMUOPTS) -DEMU_WYSEMP
endif
ifeq ($(EMU_X286),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_X286
endif

ifeq ($(EMU_SPX),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_SPX
endif
ifeq ($(EMU_XTI),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_XTI
endif
ifeq ($(EMU_TLI_OPTMGMT),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_TLI_OPTMGMT
endif
ifeq ($(EMU_XTI_OPTMGMT),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_XTI_OPTMGMT
endif

ifeq ($(EMU_BINFMT_ELF),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_BINFMT_ELF
OBJS	:= $(OBJS) binfmt_elf.o
endif
ifeq ($(EMU_BINFMT_AOUT),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_BINFMT_AOUT
OBJS	:= $(OBJS) binfmt_aout.o
endif
ifeq ($(EMU_BINFMT_COFF),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_BINFMT_COFF
OBJS	:= $(OBJS) binfmt_coff.o
endif
ifeq ($(EMU_BINFMT_XOUT),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_BINFMT_XOUT
OBJS	:=$(OBJS) binfmt_xout.o
endif
ifeq ($(EMU_BINFMT_OLDSCRIPT),yes)
EMUOPTS	:= $(EMUOPTS) -DEMU_BINFMT_OLDSCRIPT
OBJS	:=$(OBJS) binfmt_script.o
endif

ifeq ($(IBCS_TRACE),yes)
EMUOPTS	:= $(EMUOPTS) -DIBCS_TRACE
endif
ifeq ($(VERBOSE_ERRORS),yes)
EMUOPTS	:= $(EMUOPTS) -DVERBOSE_ERRORS
endif
ifeq ($(COFF_TRACE),yes)
EMUOPTS	:= $(EMUOPTS) -DCOFF_TRACE
endif
ifeq ($(ELF_TRACE),yes)
EMUOPTS	:= $(EMUOPTS) -DELF_TRACE
endif
ifeq ($(XOUT_DEBUG),yes)
EMUOPTS	:= $(EMUOPTS) -DXOUT_DEBUG
endif
ifeq ($(XOUT_TRACE),yes)
EMUOPTS := $(EMUOPTS) -DXOUT_TRACE
endif

ifneq (${ELFMODULE},)
LDMODFLAGS=-m elf_i386
endif

ifeq ($(USE_VERSIONS),yes)
MODOPTS := -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h
endif

ifeq ($(SMP),yes)
SMPOPTS := -D__SMP__=1
endif

CFLAGS = -D__KERNEL__=1 -DMODULE -D__NO_VERSION__ \
	-I../include -I/usr/src/linux/include -Wall -Wstrict-prototypes \
	-O3 -fomit-frame-pointer $(ARCH_FLAGS) \
	-DSOCKSYS_MAJOR=$(SOCKSYS_MAJOR) $(EMUOPTS) $(MODOPTS) $(SMPOPTS)


.S.s:
	$(CPP) -traditional $< -o $*.s
.c.s:
	$(CC) $(CFLAGS) -S $<
.s.o:
	$(AS) -c -o $*.o $<
.c.o:
	$(CC) $(CFLAGS) -c $<


all:	iBCS

install: all
	-mkdir -p "$(MODULEDIR)"
	cp iBCS "$(MODULEDIR)"/iBCS


iBCS:	$(OBJS)
	$(LD) -r $(LDMODFLAGS) -o iBCS $(OBJS) $(ARCH_LIBS)


clean:
	rm -f core *.o *.a *.s iBCS .depend

dep:
	$(CPP) -M -I../include $(CFLAGS) *.c > .depend

dummy:

#
# include a dependency file if one exists
#
ifeq (.depend,$(wildcard .depend))
include .depend
endif