Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
deleted file mode 100644
... ...
@@ -1,17 +0,0 @@
1
-#
2
-# tm module makefile
3
-#
4
-# 
5
-# WARNING: do not run this directly, it should be run by the master Makefile
6
-
7
-include ../../Makefile.defs
8
-auto_gen=
9
-NAME=tm.so
10
-LIBS=
11
-DEFS+= -DSER_MOD_INTERFACE
12
-
13
-ifeq ($(INSTALL_FLAVOUR),kamailio)
14
-DEFS+= -DWITH_EVENT_LOCAL_REQUEST
15
-endif # INSTALL_FLAVOUR
16
-
17
-include ../../Makefile.modules
Browse code

module makefiles - remove SVN id and replace "example" with module name

Olle E. Johansson authored on 16/01/2015 20:48:18
Showing 1 changed files
... ...
@@ -1,6 +1,5 @@
1
-# $Id$
2 1
 #
3
-# example module makefile
2
+# tm module makefile
4 3
 #
5 4
 # 
6 5
 # WARNING: do not run this directly, it should be run by the master Makefile
Browse code

tm: kamailio flavour enables local-request event

- will execute event_route[tm:local-request]
- reported by Alex Balashov

Daniel-Constantin Mierla authored on 20/04/2010 20:06:46
Showing 1 changed files
... ...
@@ -11,4 +11,8 @@ NAME=tm.so
11 11
 LIBS=
12 12
 DEFS+= -DSER_MOD_INTERFACE
13 13
 
14
+ifeq ($(INSTALL_FLAVOUR),kamailio)
15
+DEFS+= -DWITH_EVENT_LOCAL_REQUEST
16
+endif # INSTALL_FLAVOUR
17
+
14 18
 include ../../Makefile.modules
Browse code

tm makefile: declare SER_MOD_INTERFACE

Andrei Pelinescu-Onciul authored on 18/11/2008 00:01:18
Showing 1 changed files
... ...
@@ -9,5 +9,6 @@ include ../../Makefile.defs
9 9
 auto_gen=
10 10
 NAME=tm.so
11 11
 LIBS=
12
+DEFS+= -DSER_MOD_INTERFACE
12 13
 
13 14
 include ../../Makefile.modules
Browse code

- updated all makefiles (now 'cd modules/foo; make' will link with the proper libraries). Please add an "include ../../Makefile.defs" as first line of the local module Makefile if your module is not on the cvs)

Andrei Pelinescu-Onciul authored on 23/05/2003 15:43:44
Showing 1 changed files
... ...
@@ -5,6 +5,7 @@
5 5
 # 
6 6
 # WARNING: do not run this directly, it should be run by the master Makefile
7 7
 
8
+include ../../Makefile.defs
8 9
 auto_gen=
9 10
 NAME=tm.so
10 11
 LIBS=
Browse code

- dialog support added - new functions for sending messages within and outside a dialog - bugfixes - neverending fifo functions split in smaller pieces

Jan Janak authored on 30/04/2003 18:50:58
Showing 1 changed files
... ...
@@ -7,6 +7,6 @@
7 7
 
8 8
 auto_gen=
9 9
 NAME=tm.so
10
-LIBS= 
10
+LIBS=
11 11
 
12 12
 include ../../Makefile.modules
Browse code

- exec compiles now on freebsd 5.0 (wrong header) - lots of Makefile LIBS fixes (use $(LOCALBASE) instead of /usr/local and added -L/usr/pkg/lib where missing, removed old comments)

Andrei Pelinescu-Onciul authored on 18/04/2003 17:58:34
Showing 1 changed files
... ...
@@ -7,6 +7,6 @@
7 7
 
8 8
 auto_gen=
9 9
 NAME=tm.so
10
-LIBS= #-lpthread
10
+LIBS= 
11 11
 
12 12
 include ../../Makefile.modules
Browse code

tm_mod moved back to tm

Jiri Kuthan authored on 28/08/2002 13:19:32
Showing 1 changed files
... ...
@@ -6,7 +6,7 @@
6 6
 # WARNING: do not run this directly, it should be run by the master Makefile
