-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·58 lines (43 loc) · 1.06 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
56
57
58
#give your OS on the command line :
#make linux
#make mac
#make windows
#OS by default :
OS = LINUX
ifeq ($(OS), WIN32)
GCC = cl.exe /c /EHsc
else
GCC = g++ -c -Wall -m64
endif
.PHONY: linux
linux:
make all OS=LINUX
.PHONY: windows
windows:
make all OS=WIN32
.PHONY: mac
mac:
make all OS=MAC
all: libDeviceManager
libDeviceManager: PluginFactories.obj Device.obj xmlParser.obj DeviceManager.obj
ifeq ($(OS), WIN32)
lib.exe /out:DeviceManager.lib PluginFactories.obj Device.obj xmlParser.obj DeviceManager.obj
#rm -f *~ *.obj
else
ar -cr libDeviceManager.a PluginFactories.o Device.o xmlParser.o DeviceManager.o
#rm -f *~ *.o
endif
PluginFactories.obj: PluginFactories.cpp PluginFactories.h
ifeq ($(OS), LINUX)
$(GCC) -fPIC PluginFactories.cpp
else
$(GCC) PluginFactories.cpp
endif
Device.obj: Device.cpp Device.h
$(GCC) Device.cpp
xmlParser.obj: xmlParser.cpp xmlParser.h
$(GCC) xmlParser.cpp
DeviceManager.obj: DeviceManager.cpp DeviceManager.h
$(GCC) DeviceManager.cpp
clean:
rm -f *~ *.o libDeviceManager.a *.obj DeviceManager.lib