summaryrefslogtreecommitdiff
path: root/makefiles
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2009-02-20 14:32:01 +0100
committerAndreas Baumann <abaumann@yahoo.com>2009-02-20 14:32:01 +0100
commit5a88755b1402dc58b2b256f16aa3e50e89d31a07 (patch)
treef25afb33d08ba169c0915df693d2ae2658e144c3 /makefiles
parentbfd42119fdd71b936a8ddec1cdaa566b546224cf (diff)
downloadwolfbones-5a88755b1402dc58b2b256f16aa3e50e89d31a07.tar.gz
wolfbones-5a88755b1402dc58b2b256f16aa3e50e89d31a07.tar.bz2
removed some old stuff (funny flags, SSP libs), cleaned up and synced CPP stuff
Diffstat (limited to 'makefiles')
-rw-r--r--makefiles/compiler.mk32
-rw-r--r--makefiles/dist.mk1
-rw-r--r--makefiles/help.mk16
-rw-r--r--makefiles/sub.mk6
4 files changed, 19 insertions, 36 deletions
diff --git a/makefiles/compiler.mk b/makefiles/compiler.mk
index 6b8c3e9..e6069ab 100644
--- a/makefiles/compiler.mk
+++ b/makefiles/compiler.mk
@@ -7,25 +7,6 @@
# - BIN_OBJS: the object files we need for the binaries (containing the main)
#
-# TODO: sort out if we need so many flags :-)
-# TODO: why don't specify the CFLAGS directly :-)
-# - TODO: handle also -g -O2
-# -DTRACEDEBUG "$(DEBUGLEVEL)" "TRACE
-# -DDEBUG $(DEBUGLEVEL)" "DEBUG"
-# when nothing is defined, define -DNDEBUG (release)
-# TODO: do we use precompiled header files feature of gcc (also -Winvalid-pch)
-
-# debug/tracing flags
-ifeq "$(DEBUGLEVEL)" "TRACE"
-DEBUGLEVELFLAGS=-DTRACEDEBUG -DDEBUG
-else
-ifeq "$(DEBUGLEVEL)" "DEBUG"
-DEBUGLEVELFLAGS=-DDEBUG
-else
-DEBUGLEVELFLAGS=-DNDEBUG
-endif
-endif
-
# -Wswitch-default: not good for switches with enums
# -Wsystem-headers: bad idea, as header files are usually happily broken :-)
# -Wtraditional: we don't want to program tradition K&R C anymore!
@@ -42,6 +23,7 @@ endif
# -Wstack-protector makes no sense without SSP
# everything implied by -Wall is not explicitly specified (gcc 4.2.3)
# TODO: reenable -O2
+# -Waggregate-return: is for K&R code and mostly useless nowadays
# compilation flags and compilers
COMMON_COMPILE_FLAGS = \
@@ -53,7 +35,7 @@ COMMON_COMPILE_FLAGS = \
-Wswitch-enum -Wunknown-pragmas -Wfloat-equal \
-Wundef -Wshadow -Wpointer-arith \
-Wcast-qual -Wcast-align \
- -Wwrite-strings -Waggregate-return \
+ -Wwrite-strings \
-Wmissing-noreturn \
-Wno-multichar -Wparentheses -Wredundant-decls \
-Winline \
@@ -132,7 +114,7 @@ CCPP_COMPILE_FLAGS = \
# gcc 4.x
ifeq "$(GCC_MAJOR_VERSION)" "4"
CCPP_COMPILE_FLAGS += \
- -Wno-invalid-offsetof
+ -Wno-invalid-offsetof -funit-at-a-time
endif
ifeq "$(GCC_MAJOR_VERSION)" "3"
@@ -157,14 +139,14 @@ CC = gcc
CCPP = g++
LDFLAGS = $(INCLUDE_LDFLAGS)
-LIBS = $(LIBS_DL) $(LIBS_SSP) $(INCLUDE_LIBS)
+LIBS = $(INCLUDE_LIBS)
LINK = $(CC)
CCPP_LINK = $(CCPP)
%.o : %.c
$(CC) -c -o $@ $(CFLAGS) $<
-%.o : %.cc
+%.o : %.cpp
$(CCPP) -c -o $@ $(CCPPFLAGS) $<
%$(EXE): %.o $(OBJS)
@@ -176,11 +158,11 @@ CCPP_LINK = $(CCPP)
%$(SO) : %.sho $(OBJS)
$(LINK) -shared -o $@ $(LDFLAGS) $(LIBS) $(OBJS) $<
-%.sho++ : %.cc
+%.sho++ : %.cpp
$(CCPP) -c -o $@ -fPIC -DSHARED $(CCPPFLAGS) $<
%$(SO) : %.sho++ $(OBJS) $(CPPOBJS)
$(CCPP_LINK) -shared -o $@ $(LDFLAGS) $(LIBS) $(OBJS) $(CPPOBJS) $<
BIN_OBJS = $(BINS:$(EXE)=.o)
-
+CPP_BIN_OBJS = $(CPP_BINS:$(EXE)=.o)
diff --git a/makefiles/dist.mk b/makefiles/dist.mk
index 1fe852a..50a4a81 100644
--- a/makefiles/dist.mk
+++ b/makefiles/dist.mk
@@ -18,6 +18,7 @@ dist:
-@cd /tmp/$(PACKAGE_NAME)-$(PACKAGE_VERSION) ; \
$(MAKE) distclean ; \
find . -name .svn -exec rm -rf {} \; ; \
+ find . -name .git -exec rm -rf {} \; ; \
cd .. ; \
tar cvf $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar \
$(PACKAGE_NAME)-$(PACKAGE_VERSION)
diff --git a/makefiles/help.mk b/makefiles/help.mk
index 38f96d9..60b2e94 100644
--- a/makefiles/help.mk
+++ b/makefiles/help.mk
@@ -1,11 +1,11 @@
Available targets:
-make [all] create all artifacts
-make test create test binaries and execute tests
-make doc build the documentation
-make clean clean up build artifacts
-make distclean clean up all generated artifacts
-make install install (set 'DESTDIR' and 'prefix' at will)
-make dist create tarball containing all sources
-make help show this very help page
+make [all] create all artifacts
+make test create test binaries and execute tests
+make doc build the documentation
+make clean clean up build artifacts
+make distclean clean up all generated artifacts
+make install install (set 'DESTDIR' and 'prefix' at will)
+make dist[-Z|-gz|-bz2] create tarball containing all sources
+make help show this very help page
diff --git a/makefiles/sub.mk b/makefiles/sub.mk
index cc4967f..5a5d606 100644
--- a/makefiles/sub.mk
+++ b/makefiles/sub.mk
@@ -12,13 +12,13 @@
-include $(TOPDIR)/makefiles/compiler.mk
.PHONY: all $(SUBDIRS) local_all
-all: local_all $(OBJS) $(CPPOBJS) $(BIN_OBJS) $(BINS) $(CMODULES) $(CPPMODULES)
+all: local_all $(OBJS) $(CPPOBJS) $(BIN_OBJS) $(CPP_BIN_OBJS) $(BINS) $(CPP_BINS) $(CMODULES) $(CPPMODULES)
@test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
(set -e; $(MAKE) -C $$d all || exit 1); done)
.PHONY: test local_test
-test: local_test
- @test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
+test: local_test $(OBJS) $(CPPOBJS) $(BIN_OBJS) $(BINS) $(CPP_BINS) $(CMODULES) $(CPPMODULES)
+ @test -z "$(SUBDIRS)" || ( set -e; for d in $(SUBDIRS)""; do \
(set -e; $(MAKE) -C $$d test || exit 1); done)
-include $(TOPDIR)/makefiles/depend.mk