- 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)
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,36 +0,0 @@ |
1 |
-# $Id$ |
|
2 |
-# |
|
3 |
-# libs makefile |
|
4 |
-# |
|
5 |
-# This makefile multiplexes the original goal to all the libraries listed in |
|
6 |
-# SUBDIRS. |
|
7 |
-# |
|
8 |
- |
|
9 |
- |
|
10 |
-#SUBDIRS=binrpc cds xcap presence shm_regex |
|
11 |
- |
|
12 |
-SUBDIRS=$(filter-out CVS doc $(lib_exclude), $(strip \ |
|
13 |
- $(patsubst %/Makefile,%,$(wildcard */Makefile)))) |
|
14 |
- |
|
15 |
-.PHONY: subdirs $(SUBDIRS) |
|
16 |
- |
|
17 |
-# clean install tags proper |
|
18 |
- |
|
19 |
- |
|
20 |
-# we need sub_goals without 'all' target |
|
21 |
-sub_goals = $(patsubst all,,$(MAKECMDGOALS)) |
|
22 |
- |
|
23 |
-subdirs: $(SUBDIRS) |
|
24 |
- |
|
25 |
-$(SUBDIRS): |
|
26 |
- -@echo "Making $(sub_goals) in $@" ; $(MAKE) $(sub_goals) -C $@ |
|
27 |
- |
|
28 |
-COREPATH=.. |
|
29 |
-include ../Makefile.targets |
|
30 |
- |
|
31 |
-all: subdirs |
|
32 |
- |
|
33 |
-$(clean_targets): subdirs |
|
34 |
- |
|
35 |
-install: subdirs |
|
36 |
- |
- COREPATH must now be always defined because of the longer makefile
include chain.
- make clean, proper, realclean, distclean and maintainer-clean
will work on all the libs in the lib/ directory.
- clean, proper, realclean, distclean and maintainer-clean targets
split into more specific targets: local-clean, clean-modules,
clean-libs, clean-utils (and the same for the others) => make
proper & friends depend now only on the really needed parts =>
much faster.
- doc directories are entered only if a Makefile is present.
- make maintainer-clean properly deletes the config and the
modules list at the end (it doesn't recreate it).
... | ... |
@@ -7,7 +7,10 @@ |
7 | 7 |
# |
8 | 8 |
|
9 | 9 |
|
10 |
-SUBDIRS=binrpc cds xcap presence shm_regex |
|
10 |
+#SUBDIRS=binrpc cds xcap presence shm_regex |
|
11 |
+ |
|
12 |
+SUBDIRS=$(filter-out CVS doc $(lib_exclude), $(strip \ |
|
13 |
+ $(patsubst %/Makefile,%,$(wildcard */Makefile)))) |
|
11 | 14 |
|
12 | 15 |
.PHONY: subdirs $(SUBDIRS) |
13 | 16 |
|
... | ... |
@@ -22,11 +25,11 @@ subdirs: $(SUBDIRS) |
22 | 25 |
$(SUBDIRS): |
23 | 26 |
-@echo "Making $(sub_goals) in $@" ; $(MAKE) $(sub_goals) -C $@ |
24 | 27 |
|
25 |
-all: subdirs |
|
28 |
+include ../Makefile.targets |
|
26 | 29 |
|
27 |
-proper: clean |
|
30 |
+all: subdirs |
|
28 | 31 |
|
29 |
-clean: subdirs |
|
32 |
+$(clean_targets): subdirs |
|
30 | 33 |
|
31 | 34 |
install: subdirs |
32 | 35 |
|
... | ... |
@@ -1,15 +1,11 @@ |
1 |
-# variables to change |
|
1 |
+# $Id$ |
|
2 |
+# |
|
3 |
+# libs makefile |
|
4 |
+# |
|
5 |
+# This makefile multiplexes the original goal to all the libraries listed in |
|
6 |
+# SUBDIRS. |
|
7 |
+# |
|
2 | 8 |
|
3 |
-INCLUDES += -I$(CURDIR) |
|
4 |
-LIBS += -L$(CURDIR)/cds -L$(CURDIR)/qsa |
|
5 |
-DEFS += -Wall |
|
6 |
- |
|
7 |
-#################################### |
|
8 |
-# make rules |
|
9 |
- |
|
10 |
-export LIBS |
|
11 |
-export DEFS |
|
12 |
-export INCLUDES |
|
13 | 9 |
|
14 | 10 |
SUBDIRS=binrpc cds xcap presence |
15 | 11 |
|
... | ... |
@@ -17,10 +13,14 @@ SUBDIRS=binrpc cds xcap presence |
17 | 13 |
|
18 | 14 |
# clean install tags proper |
19 | 15 |
|
20 |
-subdirs: $(SUBDIRS) |
|
16 |
+ |
|
17 |
+# we need sub_goals without 'all' target |
|
18 |
+sub_goals = $(patsubst all,,$(MAKECMDGOALS)) |
|
19 |
+ |
|
20 |
+subdirs: $(SUBDIRS) |
|
21 | 21 |
|
22 | 22 |
$(SUBDIRS): |
23 |
- @echo "Making $(MAKECMDGOALS) in $@" ; $(MAKE) $(MAKECMDGOALS) -C $@ |
|
23 |
+ -@echo "Making $(sub_goals) in $@" ; $(MAKE) $(sub_goals) -C $@ |
|
24 | 24 |
|
25 | 25 |
all: subdirs |
26 | 26 |
|
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,30 @@ |
1 |
+# variables to change |
|
2 |
+ |
|
3 |
+INCLUDES += -I$(CURDIR) |
|
4 |
+LIBS += -L$(CURDIR)/cds -L$(CURDIR)/qsa |
|
5 |
+ |
|
6 |
+#################################### |
|
7 |
+# make rules |
|
8 |
+ |
|
9 |
+export LIBS |
|
10 |
+export INCLUDES |
|
11 |
+ |
|
12 |
+SUBDIRS=cds xcap presence |
|
13 |
+ |
|
14 |
+.PHONY: subdirs $(SUBDIRS) |
|
15 |
+ |
|
16 |
+# clean install tags proper |
|
17 |
+ |
|
18 |
+subdirs: $(SUBDIRS) |
|
19 |
+ |
|
20 |
+$(SUBDIRS): |
|
21 |
+ @echo "Making $(MAKECMDGOALS) in $@" ; $(MAKE) $(MAKECMDGOALS) -C $@ |
|
22 |
+ |
|
23 |
+all: subdirs |
|
24 |
+ |
|
25 |
+proper: clean |
|
26 |
+ |
|
27 |
+clean: subdirs |
|
28 |
+ |
|
29 |
+install: subdirs |
|
30 |
+ |