OSDN Git Service

Modification for VER0.1.0
[lib1stclass/main.git] / Makefile
1 all: lib1stclass.a libb1stclass.so lib1stclass_cxx.a lib1stclass_cxx.so t/test
2
3 lib1stclass_cxx.a: host2ip_cxx.o is_num_cxx.o remove_path_cxx.o remove_special_char_cxx.o rmkdir_cxx.o 1stclass.hpp safe_strcat_cxx.o safe_strncat_cxx.o shmf_cxx.o itoa_cxx.o reverse_char_cxx.o
4         ar rvs lib1stclass_cxx.a host2ip_cxx.o is_num_cxx.o remove_path_cxx.o remove_special_char_cxx.o rmkdir_cxx.o safe_strcat_cxx.o safe_strncat_cxx.o shmf_cxx.o itoa_cxx.o reverse_char_cxx.o
5         ranlib lib1stclass_cxx.a;
6
7 lib1stclass_cxx.so: host2ip_cxx.o is_num_cxx.o remove_path_cxx.o remove_special_char_cxx.o rmkdir_cxx.o 1stclass.hpp safe_strcat_cxx.o safe_strncat_cxx.o shmf_cxx.o reverse_char_cxx.o
8         g++ -shared -fPIC -o lib1stclass_cxx.so host2ip_cxx.o is_num_cxx.o remove_path_cxx.o remove_special_char_cxx.o rmkdir_cxx.o safe_strcat_cxx.o safe_strncat_cxx.o shmf_cxx.o reverse_char_cxx.o
9
10 lib1stclass.a: host2ip.o rmkdir.o safe_strcat.o safe_strncat.o is_num.o itoa.o remove_path.o remove_special_char.o shmf.o reverse_char.o 1stclass.h
11         ar rvs lib1stclass.a host2ip.o itoa.o rmkdir.o safe_strcat.o safe_strncat.o is_num.o remove_path.o remove_special_char.o shmf.o reverse_char.o
12         ranlib lib1stclass.a;
13
14 libb1stclass.so: host2ip.o rmkdir.o safe_strcat.o safe_strncat.o is_num.o itoa.o remove_path.o remove_special_char.o shmf.o reverse_char.o 1stclass.h
15         g++ -shared -fPIC -o lib1stclass.so host2ip.o itoa.o rmkdir.o safe_strcat.o safe_strncat.o is_num.o remove_path.o remove_special_char.o shmf.o reverse_char.o
16
17 host2ip.o: host2ip.c
18         gcc -Wall -c host2ip.c;
19
20 host2ip_cxx.o: host2ip.c
21         g++ -Wall -o host2ip_cxx.o -c host2ip.c;
22
23 is_num.o: is_num.c
24         gcc -Wall -c is_num.c;
25
26 is_num_cxx.o: is_num.c
27         g++ -Wall -o is_num_cxx.o -c is_num.c;
28
29 itoa.o: itoa.c
30         gcc -Wall -c itoa.c
31
32 itoa_cxx.o: itoa.c
33         g++ -Wall -o itoa_cxx.o -c itoa.c
34
35 reverse_char.o: reverse_char.c;
36         gcc -Wall -c reverse_char.c;
37
38 reverse_char_cxx.o: reverse_char.c;
39         g++ -Wall -o reverse_char_cxx.o -c reverse_char.c;
40
41 remove_special_char.o: remove_special_char.c;
42         gcc -Wall -c remove_special_char.c;
43
44 remove_special_char_cxx.o: remove_special_char.c;
45         g++ -Wall -o remove_special_char_cxx.o -c remove_special_char.c;
46
47 remove_path.o: remove_path.c
48         gcc -Wall -c remove_path.c;
49
50 remove_path_cxx.o: remove_path.c
51         g++ -Wall -o remove_path_cxx.o -c remove_path.c;
52
53 rmkdir.o: rmkdir.c
54         gcc -Wall -c rmkdir.c;
55
56 rmkdir_cxx.o: rmkdir.c
57         g++ -Wall -o rmkdir_cxx.o -c rmkdir.c;
58
59 safe_strcat.o: safe_strcat.c
60         gcc -Wall -c safe_strcat.c;
61
62 safe_strcat_cxx.o: safe_strcat.c
63         g++ -Wall -o safe_strcat_cxx.o -c safe_strcat.c;
64
65 safe_strncat.o: safe_strncat.c
66         gcc -Wall -c safe_strncat.c;
67
68 safe_strncat_cxx.o: safe_strncat.c
69         g++ -Wall -o safe_strncat_cxx.o -c safe_strncat.c;
70
71 shmf.o: shmf.c
72         gcc -Wall -c shmf.c;
73
74 shmf_cxx.o: shmf.c
75         g++ -Wall -o shmf_cxx.o -c shmf.c;
76
77 t/test: t/test.cpp lib1stclass_cxx.a lib1stclass.a;
78         g++ -Wall -o t/test.o -c t/test.cpp;
79         g++ -o t/test t/test.o lib1stclass_cxx.a lib1stclass.a;
80         chmod 755 t/test;
81
82
83 install:
84         mkdir -p /usr/local/lib;
85         cp lib1stclass.a /usr/local/lib;
86         cp lib1stclass.so /usr/local/lib;
87         cp lib1stclass_cxx.a /usr/local/lib;
88         cp lib1stclass_cxx.so /usr/local/lib;
89         cp 1stclass.h /usr/local/include;
90         cp 1stclass.hpp /usr/local/include;
91         perl add_version.pl;
92
93 clean:
94         rm *.o -f *.o;
95         rm *.a -f *.a;
96         rm *.so -f *.so;
97         rm t/test -f test;
98         rm t/*.o -f t/*.o
99
100 real_clean:
101         rm t/*~ -f t/*~;
102         rm *~ -f *~;
103         rm *.o -f *.o;
104         rm *.a -f *.a;
105         rm *.so -f *.so;
106         rm t/test -f test;
107         rm t/*.o -f t/*.o
108
109 test:
110         t/test;
111
112 dist:
113         perl add_version.pl --release;