How do I create a single makefile for both 32- and 64-bit?

ARCH := $(shell getconf LONG_BIT)

CPP_FLAGS_32 := -D32_BIT ...  Some 32 specific compiler flags ...
CPP_FLAGS_64 := -D64_BIT

CPP_FLAGS := $(CPP_FLAGS_$(ARCH))  ... all the other flags ...

Try file inclusion. This is not part of the standard Makefile syntax (the one in the Single Unix v3 specification) but is widely supported. With GNU make, this looks like this:

include otherfile

With this, you could have an x86 Makefile like this:

ARCHFLAGS = -m64 -mtune=core2
include common.mk

and a PowerPC Makefile:

ARCHFLAGS = -mcpu=g3
include common.mk

and the bulk of your compilation rules will be in one file (common.mk), using $(ARCHFLAGS) where necessary.