Makefile updates:
Turn on optimization Remove some redundancy in FLAGS
This commit is contained in:
parent
19b790eb53
commit
1b2c01db1b
20 changed files with 14 additions and 30 deletions
2
drivers/Makefile.inc
Normal file
2
drivers/Makefile.inc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
|
||||||
|
BINDIR?=/usr/sbin
|
|
@ -9,6 +9,6 @@ MAN=
|
||||||
|
|
||||||
BINDIR?= /sbin
|
BINDIR?= /sbin
|
||||||
|
|
||||||
CPPFLAGS+= -D_MINIX=1 -D_POSIX_SOURCE=1 -D_SYSTEM=1
|
CPPFLAGS+= -D_SYSTEM=1
|
||||||
|
|
||||||
.include <minix.prog.mk>
|
.include <minix.prog.mk>
|
||||||
|
|
|
@ -100,8 +100,7 @@ PIE_AFLAGS?= -fPIC -DPIC
|
||||||
|
|
||||||
# Helpers for cross-compiling
|
# Helpers for cross-compiling
|
||||||
HOST_CC?= cc
|
HOST_CC?= cc
|
||||||
#XXX: Temporarily disable -O for MINIX
|
HOST_CFLAGS?= -O
|
||||||
#HOST_CFLAGS?= -O
|
|
||||||
HOST_CFLAGS?=
|
HOST_CFLAGS?=
|
||||||
HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} -c
|
HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} -c
|
||||||
HOST_COMPILE.cc?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_CPPFLAGS} -c
|
HOST_COMPILE.cc?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_CPPFLAGS} -c
|
||||||
|
@ -112,8 +111,7 @@ HOST_LINK.c?= ${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
HOST_CXX?= c++
|
HOST_CXX?= c++
|
||||||
#XXX: Temporarily disable -O for MINIX
|
HOST_CXXFLAGS?= -O
|
||||||
#HOST_CXXFLAGS?= -O
|
|
||||||
HOST_CXXFLAGS?=
|
HOST_CXXFLAGS?=
|
||||||
|
|
||||||
HOST_CPP?= cpp
|
HOST_CPP?= cpp
|
||||||
|
|
|
@ -42,8 +42,7 @@ DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload
|
||||||
# see src/doc/HACKS for details
|
# see src/doc/HACKS for details
|
||||||
DBG?= -O1
|
DBG?= -O1
|
||||||
.else
|
.else
|
||||||
#XXX: Temporarily disable -O for MINIX
|
DBG?= -O
|
||||||
#DBG?= -O
|
|
||||||
DBG?=
|
DBG?=
|
||||||
.endif
|
.endif
|
||||||
CFLAGS?= ${DBG}
|
CFLAGS?= ${DBG}
|
||||||
|
|
2
lib/Makefile.inc
Normal file
2
lib/Makefile.inc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
|
||||||
|
AFLAGS+= -D_MINIX -D_POSIX_SOURCE
|
|
@ -8,7 +8,7 @@
|
||||||
# routines are found in libc.a. (The printf and scanf need floating point
|
# routines are found in libc.a. (The printf and scanf need floating point
|
||||||
# for the %f formats, whether you use them or not.)
|
# for the %f formats, whether you use them or not.)
|
||||||
|
|
||||||
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -I${.CURDIR}/../../libc/stdio
|
CPPFLAGS+=-I${.CURDIR}/../../libc/stdio
|
||||||
|
|
||||||
LIB= d
|
LIB= d
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
LIB= e
|
LIB= e
|
||||||
|
|
||||||
AFLAGS+=-O -D_MINIX -D_POSIX_SOURCE -Was-ack
|
AFLAGS+=-Was-ack
|
||||||
|
|
||||||
.include "${.CURDIR}/arch/${ARCH}/em/Makefile.inc"
|
.include "${.CURDIR}/arch/${ARCH}/em/Makefile.inc"
|
||||||
.include "${.CURDIR}/arch/${ARCH}/head/Makefile.inc"
|
.include "${.CURDIR}/arch/${ARCH}/head/Makefile.inc"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
.fc.o:
|
.fc.o:
|
||||||
${_MKTARGET_COMPILE}
|
${_MKTARGET_COMPILE}
|
||||||
cp ${.IMPSRC} tmp.c
|
cp ${.IMPSRC} tmp.c
|
||||||
cc -O -I${.CURDIR} -D_MINIX -D_POSIX_SOURCE -S tmp.c
|
cc -I${.CURDIR} ${CFLAGS} -S tmp.c
|
||||||
sed -f ${.CURDIR}/FP.script tmp.s > ${.PREFIX}.s
|
sed -f ${.CURDIR}/FP.script tmp.s > ${.PREFIX}.s
|
||||||
cc -I${.CURDIR} -c -o ${.TARGET} ${.PREFIX}.s
|
cc -I${.CURDIR} -c -o ${.TARGET} ${.PREFIX}.s
|
||||||
rm -f tmp.c tmp.s ${PREFIX}.s
|
rm -f tmp.c tmp.s ${PREFIX}.s
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Makefile for liby
|
# Makefile for liby
|
||||||
|
|
||||||
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
LIB= y
|
LIB= y
|
||||||
|
|
||||||
SRCS= \
|
SRCS= \
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
.PATH: ${.CURDIR}/${ARCH}
|
.PATH: ${.CURDIR}/${ARCH}
|
||||||
|
|
||||||
AFLAGS+= -O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
SRCS= crtso.S
|
SRCS= crtso.S
|
||||||
OBJS= crtso.o
|
OBJS= crtso.o
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ BZ2DIR= ${MINIXSRCDIR}/commands/bzip2
|
||||||
SRCS= bzlib.c blocksort.c compress.c crctable.c decompress.c \
|
SRCS= bzlib.c blocksort.c compress.c crctable.c decompress.c \
|
||||||
huffman.c randtable.c
|
huffman.c randtable.c
|
||||||
CPPFLAGS+= -I ${BZ2DIR}
|
CPPFLAGS+= -I ${BZ2DIR}
|
||||||
CPPFLAGS+= -O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
INCS= bzlib.h
|
INCS= bzlib.h
|
||||||
INCSDIR= /usr/include
|
INCSDIR= /usr/include
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
LIB= c
|
LIB= c
|
||||||
|
|
||||||
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
.include "${.CURDIR}/ansi/Makefile.inc"
|
.include "${.CURDIR}/ansi/Makefile.inc"
|
||||||
.include "${.CURDIR}/asyn/Makefile.inc"
|
.include "${.CURDIR}/asyn/Makefile.inc"
|
||||||
.include "${.CURDIR}/ip/Makefile.inc"
|
.include "${.CURDIR}/ip/Makefile.inc"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# Makefile for libcurses
|
# Makefile for libcurses
|
||||||
|
|
||||||
LIB= curses
|
LIB= curses
|
||||||
CPPFLAGS+= -O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
SRCS= \
|
SRCS= \
|
||||||
beep.c \
|
beep.c \
|
||||||
|
|
|
@ -19,11 +19,9 @@ LIB= edit
|
||||||
## -DUSE_TERMCAP Use the termcap library for terminal size
|
## -DUSE_TERMCAP Use the termcap library for terminal size
|
||||||
## see LDFLAGS, below, if you set this.
|
## see LDFLAGS, below, if you set this.
|
||||||
## -DNEED_PERROR Don't have (used in testit)
|
## -DNEED_PERROR Don't have (used in testit)
|
||||||
DEFS=-DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT \
|
CPPFLAGS+=-DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT \
|
||||||
-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX
|
-DHIST_SIZE=100 -DUSE_TERMCAP -DSYS_UNIX
|
||||||
|
|
||||||
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE ${DEFS}
|
|
||||||
|
|
||||||
SRCS= editline.c complete.c sysunix.c
|
SRCS= editline.c complete.c sysunix.c
|
||||||
|
|
||||||
.include <minix.lib.mk>
|
.include <minix.lib.mk>
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
LIB= sys
|
LIB= sys
|
||||||
|
|
||||||
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
SRCS= \
|
SRCS= \
|
||||||
alloc_util.c \
|
alloc_util.c \
|
||||||
assert.c \
|
assert.c \
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Makefile for libtimers
|
# Makefile for libtimers
|
||||||
|
|
||||||
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
LIB= timers
|
LIB= timers
|
||||||
|
|
||||||
SRCS= \
|
SRCS= \
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
# Makefile for libutil
|
# Makefile for libutil
|
||||||
|
|
||||||
CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
LIB= util
|
LIB= util
|
||||||
|
|
||||||
SRCS= openpty.c sha2.c efun.c
|
SRCS= openpty.c sha2.c efun.c
|
||||||
|
|
2
servers/Makefile.inc
Normal file
2
servers/Makefile.inc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
|
||||||
|
BINDIR?=/usr/sbin
|
|
@ -10,6 +10,4 @@ MAN=
|
||||||
BINDIR?= /usr/sbin
|
BINDIR?= /usr/sbin
|
||||||
INSTALLFLAGS+= -S 64k
|
INSTALLFLAGS+= -S 64k
|
||||||
|
|
||||||
CPPFLAGS+= -O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
|
|
||||||
.include <minix.prog.mk>
|
.include <minix.prog.mk>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
# Makefile for the kernel image.
|
# Makefile for the kernel image.
|
||||||
|
|
||||||
u=/usr
|
u=/usr
|
||||||
CFLAGS= -O -D_MINIX -D_POSIX_SOURCE
|
|
||||||
MDEC= /usr/mdec
|
MDEC= /usr/mdec
|
||||||
|
|
||||||
# Specify the programs that are part of the system image.
|
# Specify the programs that are part of the system image.
|
||||||
|
|
Loading…
Reference in a new issue