-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
55 lines (48 loc) · 1.99 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# The simplest way to compile x3c on MinGW, Linux, Mac OS X or Unix is:
#
# 1. `cd' to the directory containing the file of 'Makefile'.
# 2. Type `make' to compile C++ plugins.
# The program binaries files are outputed to './build/plugins'.
#
# 3. Type `make all python' to compile C++ plugins and swig projects.
# The swig projects binaries files are outputed to './build/python'.
#
# 4. You can remove the program object files from the source code
# directory by typing `make clean'.
# Type `make touch' can change the modification time of files to the current time.
#
# Readme about variables: https://github.com/rhcad/x3py/wiki/MakeVars
#
ROOTDIR =.
include $(ROOTDIR)/config.mk
SWIGS =python perl5 java csharp ruby php lua r
CLEANSWIGS =$(addsuffix .clean, $(SWIGS))
.PHONY: source clean cleanall touch py $(SWIGS)
#==============================================================================
# The default build target.
#==============================================================================
all: source
source:
@test -d $(INSTALL_DIR) || mkdir $(INSTALL_DIR)
@test -d $(PLUGINS_DIR) || mkdir $(PLUGINS_DIR)
@$(MAKE) -C source
py: python
$(SWIGS):
@test -d $(INSTALL_DIR) || mkdir $(INSTALL_DIR)
@export SWIG_TYPE=$@; $(MAKE) -C source swig
#==============================================================================
# Clean up the targets built by 'make all'.
# Type `make touch' can change the modification time of files to the current time.
#==============================================================================
clean:
@export clean=1; $(MAKE) -C source clean
cleanall:
@export cleanall=1; $(MAKE) clean
touch:
touch -c *
@export touch=1; $(MAKE) clean
#==============================================================================
# Type `make python.clean' to clean up the targets built by 'make python'.
#==============================================================================
$(CLEANSWIGS):
@export SWIG_TYPE=$(basename $@); export cleanall=1; $(MAKE) clean