Commit 14e87a68 authored by Andrey Filippov's avatar Andrey Filippov
Browse files

moved sources to src, updated project setup

parent b7e545ac
Loading
Loading
Loading
Loading
+18 −30
Original line number Diff line number Diff line
PROGS      = imgsrv
PHPCLI = exif.php imu_setup.php start_gps_compass.php
CONFIGS  = Exif_template.xml 
# Runs 'make', 'make install', and 'make clean' in specified subdirectories
SUBDIRS := src
INSTALLDIRS = $(SUBDIRS:%=install-%)
CLEANDIRS =   $(SUBDIRS:%=clean-%)

SRCS = imgsrv.c
OBJS = imgsrv.o
#TARGETDIR=$(DESTDIR)/www/pages

INSTALL    = install
INSTMODE   = 0755
INSTDOCS   = 0644
all: $(SUBDIRS)
	@echo "make all top"

OWN = -o root -g root
$(SUBDIRS):
	$(MAKE) -C $@

#CFLAGS   += -Wall -I$(ELPHEL_KERNEL_DIR)/include/uapi/elphel
CFLAGS   += -Wall -I$(STAGING_DIR_HOST)/usr/include-uapi
install: $(INSTALLDIRS)
	@echo "make install top"

SYSCONFDIR = /etc
BINDIR     = /usr/bin
WWW_PAGES  = /www/pages
$(INSTALLDIRS): 
	$(MAKE) -C $(@:install-%=%) install

all: $(PROGS)
clean: $(CLEANDIRS)
	@echo "make clean top"

$(PROGS): $(OBJS)
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
$(CLEANDIRS): 
	$(MAKE) -C $(@:clean-%=%) clean

install: $(PROGS) $(PHPCLI) $(CONFIGS)
	$(INSTALL) $(OWN) -d $(DESTDIR)$(BINDIR)
	$(INSTALL) $(OWN) -d $(DESTDIR)$(SYSCONFDIR)
	$(INSTALL) $(OWN) -d $(DESTDIR)$(WWW_PAGES)
	$(INSTALL) $(OWN) -m $(INSTMODE) $(PROGS)   $(DESTDIR)$(BINDIR)
	$(INSTALL) $(OWN) -m $(INSTDOCS) $(CONFIGS) $(DESTDIR)$(SYSCONFDIR) 
	$(INSTALL) $(OWN) -m $(INSTMODE) $(PHPCLI)  $(DESTDIR)$(WWW_PAGES) 

clean:
	rm -rf $(PROGS) *.o core

#TODO: implement automatic dependencies!
imgsrv.c:$(STAGING_DIR_HOST)/usr/include-uapi/elphel/x393_devices.h
.PHONY: all install clean $(SUBDIRS) $(INSTALLDIRS) $(CLEANDIRS)
+8 −6

File changed.

Preview size limit exceeded, changes collapsed.

+7 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
			<arguments>
				<dictionary>
					<key>LaunchConfigHandle</key>
					<value>&lt;project&gt;/.externalToolBuilders/bitbake apps-imgsrv -c compile -f.launch</value>
					<value>&lt;project&gt;/.externalToolBuilders/SCP imgsrv to target.launch</value>
				</dictionary>
				<dictionary>
					<key>incclean</key>
@@ -25,10 +25,16 @@
				</dictionary>
			</arguments>
		</buildCommand>
		<buildCommand>
			<name>org.python.pydev.PyDevBuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.cdt.core.cnature</nature>
		<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
		<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
		<nature>org.python.pydev.pythonNature</nature>
	</natures>
</projectDescription>
+0 −0

File moved.

src/Makefile

0 → 100644
+39 −0
Original line number Diff line number Diff line
PROGS      = imgsrv
PHPCLI = exif.php imu_setup.php start_gps_compass.php
CONFIGS  = Exif_template.xml 

SRCS = imgsrv.c
OBJS = imgsrv.o

INSTALL    = install
INSTMODE   = 0755
INSTDOCS   = 0644

OWN = -o root -g root

#CFLAGS   += -Wall -I$(ELPHEL_KERNEL_DIR)/include/uapi/elphel
CFLAGS   += -Wall -I$(STAGING_DIR_HOST)/usr/include-uapi

SYSCONFDIR = /etc
BINDIR     = /usr/bin
WWW_PAGES  = /www/pages

all: $(PROGS)

$(PROGS): $(OBJS)
	$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@

install: $(PROGS) $(PHPCLI) $(CONFIGS)
	$(INSTALL) $(OWN) -d $(DESTDIR)$(BINDIR)
	$(INSTALL) $(OWN) -d $(DESTDIR)$(SYSCONFDIR)
	$(INSTALL) $(OWN) -d $(DESTDIR)$(WWW_PAGES)
	$(INSTALL) $(OWN) -m $(INSTMODE) $(PROGS)   $(DESTDIR)$(BINDIR)
	$(INSTALL) $(OWN) -m $(INSTDOCS) $(CONFIGS) $(DESTDIR)$(SYSCONFDIR) 
	$(INSTALL) $(OWN) -m $(INSTMODE) $(PHPCLI)  $(DESTDIR)$(WWW_PAGES) 

clean:
	rm -rf $(PROGS) *.o core

#TODO: implement automatic dependencies!
imgsrv.c:$(STAGING_DIR_HOST)/usr/include-uapi/elphel/x393_devices.h
	
 No newline at end of file
Loading