1 # -* makefile -*- GNU Makefile for NetWare target
6 -include $(OBJDIR)/version.inc
8 TARGETS=nasm.nlm ndisasm.nlm
12 CROSSPREFIX=i586-netware-
19 VERSION=$(NASM_MAJOR_VER).$(NASM_MINOR_VER).$(NASM_SUBMINOR_VER)
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
31 NASM = nasm.$(O) nasmlib.$(O) raa.$(O) saa.$(O) \
32 float.$(O) insnsa.$(O) insnsb.$(O) \
33 assemble.$(O) labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \
34 outform.$(O) output/outbin.$(O) \
35 output/outaout.$(O) output/outcoff.$(O) \
36 output/outelf32.$(O) output/outelf64.$(O) \
37 output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
38 output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \
39 preproc.$(O) quote.$(O) pptok.$(O) macros.$(O) \
40 listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) strfunc.$(O) \
41 tokhash.$(O) regvals.$(O) regflags.$(O)
43 NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) \
44 insnsd.$(O) insnsb.$(O) insnsn.$(O) regs.$(O) regdis.$(O)
46 NASM_OBJ = $(addprefix $(OBJDIR)/,$(notdir $(NASM))) $(EOLIST)
47 NDIS_OBJ = $(addprefix $(OBJDIR)/,$(notdir $(NDISASM))) $(EOLIST)
49 VPATH = *.c $(PROOT) $(PROOT)/output
52 all: $(OBJDIR) config.h $(TARGETS)
55 $(CC) $(CFLAGS) -c -o $@ $<
57 nasm$(BINSUFFIX): $(NASM_OBJ)
58 $(LD) $(LDFLAGS) -o $@ $^
60 ndisasm$(BINSUFFIX): $(NDIS_OBJ)
61 $(LD) $(LDFLAGS) -o $@ $^
66 config.h: $(PROOT)/Mkfiles/netware.mak
68 @echo $(DL)/* $@ for NetWare target.$(DL) > $@
69 @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
70 @echo $(DL)** All your changes will be lost!!$(DL) >> $@
71 @echo $(DL)*/$(DL) >> $@
72 @echo $(DL)#ifndef __NETWARE__$(DL) >> $@
73 @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@
74 @echo $(DL)#endif$(DL) >> $@
75 @echo $(DL)#define PACKAGE_VERSION "$(NASM_VER)"$(DL) >> $@
76 @echo $(DL)#define OS "i586-pc-libc-NetWare"$(DL) >> $@
77 @echo $(DL)#define HAVE_DECL_STRCASECMP 1$(DL) >> $@
78 @echo $(DL)#define HAVE_DECL_STRICMP 1$(DL) >> $@
79 @echo $(DL)#define HAVE_DECL_STRNCASECMP 1$(DL) >> $@
80 @echo $(DL)#define HAVE_DECL_STRNICMP 1$(DL) >> $@
81 @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
82 @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
83 @echo $(DL)#define HAVE_MEMORY_H 1$(DL) >> $@
84 @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@
85 @echo $(DL)#define HAVE_STDBOOL_H 1$(DL) >> $@
86 @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
87 @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
88 @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
89 @echo $(DL)#define HAVE_STRCSPN 1$(DL) >> $@
90 @echo $(DL)#define HAVE_STRICMP 1$(DL) >> $@
91 @echo $(DL)#define HAVE_STRINGS_H 1$(DL) >> $@
92 @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
93 @echo $(DL)#define HAVE_STRNCASECMP 1$(DL) >> $@
94 @echo $(DL)#define HAVE_STRNICMP 1$(DL) >> $@
95 @echo $(DL)#define HAVE_STRSPN 1$(DL) >> $@
96 @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
97 @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
98 @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
99 @echo $(DL)#define HAVE_VSNPRINTF 1$(DL) >> $@
100 @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
101 @echo $(DL)#ifndef _GNU_SOURCE$(DL) >> $@
102 @echo $(DL)#define _GNU_SOURCE 1$(DL) >> $@
103 @echo $(DL)#endif$(DL) >> $@
104 @echo $(DL)#define ldiv __CW_ldiv$(DL) >> $@
113 $(OBJDIR)/version.inc: $(PROOT)/version $(PROOT)/version.pl $(OBJDIR)
114 @$(PERL) $(PROOT)/version.pl make < $< > $@
116 #-- Magic hints to mkdep.pl --#
117 # @object-ending: ".o"
118 # @path-separator: ""
120 #-- Everything below is generated by mkdep.pl - do not edit --#
121 assemble.o: assemble.c assemble.h compiler.h config.h insns.h insnsi.h \
122 nasm.h nasmlib.h regs.h tables.h tokens.h version.h
123 crc64.o: crc64.c compiler.h config.h nasmlib.h
124 disasm.o: disasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
125 nasmlib.h regdis.h regs.h sync.h tables.h tokens.h version.h
126 eval.o: eval.c compiler.h config.h eval.h float.h insnsi.h labels.h nasm.h \
127 nasmlib.h regs.h version.h
128 exprlib.o: exprlib.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
130 float.o: float.c compiler.h config.h float.h insnsi.h nasm.h nasmlib.h \
132 hashtbl.o: hashtbl.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \
134 insnsa.o: insnsa.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
135 regs.h tokens.h version.h
136 insnsb.o: insnsb.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
137 regs.h tokens.h version.h
138 insnsd.o: insnsd.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
139 regs.h tokens.h version.h
140 insnsn.o: insnsn.c compiler.h config.h insnsi.h tables.h
141 labels.o: labels.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \
143 snprintf.o: snprintf.c compiler.h config.h nasmlib.h
144 vsnprintf.o: vsnprintf.c compiler.h config.h nasmlib.h
145 listing.o: listing.c compiler.h config.h insnsi.h listing.h nasm.h nasmlib.h \
147 macros.o: macros.c compiler.h config.h insnsi.h tables.h
148 nasm.o: nasm.c assemble.h compiler.h config.h eval.h float.h insns.h \
149 insnsi.h labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h \
150 preproc.h raa.h regs.h saa.h stdscan.h tokens.h version.h
151 nasmlib.o: nasmlib.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
152 regs.h tokens.h version.h
153 ndisasm.o: ndisasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
154 nasmlib.h regs.h sync.h tokens.h version.h
155 outform.o: outform.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
157 outaout.o: outaout.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
158 raa.h regs.h saa.h stdscan.h version.h
159 outas86.o: outas86.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
160 raa.h regs.h saa.h version.h
161 outbin.o: outbin.c compiler.h config.h eval.h insnsi.h labels.h nasm.h \
162 nasmlib.h outform.h regs.h saa.h stdscan.h version.h
163 outcoff.o: outcoff.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
164 raa.h regs.h saa.h version.h
165 outdbg.o: outdbg.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
167 outelf32.o: outelf32.c compiler.h config.h insnsi.h nasm.h nasmlib.h \
168 outform.h raa.h regs.h saa.h stdscan.h version.h
169 outelf64.o: outelf64.c compiler.h config.h insnsi.h nasm.h nasmlib.h \
170 outform.h raa.h regs.h saa.h stdscan.h version.h
171 outieee.o: outieee.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
173 outmacho.o: outmacho.c compiler.h config.h insnsi.h nasm.h nasmlib.h \
174 outform.h raa.h regs.h saa.h version.h
175 outobj.o: outobj.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
176 regs.h stdscan.h version.h
177 outrdf.o: outrdf.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
179 outrdf2.o: outrdf2.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
180 rdoff.h regs.h saa.h version.h
181 parser.o: parser.c compiler.h config.h float.h insns.h insnsi.h nasm.h \
182 nasmlib.h parser.h regs.h stdscan.h tables.h tokens.h version.h
183 pptok.o: pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h preproc.h
184 preproc.o: preproc.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \
185 pptok.h preproc.h quote.h regs.h stdscan.h tables.h tokens.h version.h
186 quote.o: quote.c compiler.h config.h nasmlib.h quote.h
187 raa.o: raa.c compiler.h config.h nasmlib.h raa.h
188 regdis.o: regdis.c regdis.h regs.h
189 regflags.o: regflags.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
191 regs.o: regs.c compiler.h config.h insnsi.h tables.h
192 regvals.o: regvals.c compiler.h config.h insnsi.h tables.h
193 saa.o: saa.c compiler.h config.h nasmlib.h saa.h
194 stdscan.o: stdscan.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
195 quote.h regs.h stdscan.h tokens.h version.h
196 strfunc.o: strfunc.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
198 sync.o: sync.c compiler.h config.h nasmlib.h sync.h
199 tokhash.o: tokhash.c compiler.h config.h hashtbl.h insns.h insnsi.h nasm.h \
200 nasmlib.h regs.h tokens.h version.h