summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-13 02:27:56 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-13 02:28:01 +0200
commit6bc291c0fd3e1760ca4bfeaf33b38cbb4b21830c (patch)
tree887c41ec771a48d3323c9d2a2e0d7f6c86c36736
parentrenamed files to prepare merge of code dirs (diff)
merged app sources to single folder
-rw-r--r--.gitignore19
-rw-r--r--app/Makefile (renamed from server/Makefile)39
-rwxr-xr-xapp/configure (renamed from server/configure)0
-rw-r--r--app/dolmetschctl-client.c (renamed from client/dolmetschctl-client.c)0
-rw-r--r--app/dolmetschctl.c (renamed from server/dolmetschctl.c)0
-rw-r--r--app/midi_client.c (renamed from client/midi_client.c)0
-rw-r--r--app/midi_client.h (renamed from client/midi_client.h)0
-rw-r--r--app/midi_server.c (renamed from server/midi_server.c)0
-rw-r--r--app/midi_server.h (renamed from server/midi_server.h)0
-rw-r--r--app/mixer.c (renamed from server/mixer.c)0
-rw-r--r--app/mixer.h (renamed from server/mixer.h)0
-rw-r--r--app/osc_client.c (renamed from client/osc_client.c)0
-rw-r--r--app/osc_client.h (renamed from client/osc_client.h)0
-rw-r--r--app/osc_server.c (renamed from server/osc_server.c)0
-rw-r--r--app/osc_server.h (renamed from server/osc_server.h)0
-rw-r--r--app/slist.c (renamed from client/slist.c)0
-rw-r--r--app/slist.h (renamed from client/slist.h)0
-rw-r--r--server/slist.c123
-rw-r--r--server/slist.h46
19 files changed, 33 insertions, 194 deletions
diff --git a/.gitignore b/.gitignore
index 8d5f435..c83f3bc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,18 +1,13 @@
contrib/alsa-utils*
contrib/avr-utils
contrib/.spreadavr.prepared
-server/include.mk
-server/dolmetschctl
-server/*.o
-server/*.d
-server/*.d.*
-server/config.h
-client/include.mk
-client/dolmetschctl-client
-client/*.o
-client/*.d
-client/*.d.*
-client/config.h
+app/include.mk
+app/dolmetschctl
+app/dolmetschctl-client
+app/*.o
+app/*.d
+app/*.d.*
+app/config.h
firmware/*.a
firmware/*.o
firmware/*.d
diff --git a/server/Makefile b/app/Makefile
index 2fb8c2d..d1c2af2 100644
--- a/server/Makefile
+++ b/app/Makefile
@@ -24,19 +24,25 @@ ifneq ($(MAKECMDGOALS),distclean)
include include.mk
endif
-EXECUTABLE := dolmetschctl
+EXECUTABLE_SERVER := dolmetschctl
+EXECUTABLE_CLIENT := dolmetschctl-client
-C_OBJS := slist.o \
+C_OBJS_SERVER := slist.o \
osc_server.o \
midi_server.o \
mixer.o \
dolmetschctl.o
-C_SRCS := $(C_OBJS:%.o=%.c)
+C_OBJS_CLIENT := slist.o \
+ osc_client.o \
+ midi_client.o \
+ dolmetschctl-client.o
+
+C_SRCS := $(C_OBJS_SERVER:%.o=%.c) $(C_OBJS_CLIENT:%.o=%.c)
.PHONY: clean distclean install install-bin install-etc uninstall remove remove-bin remove-etc purge
-all: $(EXECUTABLE)
+all: $(EXECUTABLE_SERVER) $(EXECUTABLE_CLIENT)
%.d: %.c
@set -e; rm -f $@; \
@@ -48,14 +54,18 @@ ifneq ($(MAKECMDGOALS),distclean)
-include $(C_SRCS:%.c=%.d)
endif
-$(EXECUTABLE): $(C_OBJS)
- $(CC) $(C_OBJS) -o $@ $(LDFLAGS)
+$(EXECUTABLE_SERVER): $(C_OBJS_SERVER)
+ $(CC) $(C_OBJS_SERVER) -o $@ $(LDFLAGS)
+
+$(EXECUTABLE_CLIENT): $(C_OBJS_CLIENT)
+ $(CC) $(C_OBJS_CLIENT) -o $@ $(LDFLAGS)
%.o: %.c
$(CC) $(CFLAGS) -c $<
-strip: $(EXECUTABLE)
- $(STRIP) -s $(EXECUTABLE)
+strip: $(EXECUTABLE_SERVER) $(EXECUTABLE_CLIENT)
+ $(STRIP) -s $(EXECUTABLE_SERVER)
+ $(STRIP) -s $(EXECUTABLE_CLIENT)
distclean: clean
@@ -68,16 +78,18 @@ clean:
rm -f *.o
rm -f *.d
rm -f *.d.*
- rm -f $(EXECUTABLE)
+ rm -f $(EXECUTABLE_SERVER)
+ rm -f $(EXECUTABLE_CLIENT)
INSTALL_TARGETS := install-bin install-etc
REMOVE_TARGETS := remove-bin remove-etc
install: all $(INSTALL_TARGETS)
-install-bin: $(EXECUTABLE)
+install-bin: $(EXECUTABLE_SERVER) $(EXECUTABLE_CLIENT)
$(INSTALL) -d $(DESTDIR)$(BINDIR)
- $(INSTALL) -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(EXECUTABLE_SERVER) $(DESTDIR)$(BINDIR)
+ $(INSTALL) -m 755 $(EXECUTABLE_CLIENT) $(DESTDIR)$(BINDIR)
install-etc:
@@ -86,9 +98,10 @@ uninstall: remove
remove: $(REMOVE_TARGETS)
remove-bin:
- rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE)
+ rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE_SERVER)
+ rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE_CLIENT)
remove-etc:
purge: remove
- rm -rf $(DESTDIR)$(ETCDIR)/$(EXECUTABLE)/
+ rm -rf $(DESTDIR)$(ETCDIR)/dolmetschctl/
diff --git a/server/configure b/app/configure
index 9809caa..9809caa 100755
--- a/server/configure
+++ b/app/configure
diff --git a/client/dolmetschctl-client.c b/app/dolmetschctl-client.c
index 9815924..9815924 100644
--- a/client/dolmetschctl-client.c
+++ b/app/dolmetschctl-client.c
diff --git a/server/dolmetschctl.c b/app/dolmetschctl.c
index 3b20cb6..3b20cb6 100644
--- a/server/dolmetschctl.c
+++ b/app/dolmetschctl.c
diff --git a/client/midi_client.c b/app/midi_client.c
index 456ec7d..456ec7d 100644
--- a/client/midi_client.c
+++ b/app/midi_client.c
diff --git a/client/midi_client.h b/app/midi_client.h
index 7ae65bd..7ae65bd 100644
--- a/client/midi_client.h
+++ b/app/midi_client.h
diff --git a/server/midi_server.c b/app/midi_server.c
index dbbf222..dbbf222 100644
--- a/server/midi_server.c
+++ b/app/midi_server.c
diff --git a/server/midi_server.h b/app/midi_server.h
index 537c356..537c356 100644
--- a/server/midi_server.h
+++ b/app/midi_server.h
diff --git a/server/mixer.c b/app/mixer.c
index 54df1b4..54df1b4 100644
--- a/server/mixer.c
+++ b/app/mixer.c
diff --git a/server/mixer.h b/app/mixer.h
index 5d9c666..5d9c666 100644
--- a/server/mixer.h
+++ b/app/mixer.h
diff --git a/client/osc_client.c b/app/osc_client.c
index a70eb67..a70eb67 100644
--- a/client/osc_client.c
+++ b/app/osc_client.c
diff --git a/client/osc_client.h b/app/osc_client.h
index 9d1ad94..9d1ad94 100644
--- a/client/osc_client.h
+++ b/app/osc_client.h
diff --git a/server/osc_server.c b/app/osc_server.c
index 223a192..223a192 100644
--- a/server/osc_server.c
+++ b/app/osc_server.c
diff --git a/server/osc_server.h b/app/osc_server.h
index 40210b3..40210b3 100644
--- a/server/osc_server.h
+++ b/app/osc_server.h
diff --git a/client/slist.c b/app/slist.c
index b10aca7..b10aca7 100644
--- a/client/slist.c
+++ b/app/slist.c
diff --git a/client/slist.h b/app/slist.h
index 70a81b5..70a81b5 100644
--- a/client/slist.h
+++ b/app/slist.h
diff --git a/server/slist.c b/server/slist.c
deleted file mode 100644
index b10aca7..0000000
--- a/server/slist.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * dolmetschctl
- *
- *
- * Copyright (C) 2015 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of dolmetschctl.
- *
- * dolmetschctl is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * dolmetschctl is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with dolmetschctl. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <assert.h>
-
-#include "slist.h"
-
-slist_element_t* slist_get_last(slist_element_t* first)
-{
- if(!first)
- return NULL;
-
- while(first->next_)
- first = first->next_;
-
- return first;
-}
-
-void slist_init(slist_t* lst, void (*delete_element)(void*))
-{
- assert(lst && delete_element);
-
- lst->delete_element = delete_element;
- lst->first_ = NULL;
-}
-
-slist_element_t* slist_add(slist_t* lst, void* data)
-{
- if(!lst || !data)
- return NULL;
-
- slist_element_t* new_element = malloc(sizeof(slist_element_t));
- if(!new_element)
- return NULL;
-
- new_element->data_ = data;
- new_element->next_ = NULL;
-
- if(!lst->first_)
- lst->first_ = new_element;
- else
- slist_get_last(lst->first_)->next_ = new_element;
-
- return new_element;
-}
-
-void slist_remove(slist_t* lst, void* data)
-{
- if(!lst || !lst->first_ || !data)
- return;
-
- slist_element_t* tmp = lst->first_->next_;
- slist_element_t* prev = lst->first_;
- if(lst->first_->data_ == data) {
- lst->first_ = tmp;
- lst->delete_element(prev->data_);
- free(prev);
- }
- else {
- while(tmp) {
- if(tmp->data_ == data) {
- prev->next_ = tmp->next_;
- lst->delete_element(tmp->data_);
- free(tmp);
- return;
- }
- prev = tmp;
- tmp = tmp->next_;
- }
- }
-}
-
-void slist_clear(slist_t* lst)
-{
- if(!lst || !lst->first_)
- return;
-
- do {
- slist_element_t* deletee = lst->first_;
- lst->first_ = lst->first_->next_;
- lst->delete_element(deletee->data_);
- free(deletee);
- }
- while(lst->first_);
-
- lst->first_ = NULL;
-}
-
-int slist_length(slist_t* lst)
-{
- if(!lst || !lst->first_)
- return 0;
-
- int len = 0;
- slist_element_t* tmp;
- for(tmp = lst->first_; tmp; tmp = tmp->next_)
- len++;
-
- return len;
-}
diff --git a/server/slist.h b/server/slist.h
deleted file mode 100644
index 70a81b5..0000000
--- a/server/slist.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * dolmetschctl
- *
- *
- * Copyright (C) 2015 Christian Pointner <equinox@spreadspace.org>
- *
- * This file is part of dolmetschctl.
- *
- * dolmetschctl is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * any later version.
- *
- * dolmetschctl is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with dolmetschctl. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef DOLMETSCHCTL_slist_h_INCLUDED
-#define DOLMETSCHCTL_slist_h_INCLUDED
-
-struct slist_element_struct {
- void* data_;
- struct slist_element_struct* next_;
-};
-typedef struct slist_element_struct slist_element_t;
-
-slist_element_t* slist_get_last(slist_element_t* first);
-
-struct slist_struct {
- void (*delete_element)(void* element);
- slist_element_t* first_;
-};
-typedef struct slist_struct slist_t;
-
-void slist_init(slist_t* lst, void (*delete_element)(void*));
-slist_element_t* slist_add(slist_t* lst, void* data);
-void slist_remove(slist_t* lst, void* data);
-void slist_clear(slist_t* lst);
-int slist_length(slist_t* lst);
-
-#endif