Author: axel Date: 2010-04-15 10:24:44 +0200 (Thu, 15 Apr 2010) New Revision: 1635
Modified: trunk/batman-experimental/lib/bmx_gsf_map/Makefile Log: batman-experimental/lib/bmx_gsf_map/Makefile fix Makefile
Modified: trunk/batman-experimental/lib/bmx_gsf_map/Makefile =================================================================== --- trunk/batman-experimental/lib/bmx_gsf_map/Makefile 2010-04-15 08:16:16 UTC (rev 1634) +++ trunk/batman-experimental/lib/bmx_gsf_map/Makefile 2010-04-15 08:24:44 UTC (rev 1635) @@ -1,5 +1,38 @@
-PLUGINS = $(shell find -maxdepth 1 -type d | grep -e '^./bmx_' | sort) +CFLAGS += -fpic -pedantic -Wall -W -Wno-unused-parameter -O1 -g3 -std=gnu99 -I../../ +LDFLAGS += -shared +#-Wl,-soname,bmxd_config
-%: - for d in $(PLUGINS); do $(MAKE) -C $$d $@ || echo compiling $$d failed; echo;echo; done +PLUGIN_NAME = bmx_gsf_map +PLUGIN_VER = 1 + +SRC_C = gsf_map.c +SRC_H = gsf_map.h +OBJS= $(SRC_C:.c=.o) + +PLUGIN_FULLNAME = $(PLUGIN_NAME).so.$(PLUGIN_VER) +PLUGIN_SHORTNAME = $(PLUGIN_NAME).so + +LIBDIR = /usr/lib + +all: $(PLUGIN_FULLNAME) Makefile + + +$(PLUGIN_FULLNAME): $(OBJS) Makefile + $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJS) -o $(PLUGIN_FULLNAME) + +%.o: %.c %.h Makefile + $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c $< -o $@ + + +clean: + rm -f *.o *.so.$(PLUGIN_VER) + + +install: all + mkdir -p $(LIBDIR) + install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); /sbin/ldconfig -n $(LIBDIR); ln -f -s $(LIBDIR)/$(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_SHORTNAME) + + +strip: all + strip $(PLUGIN_FULLNAME)