Revert edge-home-orchestration-go to specific commit
[platform/core/system/edge-orchestration.git] / libedge-orchestration / Makefile
1 #
2 # Makefile
3 #
4
5 # Target parameters
6 INC_DIR                 := inc
7 LIB_DIR                 := lib
8 SRC_DIR                 := src
9 SAMPLE_DIR              := sample
10 LIBRARY_FILE    := liborchestration-client.so
11 SRC_FILES               := \
12                         $(SRC_DIR)/orchestration_client.c \
13                         $(SRC_DIR)/dbus_consumer.c
14 OBJ_FILES               := *.o
15
16 # Build parameters
17
18
19 default: all
20
21 all: build build-sample
22
23 build-sample: build
24         mkdir -p $(SAMPLE_DIR)/output
25         $(CC) -Wall -fPIE -pie $(SAMPLE_DIR)/main_native.c -o $(SAMPLE_DIR)/output/edge_native -I$(INC_DIR) -L$(LIB_DIR) -lorchestration-client `pkg-config --libs --cflags gio-2.0 gio-unix-2.0 glib-2.0`
26         $(CC) -Wall -fPIE -pie $(SAMPLE_DIR)/main_container.c -o $(SAMPLE_DIR)/output/edge_container -I$(INC_DIR) -L$(LIB_DIR) -lorchestration-client `pkg-config --libs --cflags gio-2.0 gio-unix-2.0 glib-2.0`
27         $(CC) -Wall -fPIE -pie $(SAMPLE_DIR)/main_android.c -o $(SAMPLE_DIR)/output/edge_android -I$(INC_DIR) -L$(LIB_DIR) -lorchestration-client `pkg-config --libs --cflags gio-2.0 gio-unix-2.0 glib-2.0`
28         -rm -f ./sample/*.o
29
30 build:
31         mkdir -p $(LIB_DIR)
32         $(CC) -fPIC -Wall -c -I $(INC_DIR) `pkg-config --libs --cflags gio-2.0 gio-unix-2.0 glib-2.0` $(SRC_FILES)
33         $(CC) -shared -g -Wall -Werror $(OBJ_FILES) -o $(LIB_DIR)/$(LIBRARY_FILE) -I $(INC_DIR)
34         -rm -f $(OBJ_FILES)
35
36 clean:
37         -rm -f $(OBJ_FILES)
38         -rm -f $(LIB_DIR)/$(LIBRARY_FILE)
39
40 .PHONY: build clean
41