Change names of config file and control script
Also make top Makefile more tidy.
This commit is contained in:
parent
a1162d1674
commit
83bd22bef9
6 changed files with 22 additions and 20 deletions
22
Makefile
22
Makefile
|
@ -1,6 +1,6 @@
|
|||
# components
|
||||
MOXERVER = moxerver
|
||||
MOXANIX = moxanix
|
||||
SERVER = moxerver
|
||||
TOOLS = tools
|
||||
|
||||
# ==============================================================================
|
||||
|
||||
|
@ -15,6 +15,8 @@ BIN_PREFIX = /usr
|
|||
# directories used for local component builds
|
||||
BUILDDIR = build.dir
|
||||
INSTALLDIR = install.dir
|
||||
# directory configuration for local component builds
|
||||
DIR_CONFIG = BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR) BIN_PREFIX=$(BIN_PREFIX)
|
||||
|
||||
# ==============================================================================
|
||||
|
||||
|
@ -26,21 +28,21 @@ all: default install
|
|||
|
||||
# default builds components
|
||||
default:
|
||||
cd $(MOXERVER) && make BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR)
|
||||
cd $(MOXANIX) && make BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR)
|
||||
cd $(SERVER) && make $(DIR_CONFIG)
|
||||
cd $(TOOLS) && make $(DIR_CONFIG)
|
||||
|
||||
# install handles component installation
|
||||
install: default
|
||||
mkdir -p $(INSTALL_ROOT)
|
||||
|
||||
cd $(MOXERVER) && make install BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR) BIN_PREFIX=$(BIN_PREFIX)
|
||||
cp -r $(MOXERVER)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
|
||||
cd $(SERVER) && make install $(DIR_CONFIG)
|
||||
cp -r $(SERVER)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
|
||||
|
||||
cd $(MOXANIX) && make install BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR) BIN_PREFIX=$(BIN_PREFIX)
|
||||
cp -r $(MOXANIX)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
|
||||
cd $(TOOLS) && make install $(DIR_CONFIG)
|
||||
cp -r $(TOOLS)/$(INSTALLDIR)/* $(INSTALL_ROOT)/
|
||||
|
||||
# clean removes build and install results
|
||||
clean:
|
||||
cd $(MOXERVER) && make clean BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR)
|
||||
cd $(MOXANIX) && make clean BUILDDIR=$(BUILDDIR) INSTALLDIR=$(INSTALLDIR)
|
||||
cd $(SERVER) && make clean $(DIR_CONFIG)
|
||||
cd $(TOOLS) && make clean $(DIR_CONFIG)
|
||||
-rm -rf $(INSTALL_ROOT)
|
||||
|
|
12
README.md
12
README.md
|
@ -19,19 +19,19 @@ moxerver
|
|||
- allows bidirectional communication
|
||||
- it is expected to run a separate instance for every serial device and TCP port pair
|
||||
|
||||
moxanix.sh
|
||||
----------
|
||||
moxerverctl
|
||||
-----------
|
||||
- starts, stops or displays status for different moxervers
|
||||
- commands can handle one specific or all moxervers at once
|
||||
|
||||
moxanix.cfg
|
||||
-----------
|
||||
moxerver.cfg
|
||||
------------
|
||||
- defines connections between serial devices and TCP ports
|
||||
- each line corresponds to one micro server handling the defined connection
|
||||
|
||||
Build and install
|
||||
=================
|
||||
|
||||
Run "make" to build the project.
|
||||
Run `make` to build the project.
|
||||
The build artifacts can be found in the directory "install.dir" and should be copied from there.
|
||||
If you want to install directly to some directory run "make INSTALL_ROOT=/some/dir".
|
||||
If you want to install directly to some directory run `make INSTALL_ROOT=/some/dir`.
|
||||
|
|
|
@ -40,7 +40,7 @@ $(BUILDDIR)/%.o: %.c
|
|||
mkdir -p $(BUILDDIR)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# target is built from all object files
|
||||
# target binary is built from all object files
|
||||
$(BUILDDIR)/$(TARGET_BINARY): $(OBJECTS)
|
||||
$(CC) $(OBJECTS) $(CFLAGS) -o $@
|
||||
|
||||
|
@ -55,7 +55,7 @@ all: default install
|
|||
# default builds target
|
||||
default: $(BUILDDIR)/$(TARGET_BINARY)
|
||||
|
||||
# install target
|
||||
# install target binary
|
||||
install: default
|
||||
mkdir -p $(INSTALLDIR)/$(BIN_PREFIX)/bin
|
||||
cp $(BUILDDIR)/$(TARGET_BINARY) $(INSTALLDIR)/$(BIN_PREFIX)/bin
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# target names
|
||||
TARGET_CONTROL = moxanix.sh
|
||||
TARGET_CONFIG = moxanix.cfg
|
||||
TARGET_CONTROL = moxerverctl
|
||||
TARGET_CONFIG = moxerver.cfg
|
||||
|
||||
# ==============================================================================
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue