PREPROCESS=$(CPP) $(DEFS) $(INCLUDES) $(CPPFLAGS)
SUFFIXES=.s .o
EXTRA_DIST=c-win32.asm c-win32.obj c-win32.uu crypt.pl cx86-cpp.s \
	cx86unix.cpp d-win32.asm d-win32.obj d-win32.uu des-som2.pl \
	des-som3.pl des586.pl des686.pl desboth.pl dx86-cpp.s dx86unix.cpp \
	readme x86ms.pl x86unix.pl

cx86-elf.s: cx86-cpp.s cx86unix.cpp
	$(PREPROCESS) -DELF cx86unix.cpp > cx86-elf.s

cx86-out.s: cx86-cpp.s cx86unix.cpp
	$(PREPROCESS) -DOUT cx86unix.cpp > cx86-out.s

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

cx86bsdi.s: cx86-cpp.s cx86unix.cpp
	$(PREPROCESS) -DELF cx86unix.cpp > cx86bsdi.s

dx86-elf.s: dx86-cpp.s dx86unix.cpp
	$(PREPROCESS) -DELF dx86unix.cpp > dx86-elf.s

dx86-out.s: dx86-cpp.s dx86unix.cpp
	$(PREPROCESS) -DOUT dx86unix.cpp > dx86-out.s

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

dx86bsdi.s: dx86-cpp.s dx86unix.cpp
	$(PREPROCESS) -DELF dx86unix.cpp > dx86bsdi.s

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