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
68 VPATH = *.c $(PROOT) $(PROOT)/output
71 all: $(OBJDIR) config.h $(TARGETS)
74 $(CC) $(CFLAGS) -c -o $@ $<
76 nasm$(BINSUFFIX): $(NASM_OBJ)
77 $(LD) $(LDFLAGS) -o $@ $^
79 ndisasm$(BINSUFFIX): $(NDIS_OBJ)
80 $(LD) $(LDFLAGS) -o $@ $^
85 config.h: $(PROOT)/Mkfiles/netware.mak
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) >> $@
132 $(OBJDIR)/version.inc: $(PROOT)/version $(PROOT)/version.pl $(OBJDIR)
133 @$(PERL) $(PROOT)/version.pl make < $< > $@
135 #-- Magic hints to mkdep.pl --#
136 # @object-ending: ".o"
137 # @path-separator: "/"
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 \
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 \
150 float.o: float.c compiler.h config.h float.h insnsi.h nasm.h nasmlib.h \
152 hashtbl.o: hashtbl.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \
154 insnsa.o: insnsa.c compiler.h config.h insns.h insnsb.c insnsi.h nasm.h \
155 nasmlib.h regs.h tokens.h version.h
156 insnsb.o: insnsb.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
157 regs.h tokens.h version.h
158 insnsd.o: insnsd.c compiler.h config.h insns.h insnsb.c insnsi.h nasm.h \
159 nasmlib.h regs.h tokens.h version.h
161 labels.o: labels.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \
163 lib/snprintf.o: lib/snprintf.c compiler.h config.h nasmlib.h
164 lib/vsnprintf.o: lib/vsnprintf.c compiler.h config.h nasmlib.h
165 listing.o: listing.c compiler.h config.h insnsi.h listing.h nasm.h nasmlib.h \
167 macros.o: macros.c compiler.h config.h
168 names.o: names.c compiler.h config.h insnsn.c regs.c
169 nasm.o: nasm.c assemble.h compiler.h config.h eval.h float.h insns.h \
170 insnsi.h labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h \
171 preproc.h regs.h stdscan.h tokens.h version.h
172 nasmlib.o: nasmlib.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
173 regs.h tokens.h version.h
174 ndisasm.o: ndisasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
175 nasmlib.h regs.h sync.h tokens.h version.h
176 outform.o: outform.c compiler.h config.h insnsi.h nasm.h nasmlib.h outform.h \
178 output/outaout.o: output/outaout.c compiler.h config.h insnsi.h nasm.h \
179 nasmlib.h outform.h regs.h stdscan.h version.h
180 output/outas86.o: output/outas86.c compiler.h config.h insnsi.h nasm.h \
181 nasmlib.h outform.h regs.h version.h
182 output/outbin.o: output/outbin.c compiler.h config.h eval.h insnsi.h \
183 labels.h nasm.h nasmlib.h outform.h regs.h stdscan.h version.h
184 output/outcoff.o: output/outcoff.c compiler.h config.h insnsi.h nasm.h \
185 nasmlib.h outform.h regs.h version.h
186 output/outdbg.o: output/outdbg.c compiler.h config.h insnsi.h nasm.h \
187 nasmlib.h outform.h regs.h version.h
188 output/outelf32.o: output/outelf32.c compiler.h config.h insnsi.h nasm.h \
189 nasmlib.h outform.h regs.h stdscan.h version.h wsaa.h
190 output/outelf64.o: output/outelf64.c compiler.h config.h insnsi.h nasm.h \
191 nasmlib.h outform.h regs.h stdscan.h version.h wsaa.h
192 output/outieee.o: output/outieee.c compiler.h config.h insnsi.h nasm.h \
193 nasmlib.h outform.h regs.h version.h
194 output/outmacho.o: output/outmacho.c compiler.h config.h insnsi.h nasm.h \
195 nasmlib.h outform.h regs.h version.h
196 output/outobj.o: output/outobj.c compiler.h config.h insnsi.h nasm.h \
197 nasmlib.h outform.h regs.h stdscan.h version.h
198 output/outrdf.o: output/outrdf.c compiler.h config.h insnsi.h nasm.h \
199 nasmlib.h outform.h regs.h version.h
200 output/outrdf2.o: output/outrdf2.c compiler.h config.h insnsi.h nasm.h \
201 nasmlib.h outform.h rdoff/rdoff.h regs.h version.h
202 parser.o: parser.c compiler.h config.h float.h insns.h insnsi.h nasm.h \
203 nasmlib.h parser.h regflags.c regs.h stdscan.h tokens.h version.h
204 pptok.o: pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h preproc.h
205 preproc.o: preproc.c compiler.h config.h hashtbl.h insnsi.h macros.c nasm.h \
206 nasmlib.h pptok.h preproc.h regs.h stdscan.h tokens.h version.h
208 regflags.o: regflags.c
209 regs.o: regs.c compiler.h config.h
211 stdscan.o: stdscan.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
212 regs.h stdscan.h tokens.h version.h
213 sync.o: sync.c compiler.h config.h nasmlib.h sync.h
214 tokhash.o: tokhash.c compiler.h config.h hashtbl.h insns.h insnsi.h nasm.h \
215 nasmlib.h regs.h tokens.h version.h