This is a question that comes up a lot for folks who are familiar with the idea of co-dependency. Many of us have an idea that we are supposed to "love ourselves before we can love others" and "be the source of our own happiness." We may feel that if this is not happening that we are being "dysfunctional" or "co-dependent." One of the interesting things to me about the re-focus on attachment research in the past decade of psychology has been the re-realization that humans are inherently dependent on others. We are born some of the most vulnerable babies of all species, requiring a full decade if not more of intensive parental involvement. Our brains do not actually finish maturing until halfway through our second decade of life. We have always, and continue to, live in groups or "packs". We use solitary confinement as the worst punishment for the worst humans. So how many of us got this idea that depending on others was bad or pathological seems curious indeed.
I recently encountered a podcast with Dr. Stan Tatkin, a prominent couples therapist and author who utilizes attachment theory as a foundation of his work, which addressed just this issue. Among other things in this interview Dr. Tatkin shows how his model is representative of healthy interdependency versus the pathological idea of co-dependency. It would take several pages for me to summarize his theory on this point and he does a perfectly fine job on his own. So for those reasons rather than try to explain his viewpoint to you I suggest that you listen yourself:
He gets to the topic of codependency around 20 minutes in to the podcast. While you are there you may want to check out other topics in this podcast which specializes on relationships. The podcaster has many excellent guests on his shows and seems to cover a lot of important ground.
And if you are interested in learning more about healthy relationships, as always I also recommend Dr. Tatkin's audio program, Your Brain On Love, as well as his books, Wired For Love and Wired For Dating.
Wishing you happiness in your connections,