-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (23 loc) · 879 Bytes
/
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
VISIBILITY?=default
CFLAGS=-dynamiclib -fPIC -Wall -Werror -Wextra -pedantic -fvisibility=$(VISIBILITY) $^
slides:
@mdp -icf README.md
version:
@$(CC) --version
@$(CXX) --version
example1c.dylib: c/example1.c
$(CC) -dynamiclib -fPIC $^ -o o/liblibrary_$(VISIBILITY)_$(notdir $(CC))_$@
main: c/main.c
$(CC) $^ -o o/$@
user.dylib: c/user.c
$(CC) $(CFLAGS) -o o/$@
example2c.dylib: c/example2.c
$(CC) $(CFLAGS) -o o/liblibrary_$(VISIBILITY)_$(notdir $(CC))_$@
example2cpp.dylib: c/example2.cpp
$(CXX) $(CFLAGS) -o o/liblibrary_$(VISIBILITY)_$(notdir $(CXX))_$@
example3cpp.dylib: c/example3.cpp
$(CXX) $(CFLAGS) -o o/liblibrary_$(VISIBILITY)_$(notdir $(CXX))_$@
example4cpp.dylib: c/example4.cpp
$(CXX) $(CFLAGS) -o o/liblibrary_$(VISIBILITY)_$(notdir $(CXX))_$@
example5c.dylib: c/example5.c
$(CC) $(CFLAGS) -o o/liblibrary_$(VISIBILITY)_$(notdir $(CC))_$@