7 7
 
8 8
 auto_gen=
9
-NAME=tm_mod.so
9
+NAME=tm.so
10 10
 LIBS= #-lpthread
11 11
 
12 12
 include ../../Makefile.modules
Browse code

minor delayed clean-ups

Jiri Kuthan authored on 16/08/2002 13:26:15
Showing 1 changed files
... ...
@@ -6,7 +6,7 @@
6 6
 # WARNING: do not run this directly, it should be run by the master Makefile
7 7
 
8 8
 auto_gen=
9
-NAME=tm.so
9
+NAME=tm_mod.so
10 10
 LIBS= #-lpthread
11 11
 
12 12
 include ../../Makefile.modules
Browse code

- updated INSTALL w/ more info on building ser - splited Makefile in Makefile, Makefile.sources, Makefile.defs, Makefile.rules, - added Makefile.modules (included by each an every module) - fixed a warning in textops - updated all module Makefile to use Makefile.modules

Andrei Pelinescu-Onciul authored on 08/12/2001 22:06:27
Showing 1 changed files
... ...
@@ -1,51 +1,12 @@
1 1
 # $Id$
2 2
 #
3
-# print example module makefile
3
+# example module makefile
4 4
 #
5 5
 # 
6 6
 # WARNING: do not run this directly, it should be run by the master Makefile
7 7
 
8 8
 auto_gen=
9
-sources= $(filter-out $(auto_gen), $(wildcard *.c)) $(auto_gen) 
10
-objs= $(sources:.c=.o)
11
-depends= $(sources:.c=.d)
12
-
13 9
 NAME=tm.so
14
-
15
-SHLIB_LD_FLAGS= -shared
16 10
 LIBS= #-lpthread
17
-CFLAGS+= -fPIC -DPIC
18
-
19
-ALLDEP=Makefile ../../Makefile
20
-
21
-ifeq ($(ARCH), SunOS)
22
-LDFLAGS=-O2 -G 
23
-endif
24
-
25
-#implicit rules
26
-%.o:%.c $(ALLDEP)
27
-	$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
28
-
29
-%.d: %.c
30
-	$(MKDEP) $< >$@
31
-
32
-
33
-$(NAME): $(objs)
34
-	$(LD) $(LDFLAGS) $(SHLIB_LD_FLAGS) $(objs) $(LIBS) -o $(NAME)
35
-
36
-
37
-.PHONY: all
38
-all: $(NAME)
39
-
40
-.PHONY: dep
41
-dep: $(depends)
42
-
43
-.PHONY: clean
44
-clean:
45
-	-rm -f $(objs) $(NAME)
46
-
47
-.PHONY: proper
48
-proper: clean
49
-	-rm $(depends)
50 11
 
51
-include $(depends)
12
+include ../../Makefile.modules
Browse code

- removed -DTHREAD from the Makefile - sync'ed the version flags w/ the new compile options - fixed get_hdr_field/TO, Call-ID a.s.o parsing - removed -lpthread from tm's Makefile

Andrei Pelinescu-Onciul authored on 06/12/2001 21:38:14
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ depends= $(sources:.c=.d)
13 13
 NAME=tm.so
14 14
 
15 15
 SHLIB_LD_FLAGS= -shared
16
-LIBS= -lpthread
16
+LIBS= #-lpthread
17 17
 CFLAGS+= -fPIC -DPIC
18 18
 
19 19
 ALLDEP=Makefile ../../Makefile
Browse code

- added -fPIC -DPIC in all the modules Makefiles

Andrei Pelinescu-Onciul authored on 06/12/2001 20:54:54
Showing 1 changed files
... ...
@@ -19,7 +19,7 @@ CFLAGS+= -fPIC -DPIC
19 19
 ALLDEP=Makefile ../../Makefile
20 20
 
21 21
 ifeq ($(ARCH), SunOS)
22
-LDFLAGS=-O2 -G -fPIC -DPIC
22
+LDFLAGS=-O2 -G 
23 23
 endif
24 24
 
25 25
 #implicit rules
Browse code

*** empty log message ***

