Browse files

Repository reorganization part 6

  • Loading branch information...
1 parent c707fff commit 166f22824bc8556165ce2ec3c655661f103bafc2 @mpusz committed Apr 28, 2007
View
4 COPYING
@@ -1,7 +1,7 @@
'freettcn' project is distributed with 2 licence types: GNU GPL and GNU LGPL.
Licences are assigned in following manner:
-- freettcn - GNU GPL - ./compiler/COPYING
-- libfreettcn.so - GNU LGPL - ./lib/COPYING
+- freettcn - GNU GPL - ./freettcn/translator/COPYING
+- libfreettcn.so - GNU LGPL - ./freettcn/lib/COPYING
- libfreettcnenv.so - GNU LGPL - ./libenv/COPYING
- example - GNU GPL - ./example/COPYING
View
109 Makefile
@@ -18,95 +18,62 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#
-# tools
-#
-MAKE = make
-CPP = g++ -g -Wall
-AR = ar -c
-CP = cp
-RM = rm
-SED = sed
-ECHO = echo
-TOUCH = touch
-TAGS = etags --declarations --members
-DOXYGEN = doxygen
-TAR = tar
-
-#
-# directories
-#
-ifndef $(TOP_DIR)
-TOP_DIR = .
-endif
-BIN_DIR = $(TOP_DIR)/bin
-LIB_DIR = $(TOP_DIR)/../lib
+include Makefile.defines
-#
-# varaibles
-#
-MAKEFLAGS += -rR --no-print-directory
-
-ifeq ($(BUILD_VERBOSE),1)
- quiet =
- Q =
-else
- quiet=quiet_
- Q = @
-endif
-
-# If the user is running make -s (silent mode), suppress echoing of commands
-ifneq ($(findstring s,$(MAKEFLAGS)),)
- quiet=silent_
-endif
-
-
-#
-# Command template
-#
-# If quiet is set, only print short version of command
-#
-cmd = @$(if $($(quiet)$(1)),printf "$($(quiet)$(1))\n" &&) $($(1))
-
-
-# start compilation
-quiet_cmd_make = \nBUILD $(2)
- cmd_make = $(MAKE) -C $(2) TOP_DIR=$(TOP_DIR)/.. all
+# directories
+FREETTCN_DIR = freettcn
+ENV_DIR = libenv
+EXAMPLE_DIR = example
+ALL_DIRS = $(FREETTCN_DIR) $(ENV_DIR) $(EXAMPLE_DIR)
-TRANSLATOR_DIR = translator
-LIB_DIR = lib
-ENV_LIB_DIR = libenv
-EXAMPLE_DIR = example
+# dist
+quiet_cmd_dist = DIST $(2)
+ cmd_dist =
# targets
-.PHONY: help translator lib libenv example clean distclean dist
+.PHONY: help freettcn freettcn_install env env_install example clean distclean dist
help:
- @$(ECHO) "'freettcn' project contains 3 basic modules:"
- @$(ECHO) " - TTCN code interpreter + C++ code generator + libfreettcn.so library (TE)"
- @$(ECHO) " - TTCN environment library (TM, TL, CH, CD, SA, PA)"
- @$(ECHO) " - usage example"
@$(ECHO) ""
- @$(ECHO) "Only the first module is necessary to compile "
+ @$(ECHO) "'freettcn' project compilation and instalation needs following steps:"
+ @$(ECHO) ""
+ @$(ECHO) " - make distclean (optional)'"
+ @$(ECHO) " - make freettcn"
+ @$(ECHO) " - su -c 'make freettcn_install'"
+ @$(ECHO) " - make env (optional)"
+ @$(ECHO) " - su -c 'make env_install' (optional)"
+ @$(ECHO) " - make example (optional)"
+ @$(ECHO) ""
+
+freettcn:
+ $(call cmd,cmd_make,$(FREETTCN_DIR))
+
+freettcn_install:
+ $(call cmd,cmd_make_install,$(FREETTCN_DIR))
+
+evn:
+ $(call cmd,cmd_make,$(ENV_DIR))
-translator:
+env_install:
+ $(call cmd,cmd_make_install,$(ENV_DIR))
-lib: translator
- $(call cmd,cmd_make,$(LIB_DIR))
+example:
+ $(call cmd,cmd_make,$(EXAMPLE_DIR))
-libenv: lib
- $(call cmd,cmd_make,$(ENV_LIB_DIR))
+clean:
+ $(foreach dir, $(ALL_DIRS), $(call cmd,cmd_make_clean,$(dir)))
+distclean:
+ $(foreach dir, $(ALL_DIRS), $(call cmd,cmd_make_distclean,$(dir)))
-# all: $(BIN_DIR)/$(PROG_NAME)
+dist:
+ $(call cmd,cmd_dist)
-# main:
-# $(call cmd,cmd_make_main)
# modules:
# $(foreach mod, $(MOD_FILES), $(call cmd,cmd_make_mod))
View
102 Makefile.defines
@@ -0,0 +1,102 @@
+#
+# Copyright (C) 2007 Mateusz Pusz
+#
+# This file is part of freettcn (Free TTCN) project.
+
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+# project name
+PROJECT_NAME = freettcn
+
+# software version
+VERSION_1 = 0
+VERSION_2 = 0
+VERSION_3 = 1
+VERSION = $(VERSION_1).$(VERSION_2).$(VERSION_3)
+
+LIB_FILE_NAME = lib$(PROJECT_NAME)
+
+LIB_FULL_NAME = $(LIB_FILE_NAME).so.$(VERSION)
+
+
+#
+# tools
+#
+MAKE = make
+CPP = g++ -g -Wall
+AR = ar -c
+CP = cp
+RM = rm
+LN = ln
+SED = sed
+ECHO = echo
+TOUCH = touch
+TAGS = etags --declarations --members
+LDCONFIG = ldconfig
+DOXYGEN = doxygen
+TAR = tar
+
+
+#
+# directories
+#
+# ifndef $(TOP_DIR)
+# TOP_DIR = .
+# endif
+
+
+#
+# varaibles
+#
+MAKEFLAGS += -rR --no-print-directory
+
+ifeq ($(BUILD_VERBOSE),1)
+ quiet =
+ Q =
+else
+ quiet=quiet_
+ Q = @
+endif
+
+# If the user is running make -s (silent mode), suppress echoing of commands
+ifneq ($(findstring s,$(MAKEFLAGS)),)
+ quiet=silent_
+endif
+
+
+#
+# Command template
+#
+# If quiet is set, only print short version of command
+#
+cmd = @$(if $($(quiet)$(1)),printf "$($(quiet)$(1))\n" &&) $($(1))
+
+
+# start compilation
+quiet_cmd_make = MAKE $(2)
+ cmd_make = $(MAKE) -C $(2) all
+
+# start instalation
+quiet_cmd_make_install = INSTALL $(2)
+ cmd_make_install = $(MAKE) -C $(2) install
+
+# clean
+quiet_cmd_make_clean = CLEAN $(2)
+ cmd_make_clean = $(MAKE) -C $(2) clean
+
+# distclean
+quiet_cmd_make_distclean = DIST_CLEAN $(2)
+ cmd_make_distclean = $(MAKE) -C $(2) distclean
View
15 README
@@ -1,6 +1,11 @@
+ F R E E T T C N P R O J E C T
+
+
+
Chapter I - Basic information
+-----------------------------
'freettcn' project provides 3 basic modules:
@@ -32,4 +37,12 @@ Chapter I - Basic information
Chapter II - Compilation and instalation
-
+----------------------------------------
+
+'freettcn' project compilation and instalation needs following steps:
+ - make distclean (optional)
+ - make freettcn
+ - su -c 'make freettcn_install'
+ - make env (optional)
+ - su -c 'make env_install' (optional)
+ - make example (optional)
View
94 freettcn/Makefile
@@ -0,0 +1,94 @@
+#
+# Copyright (C) 2007 Mateusz Pusz
+#
+# This file is part of freettcn (Free TTCN) project.
+
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+include ../Makefile.defines
+
+
+#
+# directories
+#
+TRANSLATOR_DIR = translator
+LIB_DIR = lib
+ALL_DIRS = $(LIB_DIR)
+
+
+# targets
+.PHONY: all install clean distclean
+
+all:
+ $(foreach dir, $(ALL_DIRS), $(call cmd,cmd_make,$(dir)))
+
+install:
+ $(foreach dir, $(ALL_DIRS), $(call cmd,cmd_install,$(dir)))
+
+clean:
+ $(foreach dir, $(ALL_DIRS), $(call cmd,cmd_make_clean,$(dir)))
+
+distclean:
+ $(foreach dir, $(ALL_DIRS), $(call cmd,cmd_make_distclean,$(dir)))
+
+dist:
+ $(call cmd,cmd_dist)
+
+
+# modules:
+# $(foreach mod, $(MOD_FILES), $(call cmd,cmd_make_mod))
+
+# $(LIB_DIRS):
+# $(call cmd,cmd_make_lib)
+
+# tags:
+# $(Q)for dir in $(LIB_DIRS); do \
+# $(MAKE) -C $$dir TOP_DIR=$(TOP_DIR)/.. DIR_NAME=$$dir TAG_DIR=$(PWD) tags; \
+# done
+# $(Q)for mod in $(MOD_FILES); do \
+# $(MAKE) -C $(MOD_DIR) TOP_DIR=$(TOP_DIR)/.. MODULE=$$mod tags; \
+# done
+# $(MAKE) -C $(MAIN_DIR) TOP_DIR=$(TOP_DIR)/.. tags;
+
+# doc:
+# $(DOXYGEN) $(DOC_DIR)/Doxyfile
+
+# clobber:
+# $(Q)for dir in $(LIB_DIRS); do \
+# $(MAKE) -C $$dir TOP_DIR=$(TOP_DIR)/.. DIR_NAME=$$dir clobber; \
+# done
+# $(Q)for mod in $(MOD_FILES); do \
+# $(MAKE) -C $(MOD_DIR) TOP_DIR=$(TOP_DIR)/.. MODULE=$$mod clobber; \
+# done
+# $(Q)$(MAKE) -C $(MAIN_DIR) TOP_DIR=$(TOP_DIR)/.. clobber;
+# $(Q)$(RM) -f *~ TAGS BROWSE
+# $(Q)$(RM) -f $(DOC_DIR)/tags.xml $(DOC_DIR)/html
+
+# dist: clobber
+# $(Q)$(TAR) -cvzf $(DIR_NAME).tar.gz ../$(DIR_NAME)
+
+# clean:
+# $(Q)for dir in $(LIB_DIRS); do \
+# $(MAKE) -C $$dir TOP_DIR=$(TOP_DIR)/.. DIR_NAME=$$dir clean; \
+# done
+# $(Q)for mod in $(MOD_FILES); do \
+# $(MAKE) -C $(MOD_DIR) TOP_DIR=$(TOP_DIR)/.. MODULE=$$mod clean; \
+# done
+# $(Q)$(MAKE) -C $(MAIN_DIR) TOP_DIR=$(TOP_DIR)/.. clean;
+
+
+# # rules
+# $(BIN_DIR)/$(PROG_NAME): $(LIB_DIRS) modules main
View
39 freettcn/lib/Makefile
@@ -18,7 +18,44 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-include Makefile.defines
+include ../../Makefile.defines
+
+
+#
+# directories
+#
+TE_DIR = te
+TOOLS_DIR = tools
+BIN_DIR = bin
+#DOC_DIR = doc
+
+
+#
+# Commands
+#
+
+# start library compilation
+quiet_cmd_make_lib = \nBUILD_LIB $(BIN_DIR)/$(LIB_FULL_NAME)
+ cmd_make_lib = $(MAKE) -C $(SRC_DIR) TOP_DIR=$(TOP_DIR)/.. all
+
+# compile source file, create depend file *.d
+quiet_cmd_cc_d_o = CC_D_O $<
+ cmd_cc_d_o = $(CPP) -MMD -MF $*.d_ -c -fPIC $(INCLUDE_DIRS) $< -o $@ && \
+ $(CP) $*.d_ $*.d && \
+ $(SED) -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' -e '/^$$/ d' -e 's/$$/ :/' < $*.d_ >> $*.d && \
+ $(RM) -f $*.d_
+
+# link program
+quiet_cmd_link = LINK $(BIN_DIR)/$(LIB_FULL_NAME)
+ cmd_link = $(CPP) -shared -Wl,-export-dynamic,-soname,$(LIB_FILE_NAME).so.$(VERSION_1) -o $(BIN_DIR)/$(LIB_FULL_NAME) $(O_FILES) && \
+ $(LN) -sf $(PWD)/bin/lib$(LIB_NAME).so.$(VERSION) $(PWD)/bin/lib$(LIB_NAME).so.$(VERSION_1) && \
+ $(LN) -sf $(PWD)/bin/lib$(LIB_NAME).so.$(VERSION_1) $(PWD)/bin/lib$(LIB_NAME).so
+
+# make tags
+quiet_cmd_tags = TAGS
+ cmd_tags = $(TAGS) --append --output=$(TAG_DIR)/TAGS $(LIB_H_FILES_PATH)/*.h $(H_FILES_PATH)/*.h *.cpp
+
+
# targets
.PHONY: all install tags doc clobber dist clean
View
115 freettcn/lib/Makefile.defines
@@ -1,115 +0,0 @@
-#
-# Copyright (C) 2007 Mateusz Pusz
-#
-# This file is part of freettcn (Free TTCN) library.
-
-# This library is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License as published by
-# the Free Software Foundation; either version 2.1 of the License, or
-# (at your option) any later version.
-
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-
-# You should have received a copy of the GNU Lesser General Public License
-# along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-# library name
-LIB_NAME = freettcn
-
-# software version
-VERSION_1 = 0
-VERSION_2 = 0
-VERSION_3 = 1
-VERSION = $(VERSION_1).$(VERSION_2).$(VERSION_3)
-
-LIB_FILE_NAME = lib$(LIB_NAME)
-
-LIB_FULL_NAME = $(LIB_FILE_NAME).so.$(VERSION)
-
-
-#
-# tools
-#
-MAKE = make
-CPP = g++ -g -Wall
-CP = cp
-RM = rm
-LN = ln
-SED = sed
-TAGS = etags #--declarations --members
-LDCONFIG = ldconfig
-DOXYGEN = doxygen
-
-
-#
-# directories
-#
-ifndef $(TOP_DIR)
-TOP_DIR = .
-endif
-SRC_DIR = $(TOP_DIR)/src
-BIN_DIR = $(TOP_DIR)/bin
-DOC_DIR = $(TOP_DIR)/doc
-#DIR_NAME = `pwd | sed 's,.*/,,'`
-
-#BIN_DIR_PATH = $(TOP_DIR)/$(BIN_DIR)
-
-
-#
-# varaibles
-#
-MAKEFLAGS += -rR --no-print-directory
-
-ifeq ($(BUILD_VERBOSE),1)
- quiet =
- Q =
-else
- quiet=quiet_
- Q = @
-endif
-
-# If the user is running make -s (silent mode), suppress echoing of commands
-ifneq ($(findstring s,$(MAKEFLAGS)),)
- quiet=silent_
-endif
-
-
-#
-# Command template
-#
-# If quiet is set, only print short version of command
-#
-cmd = @$(if $($(quiet)$(1)),printf "$($(quiet)$(1))\n" &&) $($(1))
-
-
-
-#
-# Commands
-#
-
-# start library compilation
-quiet_cmd_make_lib = \nBUILD_LIB $(BIN_DIR)/$(LIB_FULL_NAME)
- cmd_make_lib = $(MAKE) -C $(SRC_DIR) TOP_DIR=$(TOP_DIR)/.. all
-
-# compile source file, create depend file *.d
-quiet_cmd_cc_d_o = CC_D_O $<
- cmd_cc_d_o = $(CPP) -MMD -MF $*.d_ -c -fPIC $(INCLUDE_DIRS) $< -o $@ && \
- $(CP) $*.d_ $*.d && \
- $(SED) -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' -e '/^$$/ d' -e 's/$$/ :/' < $*.d_ >> $*.d && \
- $(RM) -f $*.d_
-
-# link program
-quiet_cmd_link = LINK $(BIN_DIR)/$(LIB_FULL_NAME)
- cmd_link = $(CPP) -shared -Wl,-export-dynamic,-soname,$(LIB_FILE_NAME).so.$(VERSION_1) -o $(BIN_DIR)/$(LIB_FULL_NAME) $(O_FILES) && \
- $(LN) -sf $(PWD)/bin/lib$(LIB_NAME).so.$(VERSION) $(PWD)/bin/lib$(LIB_NAME).so.$(VERSION_1) && \
- $(LN) -sf $(PWD)/bin/lib$(LIB_NAME).so.$(VERSION_1) $(PWD)/bin/lib$(LIB_NAME).so
-
-# make tags
-quiet_cmd_tags = TAGS
- cmd_tags = $(TAGS) --append --output=$(TAG_DIR)/TAGS $(LIB_H_FILES_PATH)/*.h $(H_FILES_PATH)/*.h *.cpp
-
View
0 freettcn/lib/ttcn3/include/tci.h → freettcn/lib/include/ttcn3/tci.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_cd_te.h → freettcn/lib/include/ttcn3/tci_cd_te.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_ch_te.h → freettcn/lib/include/ttcn3/tci_ch_te.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_logging.h → freettcn/lib/include/ttcn3/tci_logging.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_te_cd.h → freettcn/lib/include/ttcn3/tci_te_cd.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_te_ch.h → freettcn/lib/include/ttcn3/tci_te_ch.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_te_tm.h → freettcn/lib/include/ttcn3/tci_te_tm.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_tl.h → freettcn/lib/include/ttcn3/tci_tl.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_tm_te.h → freettcn/lib/include/ttcn3/tci_tm_te.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tci_value.h → freettcn/lib/include/ttcn3/tci_value.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tri.h → freettcn/lib/include/ttcn3/tri.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tri_pa_te.h → freettcn/lib/include/ttcn3/tri_pa_te.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tri_sa_te.h → freettcn/lib/include/ttcn3/tri_sa_te.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tri_te_pa.h → freettcn/lib/include/ttcn3/tri_te_pa.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/tri_te_sa.h → freettcn/lib/include/ttcn3/tri_te_sa.h
File renamed without changes.
View
0 freettcn/lib/ttcn3/include/types.h → freettcn/lib/include/ttcn3/types.h
File renamed without changes.

0 comments on commit 166f228

Please sign in to comment.