INCLUDES += hal ../include/%.h: ./hal/%.h cp $^ $@ HALLIBSRCS := hal/hal_lib.c $(ULAPISRCS) $(call TOOBJSDEPS, $(HALLIBSRCS)): EXTRAFLAGS += -fPIC USERSRCS += $(HALLIBSRCS) HALLIB := ../lib/liblinuxcnchal.so $(HALLIB).0: $(call TOOBJS, $(HALLIBSRCS)) $(ECHO) Creating shared library $(notdir $@) @mkdir -p ../lib @rm -f $@ $(Q)$(CC) $(LDFLAGS) -Wl,-soname,$(notdir $@) -shared -o $@ $^ HALMODULESRCS := hal/halmodule.cc PYSRCS += $(HALMODULESRCS) HALMODULE := ../lib/python/_hal.so $(HALMODULE): $(call TOOBJS, $(HALMODULESRCS)) $(HALLIB) $(ECHO) Linking python module $(notdir $@) $(Q)$(CXX) $(LDFLAGS) -shared -o $@ $^ TARGETS += $(HALLIB) ../lib/liblinuxcnchal.so.0 PYTARGETS += $(HALMODULE)