PREPROCESS=$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS)
SUFFIXES=.s .o
EXTRA_DIST=b-win32.asm b-win32.obj bf586.pl bx86-cpp.s bx86unix.cpp \
	readme win32.asm x86ms.pl x86unix.pl

bx86-elf.s: bx86-cpp.s bx86unix.cpp
	$(PREPROCESS) -DELF bx86unix.cpp > bx86-elf.s

bx86-sol.s: bx86-cpp.s bx86unix.cpp
	$(PREPROCESS) -DSOL bx86unix.cpp | sed -e '/^#.*/d' > bx86-sol.s

bx86-out.s: bx86-cpp.s bx86unix.cpp
	$(PREPROCESS) -DOUT bx86unix.cpp > bx86-out.s

bx86bsdi.s: bx86-cpp.s bx86unix.cpp
	$(PREPROCESS) -DBSDI bx86unix.cpp > bx86bsdi.s

.s.o:
	$(AS) $(ASFLAGS) $(TARGET_MACH) -o $@ $<
