]> Zhao Yanbai Git Server - minix.git/commitdiff
Makefile updates:
authorArun Thomas <arun@minix3.org>
Fri, 11 Jun 2010 16:05:36 +0000 (16:05 +0000)
committerArun Thomas <arun@minix3.org>
Fri, 11 Jun 2010 16:05:36 +0000 (16:05 +0000)
Turn on optimization
Remove some redundancy in FLAGS

20 files changed:
drivers/Makefile.inc [new file with mode: 0644]
drivers/readclock/Makefile
etc/mk/minix.sys.mk
etc/mk/sys.mk
lib/Makefile.inc [new file with mode: 0644]
lib/ack/libd/Makefile
lib/ack/libe/Makefile
lib/ack/libfp/Makefile
lib/ack/liby/Makefile
lib/csu/Makefile
lib/libbz2/Makefile
lib/libc/Makefile
lib/libcurses/Makefile
lib/libedit/Makefile
lib/libsys/Makefile
lib/libtimers/Makefile
lib/libutil/Makefile
servers/Makefile.inc [new file with mode: 0644]
servers/init/Makefile
tools/Makefile

diff --git a/drivers/Makefile.inc b/drivers/Makefile.inc
new file mode 100644 (file)
index 0000000..7d3ec05
--- /dev/null
@@ -0,0 +1,2 @@
+CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
+BINDIR?=/usr/sbin
index 2096f36159b2bae551e64eb023e31a100863d9b1..65f85dd9b6bf32206fcd8a1aba0e17a9392c1c4b 100644 (file)
@@ -9,6 +9,6 @@ MAN=
 
 BINDIR?= /sbin
 
-CPPFLAGS+= -D_MINIX=1 -D_POSIX_SOURCE=1 -D_SYSTEM=1
+CPPFLAGS+= -D_SYSTEM=1
 
 .include <minix.prog.mk>
index e7f096b95f9f406d0930ee719e6dfe023051cf75..e36cea11bf0d06aa4f9928271b196a7d1e7cd47c 100644 (file)
@@ -100,8 +100,7 @@ PIE_AFLAGS?=            -fPIC -DPIC
 
 # Helpers for cross-compiling
 HOST_CC?=      cc
-#XXX: Temporarily disable -O for MINIX
-#HOST_CFLAGS?= -O
+HOST_CFLAGS?=  -O
 HOST_CFLAGS?=
 HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${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
 
 HOST_CXX?=     c++
-#XXX: Temporarily disable -O for MINIX
-#HOST_CXXFLAGS?=       -O
+HOST_CXXFLAGS?=        -O
 HOST_CXXFLAGS?=
 
 HOST_CPP?=     cpp
index 5cc42e252291299fd369e546044bf376a506f749..415725b276e0198bb07143917da497f3bd0f38e1 100644 (file)
@@ -42,8 +42,7 @@ DBG?= -O1 -fgcse -fstrength-reduce -fgcse-after-reload
 # see src/doc/HACKS for details
 DBG?=  -O1
 .else
-#XXX: Temporarily disable -O for MINIX
-#DBG?= -O
+DBG?=  -O
 DBG?=
 .endif
 CFLAGS?=       ${DBG}
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
new file mode 100644 (file)
index 0000000..2f01bf5
--- /dev/null
@@ -0,0 +1,2 @@
+CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
+AFLAGS+= -D_MINIX -D_POSIX_SOURCE
index 25e3bf67617155fbefdfb3206876bdf251a65446..5777203cd6020b3934ca5025b08f90489b491077 100644 (file)
@@ -8,7 +8,7 @@
 # routines are found in libc.a.  (The printf and scanf need floating point
 # 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
 
index 458f61571faf88cc1aaebac774c100e3a738ad84..a79e19ad3619380dd5fdb1c54f1535a5a3743700 100644 (file)
@@ -4,7 +4,7 @@
 
 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}/head/Makefile.inc"
index 2425876b7ec52bd2a07eba5c3f4118964f49659e..d55950c8e61384672a9739de629ef2c09293d255 100644 (file)
@@ -6,7 +6,7 @@
 .fc.o:
        ${_MKTARGET_COMPILE}
        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
        cc -I${.CURDIR} -c -o ${.TARGET} ${.PREFIX}.s
        rm  -f tmp.c tmp.s ${PREFIX}.s
index d51374343ca6119114454f8e981df76d09713a27..50503383ee65d929e88b41fa1ebc37ca162d3f91 100644 (file)
@@ -1,7 +1,5 @@
 # Makefile for liby
 
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
-
 LIB=   y
 
 SRCS=  \