Andrei Pelinescu-Onciul authored on 05/12/2001 20:43:18
Showing 1 changed files
... ...
@@ -14,11 +14,12 @@ NAME=tm.so
14 14
 
15 15
 SHLIB_LD_FLAGS= -shared
16 16
 LIBS= -lpthread
17
+CFLAGS+= -fPIC -DPIC
17 18
 
18 19
 ALLDEP=Makefile ../../Makefile
19 20
 
20 21
 ifeq ($(ARCH), SunOS)
21
-LDFLAGS=-O2 -G
22
+LDFLAGS=-O2 -G -fPIC -DPIC
22 23
 endif
23 24
 
24 25
 #implicit rules
Browse code

- fixed branch parsed bug (parse_via) - added module dependecy to master Makefile (modules/*/Makefile)

Andrei Pelinescu-Onciul authored on 04/12/2001 00:29:18
Showing 1 changed files
... ...
@@ -15,6 +15,8 @@ NAME=tm.so
15 15
 SHLIB_LD_FLAGS= -shared
16 16
 LIBS= -lpthread
17 17
 
18
+ALLDEP=Makefile ../../Makefile
19
+
18 20
 ifeq ($(ARCH), SunOS)
19 21
 LDFLAGS=-O2 -G
20 22
 endif
Browse code

*** empty log message ***

Bogdan-Andrei Iancu authored on 02/12/2001 18:33:25
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ depends= $(sources:.c=.d)
13 13
 NAME=tm.so
14 14
 
15 15
 SHLIB_LD_FLAGS= -shared
16
-LIBS= #-lpthread
16
+LIBS= -lpthread
17 17
 
18 18
 ifeq ($(ARCH), SunOS)
19 19
 LDFLAGS=-O2 -G
Browse code

- small but essential fixes

Andrei Pelinescu-Onciul authored on 30/11/2001 01:03:02
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ depends= $(sources:.c=.d)
13 13
 NAME=tm.so
14 14
 
15 15
 SHLIB_LD_FLAGS= -shared
16
-LIBS= -lpthread
16
+LIBS= #-lpthread
17 17
 
18 18
 ifeq ($(ARCH), SunOS)
19 19
 LDFLAGS=-O2 -G
Browse code

minor fixes

Jiri Kuthan authored on 29/11/2001 00:32:49
Showing 1 changed files
... ...
@@ -12,7 +12,7 @@ depends= $(sources:.c=.d)
12 12
 
13 13
 NAME=tm.so
14 14
 
15
-LDFLAGS=-O2 -shared
15
+SHLIB_LD_FLAGS= -shared
16 16
 LIBS= -lpthread
17 17
 
18 18
 ifeq ($(ARCH), SunOS)
... ...
@@ -28,7 +28,7 @@ endif
28 28
 
29 29
 
30 30
 $(NAME): $(objs)
31
-	$(LD) $(LDFLAGS) $(objs) $(LIBS) -o $(NAME)
31
+	$(LD) $(LDFLAGS) $(SHLIB_LD_FLAGS) $(objs) $(LIBS) -o $(NAME)
32 32
 
33 33
 
34 34
 .PHONY: all
Browse code

*** empty log message ***

Bogdan-Andrei Iancu authored on 27/11/2001 16:50:28
Showing 1 changed files
... ...
@@ -39,7 +39,7 @@ dep: $(depends)
39 39
 
40 40
 .PHONY: clean
41 41
 clean:
42
-	-rm $(objs) $(NAME)
42
+	-rm -f $(objs) $(NAME)
43 43
 
44 44
 .PHONY: proper
45 45
 proper: clean
Browse code

Functions for handling timer lists has been tested and debugged :-)) Bogdan

Bogdan-Andrei Iancu authored on 26/11/2001 20:49:23
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ depends= $(sources:.c=.d)
13 13
 NAME=tm.so
14 14
 
15 15
 LDFLAGS=-O2 -shared
16
-LIBS=
16
+LIBS= -lpthread
17 17
 
18 18
 ifeq ($(ARCH), SunOS)
19 19
 LDFLAGS=-O2 -G
Browse code

- fixed makefile

Andrei Pelinescu-Onciul authored on 23/11/2001 03:10:03
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@
7 7
 
8 8
 auto_gen=
9 9
 sources= $(filter-out $(auto_gen), $(wildcard *.c)) $(auto_gen) 
10
-objs= msg_cloner.o tm.o #$(sources:.c=.o)
10
+objs= $(sources:.c=.o)
11 11
 depends= $(sources:.c=.d)
12 12
 
13 13
 NAME=tm.so
Browse code

- added test tm module (for *cloner)

Andrei Pelinescu-Onciul authored on 23/11/2001 03:06:59
Showing 1 changed files
... ...
@@ -1,29 +1,16 @@
1
-#common
2
-CC=gcc
3
-LD=gcc
4
-CFLAGS=-O2 -Wcast-align $(PROFILE) -Winline#-Wmissing-prototypes
5
-LDFLAGS=-Wl,-O2 -Wl,-E $(PROFILE)
6
-LEX=flex
7
-YACC=bison
8
-YACC_FLAGS=-d -b cfg
9
-# on linux and freebsd keep it empty (e.g. LIBS= )
10
-# on solaris add -lxnet (e.g. LIBS= -lxnet)
11
-LIBS=-lfl -ldl
12
-
13
-MKDEP=gcc -M
14
-
15
-ALLDEP=Makefile
16
-
17
-DEFS=-DFAKED_PARSER
1
+# $Id$
2
+#
3
+# print example module makefile
4
+#
5
+# 
6
+# WARNING: do not run this directly, it should be run by the master Makefile
18 7
 
19 8
 auto_gen=
20
-sources= $(filter-out $(auto_gen), $(wildcard *.c)) $(auto_gen)
21
-objs= $(sources:.c=.o)
9
+sources= $(filter-out $(auto_gen), $(wildcard *.c)) $(auto_gen) 
10
+objs= msg_cloner.o tm.o #$(sources:.c=.o)
22 11
 depends= $(sources:.c=.d)
23 12
 
24
-NAME=tm
25
-
26
-ALLDEP=Makefile
13
+NAME=tm.so
27 14
 
28 15
 LDFLAGS=-O2 -shared
29 16
 LIBS=
... ...
@@ -50,8 +37,12 @@ all: $(NAME)
50 37
 .PHONY: dep
51 38
 dep: $(depends)
52 39
 
40
+.PHONY: clean
53 41
 clean:
54
-	rm -f *.o
55
-	rm -f tm
42
+	-rm $(objs) $(NAME)
56 43
 
44
+.PHONY: proper
45
+proper: clean
46
+	-rm $(depends)
57 47
 
48
+include $(depends)
Browse code

we use now three semaphore sets for transaction timers, retransmission timers and hash table entries

Jiri Kuthan authored on 22/11/2001 07:59:14
Showing 1 changed files
... ...
@@ -14,6 +14,8 @@ MKDEP=gcc -M
14 14
 
15 15
 ALLDEP=Makefile
16 16
 
17
+DEFS=-DFAKED_PARSER
18
+
17 19
 auto_gen=
18 20
 sources= $(filter-out $(auto_gen), $(wildcard *.c)) $(auto_gen)
19 21
 objs= $(sources:.c=.o)
Browse code

some clean up!!

Bogdan-Andrei Iancu authored on 21/11/2001 18:55:59
Showing 1 changed files
... ...
@@ -47,3 +47,9 @@ all: $(NAME)
47 47
 
48 48
 .PHONY: dep
49 49
 dep: $(depends)
50
+
51
+clean:
52
+	rm -f *.o
53
+	rm -f tm
54
+
55
+
Browse code

more automated Makefile; to be replaced by ser Makefiles later

Jiri Kuthan authored on 20/11/2001 01:56:05
Showing 1 changed files
... ...
@@ -1,26 +1,49 @@
1
-CC		= g++
2
-cc		= gcc
3
-CCFLAGS 	= -c
4
-TABLE_DIR          = table
5
-INCLUDE 	= -include $(TABLE_DIR)/h_table.h
6
-LIBS		= -lpthread
1
+#common
2
+CC=gcc
3
+LD=gcc
4
+CFLAGS=-O2 -Wcast-align $(PROFILE) -Winline#-Wmissing-prototypes
5
+LDFLAGS=-Wl,-O2 -Wl,-E $(PROFILE)
6
+LEX=flex
7
+YACC=bison
8
+YACC_FLAGS=-d -b cfg
9
+# on linux and freebsd keep it empty (e.g. LIBS= )
10
+# on solaris add -lxnet (e.g. LIBS= -lxnet)
11
+LIBS=-lfl -ldl
7 12
 
8
-all: build link
13
+MKDEP=gcc -M
9 14
 
10
-build:  $(TABLE_DIR)/table.o  tm.o
15
+ALLDEP=Makefile
11 16
 
12
-link:  tm
17
+auto_gen=
18
+sources= $(filter-out $(auto_gen), $(wildcard *.c)) $(auto_gen)
19
+objs= $(sources:.c=.o)
20
+depends= $(sources:.c=.d)
13 21
 
14
-$(TABLE_DIR)/table.o: Makefile $(TABLE_DIR)/hash_func.c $(TABLE_DIR)/h_table.c $(TABLE_DIR)/h_table.h $(TABLE_DIR)/semaphore.c $(TABLE_DIR)/timer.c
15
-	$(cc)  $(CCFLAGS)  $(TABLE_DIR)/h_table.c -o $@
22
+NAME=tm
16 23
 
17
-tm.o: Makefile tm.c
18
-	$(cc)  $(CCFLAGS)  $(INCLUDE) tm.c -o $@
24
+ALLDEP=Makefile
19 25
 
20
-tm: Makefile tm.o $(TABLE_DIR)/table.o
21
-	$(cc)  tm.o $(TABLE_DIR)/table.o $(LIBS)  -o $@
26
+LDFLAGS=-O2 -shared
27
+LIBS=
22 28
 
23
-clean:
24
-	rm -f  $(TABLE_DIR)/*.o || return 0
25
-	rm -f  *.o || return 0
26
-	rm -f tm  || return 0
29
+ifeq ($(ARCH), SunOS)
30
+LDFLAGS=-O2 -G
31
+endif
32
+
33
+#implicit rules
34
+%.o:%.c $(ALLDEP)
35
+	$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
36
+
37
+%.d: %.c
38
+	$(MKDEP) $< >$@
39
+
40
+
41
+$(NAME): $(objs)
42
+	$(LD) $(LDFLAGS) $(objs) $(LIBS) -o $(NAME)
43
+
44
+
45
+.PHONY: all
46
+all: $(NAME)
47
+
48
+.PHONY: dep
49
+dep: $(depends)
Browse code

initial CVS checkin of t-management

Jiri Kuthan authored on 18/11/2001 22:34:39
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,26 @@
1
+CC		= g++
2
+cc		= gcc
3
+CCFLAGS 	= -c
4
+TABLE_DIR          = table
5
+INCLUDE 	= -include $(TABLE_DIR)/h_table.h
6
+LIBS		= -lpthread
7
+
8
+all: build link
9
+
10
+build:  $(TABLE_DIR)/table.o  tm.o
11
+
12
+link:  tm
13
+
14
+$(TABLE_DIR)/table.o: Makefile $(TABLE_DIR)/hash_func.c $(TABLE_DIR)/h_table.c $(TABLE_DIR)/h_table.h $(TABLE_DIR)/semaphore.c $(TABLE_DIR)/timer.c
15
+	$(cc)  $(CCFLAGS)  $(TABLE_DIR)/h_table.c -o $@
16
+
17
+tm.o: Makefile tm.c
18
+	$(cc)  $(CCFLAGS)  $(INCLUDE) tm.c -o $@
19
+
20
+tm: Makefile tm.o $(TABLE_DIR)/table.o
21
+	$(cc)  tm.o $(TABLE_DIR)/table.o $(LIBS)  -o $@
22
+
23
+clean:
24
+	rm -f  $(TABLE_DIR)/*.o || return 0
25
+	rm -f  *.o || return 0
26
+	rm -f tm  || return 0