make it compile on f14
[pcucontrol.git] / pcucontrol / models / intelamt / Makefile
1 CC = g++
2 LIBTOOL = libtool
3 ARCH := $(shell uname -m | sed 's/i.86/i386/')
4 X64FLAGS = -Wlong-long -Wformat -Wpointer-arith
5 CFLAGS = -Dlinux  -Wall -Wno-deprecated
6 SSL = -DWITH_OPENSSL
7
8 ifeq ($(ARCH),x86_64)
9         FLAGS = $(CFLAGS) $(X64FLAGS) $(SSL)
10 else
11         FLAGS = $(CFLAGS) $(SSL)
12 endif
13
14 CFLAGS = -Dlinux  -Wall -Wno-deprecated $(SSL)
15 GSOAP_PATH = ./
16 GSOAP_CODE = ./
17 INC_PATH = ./Include
18 SRC_PATH = ./
19 INCLUDE = -I$(GSOAP_PATH)  -I$(INC_PATH)  -I$(GSOAP_CODE)
20 SRCS = $(GSOAP_CODE)/soapClient.cpp $(GSOAP_CODE)/soapC.cpp $(GSOAP_PATH)/stdsoap2.cpp $(GSOAP_PATH)/httpDigest.cpp $(GSOAP_PATH)/digcalc.cpp RemoteControlSample.cpp 
21 OBJS = $(SRCS:.cpp=.o) Utils.o 
22 LIBS = -lssl -lcrypto
23 APPNAME = remoteControl
24 WSDL2H = $(GSOAP_PATH)/wsdl2h
25 SOAPCPP = $(GSOAP_PATH)/soapcpp2
26 all: clean $(APPNAME)
27
28 $(APPNAME): $(OBJS)   
29         $(LIBTOOL) --mode=link $(CC) $(FLAGS) $(INCLUDE) -o $(APPNAME) $(OBJS) $(LIBS)       
30
31 Utils.o: $(SRC_PATH)/Utils.cpp 
32         $(CC) $(CFLAGS) $(INCLUDE) -c $(SRC_PATH)/Utils.cpp -o Utils.o      
33
34 %.o: %.cpp
35         $(CC) $(FLAGS) $(INCLUDE) -c $< -o $@ 
36
37 clean:
38         rm -f $(OBJS) $(APPNAME) *~
39         rm -rf .libs
40         #dos2unix *.h
41         #dos2unix *.cpp
42         #dos2unix README
43         #dos2unix Makefile