#
# libpower makefile
#
INC_OSPMD= ../inc
VPATH=$(INC_OSPMD)

# Compile flags
CXXFLAGS= -Wall -I$(INC_OSPMD) -fPIC -DPWR_DEBUG

OBJS=   libpower.o

all: libpower.a

shared: $(OBJS)
	$(CC) -shared -Wl,-soname,libpower.so.1 -o libpower.so.1.0.0 $(OBJS)

# Describe what goes into the library
libpower.a: libpower.a($(OBJS))
	cp libpower.a ../gui

# Describe how to make library components
libpower.o: libpower.h power.h power_private.h

# Clean up and delete library
clean:
	rm -f libpower.a $(OBJS)


#define the rule for generating .o files from .cpp
%.o : %.cpp
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@