index 038865eda74d3dd426698257ad965501b7d2bce7..b6abdb2237f9512d941d0c9cdd700ded974b2529 100644 (file)
@@ -2,8 +2,6 @@
 
 .PATH: ${.CURDIR}/${ARCH}
 
-AFLAGS+=       -O -D_MINIX -D_POSIX_SOURCE
-
 SRCS=  crtso.S
 OBJS=  crtso.o
 
index ec9c188a4cfc807e6adcf206648e4e8e51e72c57..5673753e17fbd4ec503e4234df050d7f58b60ffa 100644 (file)
@@ -7,7 +7,6 @@ BZ2DIR=         ${MINIXSRCDIR}/commands/bzip2
 SRCS=          bzlib.c blocksort.c compress.c crctable.c decompress.c \
                huffman.c randtable.c
 CPPFLAGS+=     -I ${BZ2DIR}
-CPPFLAGS+=     -O -D_MINIX -D_POSIX_SOURCE
 INCS=          bzlib.h
 INCSDIR=       /usr/include
 
index 1227c3d35f98fb821611e294fdff62bce9372b88..5590fbc1f3710ca0ab5fe80968f2e527d1fd2fe0 100644 (file)
@@ -4,8 +4,6 @@
 
 LIB=           c
 
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
-
 .include "${.CURDIR}/ansi/Makefile.inc"
 .include "${.CURDIR}/asyn/Makefile.inc"
 .include "${.CURDIR}/ip/Makefile.inc"
index fc4a23219bc2b993f92181395fab33ba3778c6d0..0bd8367a2f1d714000c0b1d229ff4f51533cb440 100644 (file)
@@ -1,7 +1,6 @@
 # Makefile for libcurses
 
 LIB=           curses
-CPPFLAGS+=     -O -D_MINIX -D_POSIX_SOURCE
 
 SRCS=  \
        beep.c \
index 57f833760dab8973e00e71aaa20e049202c80894..d069392b69f3a1be8665fa718d93392b3ef948d0 100644 (file)
@@ -19,11 +19,9 @@ LIB=         edit
 ##     -DUSE_TERMCAP           Use the termcap library for terminal size
 ##                             see LDFLAGS, below, if you set this.
 ##     -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
 
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE ${DEFS}
-
 SRCS=  editline.c complete.c sysunix.c
 
 .include <minix.lib.mk>
index af2221a030ee6cab18f3a4a65a9f27e9295a424a..11207c132c58a6d8453218134ea0f09ba41ee62c 100644 (file)
@@ -2,8 +2,6 @@
 
 LIB=           sys
 
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
-
 SRCS=  \
        alloc_util.c \
        assert.c \
index 1fbc03c3bebdc9ff3b90ae11548eca7885928d4c..5fee62830910231845602785c119ce242ff50531 100644 (file)
@@ -1,7 +1,5 @@
 # Makefile for libtimers
 
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
-
 LIB=   timers
 
 SRCS=  \
index e06878d9975db6b64597a5135107e10b9ecbb9eb..49d77f3bc0ee0e83069496eaad9a47ced3d365ca 100644 (file)
@@ -1,7 +1,5 @@
 # Makefile for libutil
 
-CPPFLAGS+=-O -D_MINIX -D_POSIX_SOURCE
-
 LIB=   util
 
 SRCS=  openpty.c sha2.c efun.c
diff --git a/servers/Makefile.inc b/servers/Makefile.inc
new file mode 100644 (file)
index 0000000..7d3ec05
--- /dev/null
@@ -0,0 +1,2 @@
+CPPFLAGS+= -D_MINIX -D_POSIX_SOURCE
+BINDIR?=/usr/sbin
index 278765a48c9cd6181ec7c7e38c031301ee0c99df..7f4a4dd7880f06fbdc87140f2be204a783c25cae 100644 (file)
@@ -10,6 +10,4 @@ MAN=
 BINDIR?= /usr/sbin
 INSTALLFLAGS+= -S 64k
 
-CPPFLAGS+= -O -D_MINIX -D_POSIX_SOURCE
-
 .include <minix.prog.mk>
index 5669102c05b73b44732c86f99a5fd3e9dbfd7638..0496c8a00f5c4a0167c7bf449bf9f25f3930a7a0 100644 (file)
@@ -1,7 +1,6 @@
 # Makefile for the kernel image.
 
 u=/usr
-CFLAGS=        -O -D_MINIX -D_POSIX_SOURCE
 MDEC=  /usr/mdec
 
 # Specify the programs that are part of the system image.