#
# These coded instructions, statements, and computer programs are the
# copyrighted works and confidential proprietary information of
# UNISOC Technology (Shanghai), Inc. They may not be modified, copied, reproduced,
# distributed, or disclosed to third parties in any manner, medium, or form,
# in whole or in part, without the prior written consent of UNISOC Technology (Shanghai), Inc.

CFLAGS = -Wall -g -O -fPIC

TARGET = powersavectl
DIR_ROOT = ${SYS_ROOT}/recipe-sysroot
INCLUDE_DIRS=-I ./inc \
             -I$(DIR_ROOT)/usr/include \
             -I$(DIR_ROOT)/usr/include/dbus-1.0 \
             -I$(DIR_ROOT)/usr/lib/dbus-1.0/include \

LIBS = -lrt -ldbus-1 -ldbushelper -ldl
OBJS = powersavectl.o
SRCS = powersavectl.c


all: $(OBJS)
	$(CC) -o $(TARGET) $(OBJS) $(LIBS)

$(OBJS):$(SRCS)
	$(CC) $(CFLAGS) $(INCLUDE_DIRS) -c $^

clean:
	rm -f *.o
	rm -f  $(TARGET)
