aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-09-28 01:40:09 +0200
committerMattias Andrée <maandree@operamail.com>2014-09-28 01:40:09 +0200
commita36fde37f2adf1579a13707cd64a369683e35ca6 (patch)
tree9bd7d06ce25b5a8278d4e4ae9f6fbdcf39ef5006
parentcompose table: also assume we have the basic modifiers (diff)
downloadmds-a36fde37f2adf1579a13707cd64a369683e35ca6.tar.gz
mds-a36fde37f2adf1579a13707cd64a369683e35ca6.tar.bz2
mds-a36fde37f2adf1579a13707cd64a369683e35ca6.tar.xz
mds-kbdc will need multiple .c files + .h files are not required during linking
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--Makefile17
-rw-r--r--mk/build.mk23
-rw-r--r--src/mds-kbdc/mds-kbdc.c (renamed from src/mds-kbdc.c)0
-rw-r--r--src/mds-kbdc/mds-kbdc.h (renamed from src/mds-kbdc.h)0
4 files changed, 23 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index f599801..ea85be6 100644
--- a/Makefile
+++ b/Makefile
@@ -22,17 +22,22 @@ TOOLS = mds-kbdc
SETUID_SERVERS = mds mds-kkbd mds-vt
-
-OBJ_mds-server_ = mds-server interception-condition client multicast \
- queued-interception globals signals interceptors \
- sending slavery reexec receiving
+# Object files for multi-object file binaries.
+OBJ_mds-server_ = mds-server interception-condition client multicast \
+ queued-interception globals signals interceptors \
+ sending slavery reexec receiving
OBJ_mds-registry_ = mds-registry util globals reexec registry signals \
slave
-OBJ_mds-server = $(foreach O,$(OBJ_mds-server_),obj/mds-server/$(O).o)
-OBJ_mds-registry = $(foreach O,$(OBJ_mds-registry_),obj/mds-registry/$(O).o)
+OBJ_mds-kbdc_ = mds-kbdc
+
+OBJ_mds-server = $(foreach O,$(OBJ_mds-server_),obj/mds-server/$(O).o)
+OBJ_mds-registry = $(foreach O,$(OBJ_mds-registry_),obj/mds-registry/$(O).o)
+OBJ_mds-kbdc = $(foreach O,$(OBJ_mds-kbdc_),obj/mds-kbdc/$(O).o)
+
+# sed:ed .h-source file.
ifneq ($(LIBMDSSERVER_IS_INSTALLED),y)
SEDED = src/libmdsserver/config.h
else
diff --git a/mk/build.mk b/mk/build.mk
index 8e3ef62..d513a73 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -17,9 +17,9 @@ tools: $(foreach T,$(TOOLS),bin/$(T))
# Link large servers.
ifneq ($(LIBMDSSERVER_IS_INSTALLED),y)
-bin/mds-server: $(OBJ_mds-server) obj/mds-base.o src/mds-server/*.h bin/libmdsserver.so $(SEDED)
+bin/mds-server: $(OBJ_mds-server) obj/mds-base.o bin/libmdsserver.so
else
-bin/mds-server: $(OBJ_mds-server) obj/mds-base.o src/mds-server/*.h $(SEDED)
+bin/mds-server: $(OBJ_mds-server) obj/mds-base.o
endif
mkdir -p $(shell dirname $@)
$(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds-server) $(OBJ_mds-server) obj/mds-base.o
@@ -30,9 +30,9 @@ endif
ifneq ($(LIBMDSSERVER_IS_INSTALLED),y)
-bin/mds-registry: $(OBJ_mds-registry) obj/mds-base.o src/mds-registry/*.h bin/libmdsserver.so $(SEDED)
+bin/mds-registry: $(OBJ_mds-registry) obj/mds-base.o bin/libmdsserver.so
else
-bin/mds-registry: $(OBJ_mds-registry) obj/mds-base.o src/mds-registry/*.h $(SEDED)
+bin/mds-registry: $(OBJ_mds-registry) obj/mds-base.o
endif
mkdir -p $(shell dirname $@)
$(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds-registry) $(OBJ_mds-registry) obj/mds-base.o
@@ -41,9 +41,9 @@ endif
# Link small servers.
ifneq ($(LIBMDSSERVER_IS_INSTALLED),y)
-bin/%: obj/%.o obj/mds-base.o bin/libmdsserver.so $(SEDED)
+bin/%: obj/%.o obj/mds-base.o bin/libmdsserver.so
else
-bin/%: obj/%.o obj/mds-base.o $(SEDED)
+bin/%: obj/%.o obj/mds-base.o
endif
mkdir -p $(shell dirname $@)
$(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_$*) $< obj/mds-base.o
@@ -52,9 +52,9 @@ endif
# Link kernel.
ifneq ($(LIBMDSSERVER_IS_INSTALLED),y)
-bin/mds: obj/mds.o bin/libmdsserver.so $(SEDED)
+bin/mds: obj/mds.o bin/libmdsserver.so
else
-bin/mds: obj/mds.o $(SEDED)
+bin/mds: obj/mds.o
endif
mkdir -p $(shell dirname $@)
$(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds) $<
@@ -62,13 +62,14 @@ endif
# Link utilies that do not use mds-base.
+
ifneq ($(LIBMDSSERVER_IS_INSTALLED),y)
-bin/mds-kbdc: obj/mds-kbdc.o bin/libmdsserver.so $(SEDED)
+bin/mds-kbdc: $(OBJ_mds-kbdc) bin/libmdsserver.so
else
-bin/mds-kbdc: obj/mds-kbdc.o $(SEDED)
+bin/mds-kbdc: $(OBJ_mds-kbdc)
endif
mkdir -p $(shell dirname $@)
- $(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds) $<
+ $(CC) $(C_FLAGS) -o $@ $(LDS) $(LDS_mds-kbdc) $(OBJ_mds-kbdc)
# Build object files for kernel/servers.
diff --git a/src/mds-kbdc.c b/src/mds-kbdc/mds-kbdc.c
index 27c9cca..27c9cca 100644
--- a/src/mds-kbdc.c
+++ b/src/mds-kbdc/mds-kbdc.c
diff --git a/src/mds-kbdc.h b/src/mds-kbdc/mds-kbdc.h
index 333a869..333a869 100644
--- a/src/mds-kbdc.h
+++ b/src/mds-kbdc/mds-kbdc.h