Commit f49906b2 authored by Andrey Filippov's avatar Andrey Filippov

moved sources to src

parent e45e6775
*.o *.o
*.kate-swp
attic/* attic/*
/.project /.project
/.cproject /.cproject
/.pydevproject /.pydevproject
/.externalToolBuilders /.externalToolBuilders
/.settings /.settings
/image
.directory .directory
.depend
generated* generated*
sysroots sysroots
bitbake-logs bitbake-logs
......
PROGS = autocampars launch_php_script # Runs 'make', 'make install', and 'make clean' in specified subdirectories
PHPSCRIPTS = autocampars.php SUBDIRS := src
SRCS = autocampars.c launch_php_script.c INSTALLDIRS = $(SUBDIRS:%=install-%)
#OBJS = $(SRC:.c=.o) CLEANDIRS = $(SUBDIRS:%=clean-%)
OBJS = autocampars.o launch_php_script.o
#TARGETDIR=$(DESTDIR)/www/pages
BINDIR = $(DESTDIR)/usr/bin all: $(SUBDIRS)
SYSCONFDIR = $(DESTDIR)/etc @echo "make all top"
CONFDIR = $(SYSCONFDIR)/elphel393
DOCUMENTROOT = $(DESTDIR)/www/pages
AUTOCAMPARS_PHP = /www/pages/autocampars.php
INSTALL = install $(SUBDIRS):
INSTMODE = 0755 $(MAKE) -C $@
INSTDOCS = 0644
OWN = -o root -g root
INCDIR = $(STAGING_DIR_HOST)/usr/include-uapi install: $(INSTALLDIRS)
#CFLAGS += -Wall -I$(INCDIR) @echo "make install top"
CFLAGS += -Wall -I$(STAGING_DIR_HOST)/usr/include-uapi -D 'AUTOCAMPARS_PHP="$(AUTOCAMPARS_PHP)"'
all: $(PROGS) $(INSTALLDIRS):
$(MAKE) -C $(@:install-%=%) install
#$(PROGS): $(OBJS) clean: $(CLEANDIRS)
# $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ @echo "make clean top"
autocampars: autocampars.o $(CLEANDIRS):
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(MAKE) -C $(@:clean-%=%) clean
@echo "AUTOCAMPARS_PHP=$(AUTOCAMPARS_PHP)"
launch_php_script: launch_php_script.o .PHONY: all install clean $(SUBDIRS) $(INSTALLDIRS) $(CLEANDIRS)
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
install: $(PROGS) $(PHPSCRIPTS)
$(INSTALL) -d $(BINDIR)
$(INSTALL) -d $(DOCUMENTROOT)
$(INSTALL) -d $(SYSCONFDIR)
$(INSTALL) -d $(CONFDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(PROGS) $(BINDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(PHPSCRIPTS) $(DOCUMENTROOT)
clean:
rm -rf $(PROGS) *.o core
configsubs:
PROGS = autocampars launch_php_script
PHPSCRIPTS = autocampars.php
SRCS = autocampars.c launch_php_script.c
#OBJS = $(SRC:.c=.o)
OBJS = autocampars.o launch_php_script.o
BINDIR = $(DESTDIR)/usr/bin
SYSCONFDIR = $(DESTDIR)/etc
CONFDIR = $(SYSCONFDIR)/elphel393
DOCUMENTROOT = $(DESTDIR)/www/pages
AUTOCAMPARS_PHP = /www/pages/autocampars.php
INSTALL = install
INSTMODE = 0755
INSTDOCS = 0644
OWN = -o root -g root
INCDIR = $(STAGING_DIR_HOST)/usr/include-uapi
#CFLAGS += -Wall -I$(INCDIR)
CFLAGS += -Wall -I$(STAGING_DIR_HOST)/usr/include-uapi -D 'AUTOCAMPARS_PHP="$(AUTOCAMPARS_PHP)"'
all: $(PROGS)
#$(PROGS): $(OBJS)
# $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
autocampars: autocampars.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
@echo "AUTOCAMPARS_PHP=$(AUTOCAMPARS_PHP)"
launch_php_script: launch_php_script.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
install: $(PROGS) $(PHPSCRIPTS)
$(INSTALL) -d $(BINDIR)
$(INSTALL) -d $(DOCUMENTROOT)
$(INSTALL) -d $(SYSCONFDIR)
$(INSTALL) -d $(CONFDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(PROGS) $(BINDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(PHPSCRIPTS) $(DOCUMENTROOT)
clean:
rm -rf $(PROGS) *.o core
configsubs:
depend: .depend
.depend: $(SRCS)
rm -f ./.depend
$(CC) $(CFLAGS) -MM $^ > ./.depend;
include .depend
...@@ -432,7 +432,7 @@ function sync2master($timeout=120,$min_frame_master=30) { ...@@ -432,7 +432,7 @@ function sync2master($timeout=120,$min_frame_master=30) {
if (!file_exists('/var/state/APPLICATION') || !file_exists('/var/state/APPLICATION_MODE')) return -1; if (!file_exists('/var/state/APPLICATION') || !file_exists('/var/state/APPLICATION_MODE')) return -1;
$application= file_get_contents('/var/state/APPLICATION'); $application= file_get_contents('/var/state/APPLICATION');
$IP_shift=(file_get_contents('/var/state/APPLICATION_MODE')+0) % 100; // 0 - SINGLE, 1..3 - Eyesis, 101+ Eyesis4pi $IP_shift=(file_get_contents('/var/state/APPLICATION_MODE')+0) % 100; // 0 - SINGLE, 1..3 - Eyesis, 101+ Eyesis4pi, 1001..1003 - E4pi393
if ($application!='EYESIS') return 0; /// not supported yet if ($application!='EYESIS') return 0; /// not supported yet
if ($IP_shift==1) return 0; /// it is the master (101 will also get here) if ($IP_shift==1) return 0; /// it is the master (101 will also get here)
$neteth0=file('/etc/conf.d/net.eth0'); $neteth0=file('/etc/conf.d/net.eth0');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment