[teklib-general] changeset in /hg/teklib/current: merge
Franciska Schulze
fschulze at neoscientists.org
Mon Dec 10 19:47:47 CET 2007
changeset fac356601d46 in /hg/teklib/current
details: http://teklib.org:8001/hg/teklib/current?cmd=changeset;node=fac356601d46
description:
merge
diffs (truncated from 348 to 300 lines):
diff -r 0f8c57042c46 -r fac356601d46 Makefile
--- a/Makefile Mon Dec 10 19:41:08 2007 +0100
+++ b/Makefile Mon Dec 10 19:41:47 2007 +0100
@@ -6,7 +6,7 @@ PLATFORM ?= linux
help:
@echo
- @echo "Targets ................. TEKLIB=$(TEKLIB) PLATFORM=$(PLATFORM)"
+ @echo "Target TEKLIB=$(TEKLIB) PLATFORM=$(PLATFORM)"
@echo "-----------------------------------------------------------------------------"
@echo "all $(PLATFORM) ............... default build"
@echo "release ................. release build"
@@ -15,138 +15,118 @@ help:
@echo "clean ................... remove executables, modules, object files"
@echo "distclean ............... remove all temporary files"
@echo "make .................... regenerate makefiles"
- @echo
all: $(PLATFORM)
###############################################################################
+# Linux:
$(TEKLIB)/bin/linux/tmkmf:
- at mkdir -p $(TEKLIB)/bin/linux
$(CC) -I$(TEKLIB) -I$(TEKLIB)/src/hal $(TEKLIB)/build/tmkmf.c -pthread -ldl -lm -o $@
-
build/tmk_posix_linux: $(TEKLIB)/bin/linux/tmkmf
$(TEKLIB)/bin/linux/tmkmf -q -r -c posix_linux
-
build/tmk_posix_linux_gcc_release: $(TEKLIB)/bin/linux/tmkmf
$(TEKLIB)/bin/linux/tmkmf -q -r -c posix_linux_gcc_release
+build/tmk_posix_linux_gcc_debug: $(TEKLIB)/bin/linux/tmkmf
+ $(TEKLIB)/bin/linux/tmkmf -q -r -c posix_linux_gcc_debug
+linux: build/tmk_posix_linux
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
+linux_clean: build/tmk_posix_linux
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? clean
+linux_release: build/tmk_posix_linux_gcc_release
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
+linux_install: build/tmk_posix_linux
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? install
+linux_debug: build/tmk_posix_linux_gcc_debug
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
+linux_modules: build/tmk_posix_linux
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? modules
+linux_libs: build/tmk_posix_linux
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? libs
+linux_make: $(TEKLIB)/bin/linux/tmkmf
+ $(TEKLIB)/bin/linux/tmkmf -q -r -c posix_linux
+
+# special targets:
build/tmk_posix_linux_gcc_small: $(TEKLIB)/bin/linux/tmkmf
$(TEKLIB)/bin/linux/tmkmf -q -r -c posix_linux_gcc_small
-
-build/tmk_posix_linux_gcc_debug: $(TEKLIB)/bin/linux/tmkmf
- $(TEKLIB)/bin/linux/tmkmf -q -r -c posix_linux_gcc_debug
-
-linux: build/tmk_posix_linux
- @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
-
-linux_clean: build/tmk_posix_linux
- @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? clean
-
-linux_release: build/tmk_posix_linux_gcc_release
- @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
-
+linux_sources: build/tmk_posix_linux
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? sources
linux_small: build/tmk_posix_linux_gcc_small
@TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
-linux_install: build/tmk_posix_linux
+###############################################################################
+# FreeBSD:
+
+$(TEKLIB)/bin/fbsd/tmkmf:
+ - at mkdir -p $(TEKLIB)/bin/fbsd
+ $(CC) -I$(TEKLIB) -I$(TEKLIB)/src/hal $(TEKLIB)/build/tmkmf.c -export-dynamic -pthread -lm -o $@
+build/tmk_posix_fbsd: $(TEKLIB)/bin/fbsd/tmkmf
+ $(TEKLIB)/bin/fbsd/tmkmf -q -r -c posix_fbsd
+build/tmk_posix_fbsd_gcc_release: $(TEKLIB)/bin/fbsd/tmkmf
+ $(TEKLIB)/bin/fbsd/tmkmf -q -r -c posix_fbsd_gcc_release
+build/tmk_posix_fbsd_gcc_debug: $(TEKLIB)/bin/fbsd/tmkmf
+ $(TEKLIB)/bin/fbsd/tmkmf -q -r -c posix_fbsd_gcc_debug
+fbsd: build/tmk_posix_fbsd
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
+fbsd_clean: build/tmk_posix_fbsd
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? clean
+fbsd_release: build/tmk_posix_fbsd_gcc_release
+ @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
+fbsd_install: build/tmk_posix_fbsd
@TEKLIB=$(TEKLIB) $(MAKE) -s -f $? install
-
-linux_debug: build/tmk_posix_linux_gcc_debug
+fbsd_debug: build/tmk_posix_fbsd_gcc_debug
@TEKLIB=$(TEKLIB) $(MAKE) -s -f $? all
-
-linux_modules: build/tmk_posix_linux
+fbsd_modules: build/tmk_posix_fbsd
@TEKLIB=$(TEKLIB) $(MAKE) -s -f $? modules
-
-linux_libs: build/tmk_posix_linux
+fbsd_libs: build/tmk_posix_fbsd
@TEKLIB=$(TEKLIB) $(MAKE) -s -f $? libs
-
-linux_sources: build/tmk_posix_linux
- @TEKLIB=$(TEKLIB) $(MAKE) -s -f $? sources
-
-linux_make: $(TEKLIB)/bin/linux/tmkmf
- $(TEKLIB)/bin/linux/tmkmf -q -r -c posix_linux
+fbsd_make: $(TEKLIB)/bin/fbsd/tmkmf
+ $(TEKLIB)/bin/fbsd/tmkmf -q -r -c posix_fbsd
###############################################################################
-
-bin/fbsd/tmkmf:
- - at mkdir -p bin/fbsd
- $(CC) -I. -Isrc/hal build/tmkmf.c -export-dynamic -pthread -lm -o $@
-
-build/tmk_posix_fbsd: bin/fbsd/tmkmf
- bin/fbsd/tmkmf -q -r -c posix_fbsd
-
-build/tmk_posix_fbsd_gcc_release: bin/fbsd/tmkmf
- bin/fbsd/tmkmf -q -r -c posix_fbsd_gcc_release
-
-build/tmk_posix_fbsd_gcc_debug: bin/fbsd/tmkmf
- bin/fbsd/tmkmf -q -r -c posix_fbsd_gcc_debug
-
-fbsd: build/tmk_posix_fbsd
- @$(MAKE) -s -f $? all
-
-fbsd_clean: build/tmk_posix_fbsd
- @$(MAKE) -s -f $? clean
-
-fbsd_release: build/tmk_posix_fbsd_gcc_release
- @$(MAKE) -s -f $? all
-
-fbsd_install: build/tmk_posix_fbsd
- @$(MAKE) -s -f $? install
-
-fbsd_debug: build/tmk_posix_fbsd_gcc_debug
- @$(MAKE) -s -f $? all
-
-fbsd_modules: build/tmk_posix_fbsd
- @$(MAKE) -s -f $? modules
-
-fbsd_make: bin/fbsd/tmkmf
- bin/fbsd/tmkmf -q -r -c posix_fbsd
-
-###############################################################################
+# Windows >= NT, MinGW:
bin/winnt/tmkmf:
- at mkdir -p bin/winnt
$(CC) -I. -Isrc/hal build/tmkmf.c -mno-cygwin -lm -lwinmm -o $@
-
build/tmk_winnt_winnt_gcc: bin/winnt/tmkmf
bin/winnt/tmkmf -q -r -c winnt_winnt_gcc
-
build/tmk_winnt_winnt_gcc_release: bin/winnt/tmkmf
bin/winnt/tmkmf -q -r -c winnt_winnt_gcc_release
-
build/tmk_winnt_winnt_gcc_debug: bin/winnt/tmkmf
bin/winnt/tmkmf -q -r -c winnt_winnt_gcc_debug
-
winnt_gcc: build/tmk_winnt_winnt_gcc
@$(MAKE) -s -f $? all
-
winnt_gcc_clean: build/tmk_winnt_winnt_gcc
@$(MAKE) -s -f $? clean
-
winnt_gcc_release: build/tmk_winnt_winnt_gcc_release
@$(MAKE) -s -f $? all
-
winnt_gcc_install: build/tmk_winnt_winnt_gcc
@$(MAKE) -s -f $? install
-
winnt_gcc_debug: build/tmk_winnt_winnt_gcc_debug
@$(MAKE) -s -f $? all
-
winnt_gcc_modules: build/tmk_winnt_winnt_gcc
@$(MAKE) -s -f $? modules
-
winnt_gcc_make: bin/winnt/tmkmf
bin/winnt/tmkmf -q -r -c winnt_winnt_gcc
###############################################################################
+# Common targets on all platforms:
release: $(PLATFORM)_release
install: $(PLATFORM)_install
debug: $(PLATFORM)_debug
clean: $(PLATFORM)_clean
make: $(PLATFORM)_make
-distclean: $(PLATFORM)_clean
+distclean:
-rm -Rf bin lib
-find . -type d | grep "build/obj_" | xargs rm -r
-find . -type f | grep "build/tmk_" | xargs rm
+
+# Special targets, may not be available on all platforms:
+
+small: $(PLATFORM)_small
+sources: $(PLATFORM)_sources
+
diff -r 0f8c57042c46 -r fac356601d46 build/config/posix_fbsd.tmk
--- a/build/config/posix_fbsd.tmk Mon Dec 10 19:41:08 2007 +0100
+++ b/build/config/posix_fbsd.tmk Mon Dec 10 19:41:47 2007 +0100
@@ -31,18 +31,18 @@
#\tAutomatically generated with tmkmf TEKlib Makefile generator
#
- PLATFORM = posix
+ PLATFORM = posix
HOST = fbsd
PARENT = ../
- DEF = -DTEKLIB -DTSYS_POSIX $(EXTRADEFS)
- WARN = -Wall
+ DEF = -DTEKLIB -DTSYS_POSIX $(EXTRADEFS)
+ WARN = -Wall -Wno-unused-parameter
MKDIR = mkdir -p
RM = rm
RMDIR = rm -R
- CC = gcc
+ CC = gcc
AR = ar rcu
LIBPREFIX = lib
@@ -51,7 +51,7 @@
[switch]
[case config="_gcc_release"]
- OPT = -O3 -fomit-frame-pointer
+ OPT = -O2 -fomit-frame-pointer
[/case]
[case config="_gcc_debug"]
OPT = -O1
@@ -63,26 +63,31 @@
[/default]
[/switch]
- VOID = echo -n
+ #
[embed body="help"/]
-[/body]
-
-[body name="paths"]
-
- INCL = -I$(TEKLIB) -I. -I./include -I/usr/X11R6/include
-
+ #
+
+ INCL = -I$(TEKLIB) -I. -I./include
OBJDIR = build/obj_$(HOST)
- LIBDIR = $(TEKLIB)lib/$(HOST)
- BINDIR = $(TEKLIB)bin/$(HOST)
- MODDIR = $(BINDIR)/mod
-
TEKSYSDIR = /usr/local/tek/
MODINSTDIR = $(TEKSYSDIR)mod
- #
-
+ LIBDIR = $(TEKLIB)/lib/$(HOST)
+ BINDIR = $(TEKLIB)/bin/$(HOST)
+ MODDIR = $(BINDIR)/mod
+ SRCDIR = $(TEKLIB)/lib/$(HOST)_src
+
+[/body]
+
+[body name="teklib"]
+[/body]
+
+[body name="paths"]
+[/body]
+
+[body name="misctargets"]
$(BINDIR):
\t-$(MKDIR) $(BINDIR)
$(MODDIR):
@@ -91,7 +96,9 @@
\t-$(MKDIR) $(LIBDIR)
$(OBJDIR):
\t-$(MKDIR) $(OBJDIR)
-
+ $(SRCDIR):
+ \t-$(MKDIR) $(SRCDIR)
+ PHONY:
[/body]
[!---------- libbuild ------------]
@@ -103,7 +110,7 @@
More information about the teklib-general
mailing list