Report dwarf as V2 for ELF32
[platform/upstream/nasm.git] / Mkfiles / netware.mak
1 # -* makefile -*- GNU Makefile for NetWare target
2
3 PROOT=.
4 OBJDIR=release
5
6 -include $(OBJDIR)/version.inc
7
8 TARGETS=nasm.nlm ndisasm.nlm
9
10 PERL=perl
11
12 CROSSPREFIX=i586-netware-
13
14 CC=$(CROSSPREFIX)gcc
15 LD=$(CC)
16
17 BINSUFFIX=.nlm
18
19 VERSION=$(NASM_MAJOR_VER).$(NASM_MINOR_VER).$(NASM_SUBMINOR_VER)
20
21 CFLAGS=-g -O2 -Wall -std=c99 -pedantic -D__NETWARE__ -D_POSIX_SOURCE -DHAVE_CONFIG_H -I.
22 LDFLAGS=-Wl,--nlm-description="NASM $(NASM_VER) - the Netwide Assembler (gcc build)"
23 LDFLAGS+=-Wl,--nlm-copyright="NASM is licensed under LGPL."
24 LDFLAGS+=-Wl,--nlm-version=$(VERSION)
25 LDFLAGS+=-Wl,--nlm-kernelspace
26 LDFLAGS+=-Wl,--nlm-posixflag
27 LDFLAGS+=-s
28
29 NASM_OBJ = \
30         $(OBJDIR)/nasm.o\
31         $(OBJDIR)/nasmlib.o\
32         $(OBJDIR)/float.o\
33         $(OBJDIR)/insnsa.o\
34         $(OBJDIR)/assemble.o\
35         $(OBJDIR)/labels.o\
36         $(OBJDIR)/hashtbl.o\
37         $(OBJDIR)/crc64.o\
38         $(OBJDIR)/parser.o\
39         $(OBJDIR)/outform.o\
40         $(OBJDIR)/outbin.o\
41         $(OBJDIR)/outaout.o\
42         $(OBJDIR)/outcoff.o\
43         $(OBJDIR)/outelf32.o\
44         $(OBJDIR)/outelf64.o\
45         $(OBJDIR)/outobj.o\
46         $(OBJDIR)/outas86.o\
47         $(OBJDIR)/outrdf2.o\
48         $(OBJDIR)/outdbg.o\
49         $(OBJDIR)/outieee.o\
50         $(OBJDIR)/outmacho.o\
51         $(OBJDIR)/preproc.o\
52         $(OBJDIR)/pptok.o\
53         $(OBJDIR)/listing.o\
54         $(OBJDIR)/eval.o\
55         $(OBJDIR)/exprlib.o\
56         $(OBJDIR)/stdscan.o\
57         $(OBJDIR)/tokhash.o\
58         $(EOLIST)
59
60 NDIS_OBJ = \
61         $(OBJDIR)/ndisasm.o\
62         $(OBJDIR)/nasmlib.o\
63         $(OBJDIR)/disasm.o\
64         $(OBJDIR)/sync.o\
65         $(OBJDIR)/insnsd.o\
66         $(EOLIST)
67
68 VPATH  = *.c $(PROOT) $(PROOT)/output
69
70
71 all: $(OBJDIR) config.h $(TARGETS)
72
73 $(OBJDIR)/%.o: %.c
74         $(CC) $(CFLAGS) -c -o $@ $<
75
76 nasm$(BINSUFFIX): $(NASM_OBJ)
77         $(LD) $(LDFLAGS) -o $@ $^
78
79 ndisasm$(BINSUFFIX): $(NDIS_OBJ)
80         $(LD) $(LDFLAGS) -o $@ $^
81
82 $(OBJDIR):
83         @mkdir $@
84
85 config.h: $(PROOT)/Mkfiles/netware.mak
86         @echo Creating $@
87         @echo $(DL)/* $@ for NetWare target.$(DL) > $@
88         @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
89         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
90         @echo $(DL)*/$(DL) >> $@
91         @echo $(DL)#ifndef __NETWARE__$(DL) >> $@
92         @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
93         @echo $(DL)#endif$(DL) >> $@
94         @echo $(DL)#define PACKAGE_VERSION "$(NASM_VER)"$(DL) >> $@
95         @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
96         @echo $(DL)#define HAVE_DECL_STRCASECMP 1$(DL) >> $@
97         @echo $(DL)#define HAVE_DECL_STRICMP 1$(DL) >> $@
98         @echo $(DL)#define HAVE_DECL_STRNCASECMP 1$(DL) >> $@
99         @echo $(DL)#define HAVE_DECL_STRNICMP 1$(DL) >> $@
100         @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
101         @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
102         @echo $(DL)#define HAVE_MEMORY_H 1$(DL) >> $@
103         @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@
104         @echo $(DL)#define HAVE_STDBOOL_H 1$(DL) >> $@
105         @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
106         @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
107         @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
108         @echo $(DL)#define HAVE_STRCSPN 1$(DL) >> $@
109         @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
110         @echo $(DL)#define HAVE_STRINGS_H 1$(DL) >> $@
111         @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
112         @echo $(DL)#define HAVE_STRNCASECMP 1$(DL) >> $@
113         @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
114         @echo $(DL)#define HAVE_STRSPN 1$(DL) >> $@
115         @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
116         @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
117         @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
118         @echo $(DL)#define HAVE_VSNPRINTF 1$(DL) >> $@
119         @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
120         @echo $(DL)#ifndef _GNU_SOURCE$(DL) >> $@
121         @echo $(DL)#define _GNU_SOURCE 1$(DL) >> $@
122         @echo $(DL)#endif$(DL) >> $@
123         @echo $(DL)#define ldiv __CW_ldiv$(DL) >> $@
124
125 clean:
126         -$(RM) -r $(OBJDIR)
127         -$(RM) config.h
128
129 distclean: clean
130         -$(RM) $(TARGETS)
131
132 $(OBJDIR)/version.inc: $(PROOT)/version $(PROOT)/version.pl $(OBJDIR)
133         @$(PERL) $(PROOT)/version.pl make < $< > $@
134
135 #-- Magic hints to mkdep.pl --#
136 # @object-ending: ".o"
137 # @path-separator: "/"
138 # @continuation: "\"
139 #-- Everything below is generated by mkdep.pl - do not edit --#
140 assemble.o: assemble.c assemble.h compiler.h config.h insns.h insnsi.h \
141  nasm.h nasmlib.h pptok.h preproc.h regflags.c regs.h regvals.c tokens.h \
142  version.h
143 crc64.o: crc64.c compiler.h config.h
144 disasm.o: disasm.c compiler.h config.h disasm.h insns.h insnsi.h insnsn.c \
145  names.c nasm.h nasmlib.h regdis.c regs.c regs.h sync.h tokens.h version.h
146 eval.o: eval.c compiler.h config.h eval.h float.h insnsi.h labels.h nasm.h \
147  nasmlib.h regs.h version.h
148 exprlib.o: exprlib.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
149  version.h
150 float.o: float.c compiler.h config.h float.h insnsi.h nasm.h nasmlib.h \
151  regs.h version.h
152 hashtbl.o: hashtbl.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \
153  regs.h version.h
154 insnsa.o: insnsa.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
155  regs.h tokens.h version.h
156 insnsd.o: insnsd.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
157  regs.h tokens.h version.h
158 insnsn.o: insnsn.c
159 labels.o: labels.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \
160  regs.h version.h
161 lib/snprintf.o: lib/snprintf.c compiler.h config.h nasmlib.h
162 lib/vsnprintf.o: lib/vsnprintf.c compiler.h config.h nasmlib.h
163 listing.o: listing.c compiler.h config.h insnsi.h listing.h nasm.h nasmlib.h \
164  regs.h version.h
165 macros.o: macros.c compiler.h config.h
166 names.o: names.c compiler.h config.h insnsn.c regs.c
167 nasm.o: nasm.c assemble.h compiler.h config.h eval.h float.h insns.h \
168  insnsi.h labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h \
169  preproc.h regs.h stdscan.h tokens.h version.h
170 nasmlib.o: nasmlib.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
171  regs.h tokens.h version.h
172 ndisasm.o: ndisasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
173  nasmlib.h regs.h sync.h tokens.h version.h
174 outform.o: outform.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
175  regs.h version.h
176 output/outaout.o: output/outaout.c compiler.h config.h insnsi.h nasm.h \
177  nasmlib.h outform.h regs.h stdscan.h version.h
178 output/outas86.o: output/outas86.c compiler.h config.h insnsi.h nasm.h \
179  nasmlib.h outform.h regs.h version.h
180 output/outbin.o: output/outbin.c compiler.h config.h eval.h insnsi.h \
181  labels.h nasm.h nasmlib.h outform.h regs.h stdscan.h version.h
182 output/outcoff.o: output/outcoff.c compiler.h config.h insnsi.h nasm.h \
183  nasmlib.h outform.h regs.h version.h
184 output/outdbg.o: output/outdbg.c compiler.h config.h insnsi.h nasm.h \
185  nasmlib.h outform.h regs.h version.h
186 output/outelf32.o: output/outelf32.c compiler.h config.h insnsi.h nasm.h \
187  nasmlib.h outform.h regs.h stdscan.h version.h
188 output/outelf64.o: output/outelf64.c compiler.h config.h insnsi.h nasm.h \
189  nasmlib.h outform.h regs.h stdscan.h version.h
190 output/outieee.o: output/outieee.c compiler.h config.h insnsi.h nasm.h \
191  nasmlib.h outform.h regs.h version.h
192 output/outmacho.o: output/outmacho.c compiler.h config.h insnsi.h nasm.h \
193  nasmlib.h outform.h regs.h version.h
194 output/outobj.o: output/outobj.c compiler.h config.h insnsi.h nasm.h \
195  nasmlib.h outform.h regs.h stdscan.h version.h
196 output/outrdf.o: output/outrdf.c compiler.h config.h insnsi.h nasm.h \
197  nasmlib.h outform.h regs.h version.h
198 output/outrdf2.o: output/outrdf2.c compiler.h config.h insnsi.h nasm.h \
199  nasmlib.h outform.h rdoff/rdoff.h regs.h version.h
200 parser.o: parser.c compiler.h config.h float.h insns.h insnsi.h nasm.h \
201  nasmlib.h parser.h regflags.c regs.h stdscan.h tokens.h version.h
202 pptok.o: pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h preproc.h
203 preproc.o: preproc.c compiler.h config.h hashtbl.h insnsi.h macros.c nasm.h \
204  nasmlib.h pptok.h preproc.h regs.h stdscan.h tokens.h version.h
205 regdis.o: regdis.c
206 regflags.o: regflags.c
207 regs.o: regs.c compiler.h config.h
208 regvals.o: regvals.c
209 stdscan.o: stdscan.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
210  regs.h stdscan.h tokens.h version.h
211 sync.o: sync.c compiler.h config.h nasmlib.h sync.h
212 tokhash.o: tokhash.c compiler.h config.h hashtbl.h insns.h insnsi.h nasm.h \
213  nasmlib.h regs.h tokens.h version.h