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 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
159 labels.o: labels.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.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 \
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 \
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 wsaa.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 wsaa.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
206 regflags.o: regflags.c
207 regs.o: regs.c compiler.h config.h
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