/[baselayout]/trunk/src/Makefile
Gentoo

Diff of /trunk/src/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2592 Revision 2593
62ifeq ($(OS),Linux) 62ifeq ($(OS),Linux)
63LDLIBS_RC = -ldl 63LDLIBS_RC = -ldl
64LDLIBS_RS = -ldl 64LDLIBS_RS = -ldl
65# Shouldn't need this, but it's the easiest workaround for silly 65# Shouldn't need this, but it's the easiest workaround for silly
66# Linux headers that don't work with -std=c99 66# Linux headers that don't work with -std=c99
67override CFLAGS += -D_GNU_SOURCE 67override CPPFLAGS += -D_GNU_SOURCE
68endif 68endif
69ifeq ($(OS),BSD) 69ifeq ($(OS),BSD)
70override LDLIBS += -lkvm 70override LDLIBS += -lkvm
71endif 71endif
72 72
73HAVE_PAM = 73HAVE_PAM =
74ifdef HAVE_PAM 74ifdef HAVE_PAM
75CFLAGS_SSD = -DHAVE_PAM 75CPPFLAGS_SSD = -DHAVE_PAM
76LDLIBS_SSD = -lpam 76LDLIBS_SSD = -lpam
77endif 77endif
78 78
79# We also define _BSD_SOURCE so both Linux and the BSDs get a few 79# We also define _BSD_SOURCE so both Linux and the BSDs get a few
80# handy functions which makes our lives a lot easier 80# handy functions which makes our lives a lot easier
81override CFLAGS += -DLIB=\"$(LIB)\" 81override CPPFLAGS += -DLIB=\"$(LIB)\"
82 82
83# IMPORTANT!!! 83# IMPORTANT!!!
84# Remove this when releasing as it's a security risk 84# Remove this when releasing as it's a security risk
85# However, this does save us using libtool when we're testing 85# However, this does save us using libtool when we're testing
86# NOTE: The toplevel Makefile for baselayout will automatically 86# NOTE: The toplevel Makefile for baselayout will automatically
87# disable then when doing `make dist` 87# disable then when doing `make dist`
88ifneq ($(wildcard .svn),)
88override LDFLAGS += -Wl,-rpath . 89override LDFLAGS += -Wl,-rpath .
90endif
89 91
90all: $(TARGET) 92all: $(TARGET)
91 93
92$(LIBEINFOOBJS): CFLAGS += -fPIC 94$(LIBEINFOOBJS): CFLAGS += -fPIC
93$(LIBEINFOSO): LDLIBS = 95$(LIBEINFOSO): LDLIBS =
116rc: $(LIBEINFOSO) $(LIBRCSO) rc-plugin.o rc.o 118rc: $(LIBEINFOSO) $(LIBRCSO) rc-plugin.o rc.o
117 119
118runscript: LDLIBS += $(LDLIBS_RS) 120runscript: LDLIBS += $(LDLIBS_RS)
119runscript: $(LIBEINFOSO) $(LIBRCSO) rc-plugin.o runscript.o 121runscript: $(LIBEINFOSO) $(LIBRCSO) rc-plugin.o runscript.o
120 122
121start-stop-daemon: CFLAGS += $(CFLAGS_SSD) 123start-stop-daemon: CPPFLAGS += $(CPPFLAGS_SSD)
122start-stop-daemon: LDLIBS += $(LDLIBS_SSD) 124start-stop-daemon: LDLIBS += $(LDLIBS_SSD)
123start-stop-daemon: $(LIBEINFOSO) $(LIBRCSO) start-stop-daemon.o 125start-stop-daemon: $(LIBEINFOSO) $(LIBRCSO) start-stop-daemon.o
124 126
125links: rc 127links: rc
126 for x in $(RCLINKS) $(RCPRIVLINKS); do ln -sf rc $$x; done 128 for x in $(RCLINKS) $(RCPRIVLINKS); do ln -sf rc $$x; done

Legend:
Removed from v.2592  
changed lines
  Added in v.2593

  ViewVC Help
Powered by ViewVC 1.1.20