While there, allow building 32-bit objects on 64-bit platforms. Effectively implement it on amd64 platforms. Default to 32-bit platforms for portability. (Native objects only)
72 lines
1.4 KiB
Plaintext
72 lines
1.4 KiB
Plaintext
subdirs=arch/amd64,arch/i386
|
|
targets=distcheck.log,printself,printself-static,tests.log
|
|
as=$(CC)
|
|
asflags_force=$(CPPFLAGSF) $(CFLAGSF) -c
|
|
asflags=$(CPPFLAGS) $(CFLAGS)
|
|
cppflags_force=
|
|
cflags_force=-g
|
|
cflags=-W -Wall -O2 -fPIE -D_FORTIFY_SOURCE=2 -fstack-protector
|
|
ldflags=-pie -Wl,-z,relro -Wl,-z,now
|
|
dist=Makefile,distcheck.sh,tests.sh
|
|
mode=i386-debug
|
|
|
|
#modes
|
|
[mode::amd64-debug]
|
|
targets=printself,printself-static,printself32,printself32-static
|
|
|
|
[mode::amd64-release]
|
|
cppflags_force=-DNDEBUG
|
|
cflags_force=
|
|
targets=printself,printself-static,printself32,printself32-static
|
|
|
|
[mode::i386-release]
|
|
cppflags_force=-DNDEBUG
|
|
cflags_force=
|
|
|
|
#targets
|
|
[distcheck.log]
|
|
type=script
|
|
script=./distcheck.sh
|
|
depends=distcheck.sh
|
|
enabled=0
|
|
|
|
[printself]
|
|
type=binary
|
|
sources=printself.S
|
|
|
|
[printself-static]
|
|
type=binary
|
|
ldflags=-static
|
|
sources=printself-static.S
|
|
|
|
[printself32]
|
|
type=binary
|
|
asflags=-m32
|
|
ldflags=-m32
|
|
sources=printself32.S
|
|
|
|
[printself32-static]
|
|
type=binary
|
|
asflags=-m32
|
|
ldflags=-m32 -static
|
|
sources=printself32-static.S
|
|
|
|
[tests.log]
|
|
type=script
|
|
script=./tests.sh
|
|
depends=$(OBJDIR)printself,$(OBJDIR)printself-static,tests.sh
|
|
enabled=0
|
|
|
|
#sources
|
|
[printself.S]
|
|
depends=arch/amd64/printself.S,arch/i386/printself.S
|
|
|
|
[printself-static.S]
|
|
depends=arch/amd64/printself.S,arch/i386/printself.S
|
|
|
|
[printself32.S]
|
|
depends=arch/amd64/printself.S,arch/i386/printself.S
|
|
|
|
[printself32-static.S]
|
|
depends=arch/amd64/printself.S,arch/i386/printself.S
|