add logging, heater period, max exptime

This commit is contained in:
eddyem
2017-04-24 12:06:41 +03:00
parent a8c4255f33
commit 5ac8803ca3
11 changed files with 205 additions and 29 deletions

View File

@@ -1,33 +1,56 @@
# run `make DEF=...` to add extra defines
# run `make DEF=...` to add extra defines,
# conditional compile flags:
# NOLIBRAW=1 - not use libraw & libgd
# NOTIFF - not use libtiff
# NOCFITSIO - not use cfitsio
#
LDFLAGS := -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,--discard-all
LDFLAGS += -lm -pthread
LDIMG := $(shell pkg-config --libs libraw) -lgd $(shell pkg-config --libs cfitsio) -ltiff
SRCS := $(wildcard *.c)
LDIMG :=
SRCS := $(wildcard *.c)
DEFINES := $(DEF) -D_GNU_SOURCE -D_XOPEN_SOURCE=1111
#DEFINES += -DEBUG
DEFINES += -DEBUG
CFLAGS += -Wall -Wextra -O2
CFLAGS += $(shell pkg-config --cflags libraw)
OBJS := $(SRCS:%.c=%.o)
CC = gcc
CPP = g++
all : sbig340_standalone sbig340_daemon sbig340_client
TARGETS := sbig340_daemon
ifndef NOLIBRAW
LDIMG += $(shell pkg-config --libs libraw) -lgd
CFLAGS += $(shell pkg-config --cflags libraw)
DEBAYER := debayer.o
DEFINES += -DLIBRAW
endif
ifndef NOTIFF
LDIMG += -ltiff
DEFINES += -DLIBTIFF
endif
ifndef NOCFITSIO
LDIMG += $(shell pkg-config --libs cfitsio)
DEFINES += -DLIBCFITSIO
endif
all : sbig340_daemon sbig340_standalone sbig340_client
debayer.o : debayer.cpp
@echo -e "\t\tG++ debayer"
$(CPP) $(CFLAGS) $(DEFINES) debayer.cpp -c
sbig340_standalone : $(SRCS) debayer.o
sbig340_standalone : $(SRCS) $(DEBAYER)
@echo -e "\t\tBuild standalone"
$(CC) $(CFLAGS) -std=gnu99 $(DEFINES) $(LDFLAGS) $(LDIMG) $(SRCS) debayer.o -o $@
$(CC) $(CFLAGS) -std=gnu99 $(DEFINES) $(LDFLAGS) $(LDIMG) $(SRCS) $(DEBAYER) -o $@
sbig340_daemon : $(SRCS)
@echo -e "\t\tBuild daemon"
$(CC) -DDAEMON $(CFLAGS) -std=gnu99 $(DEFINES) $(LDFLAGS) $(SRCS) -o $@
sbig340_client : $(SRCS) debayer.o
sbig340_client : $(SRCS) $(DEBAYER)
@echo -e "\t\tBuild client"
$(CC) -DCLIENT $(CFLAGS) -std=gnu99 $(DEFINES) $(LDFLAGS) $(LDIMG) $(SRCS) debayer.o -o $@
$(CC) -DCLIENT $(CFLAGS) -std=gnu99 $(DEFINES) $(LDFLAGS) $(LDIMG) $(SRCS) $(DEBAYER) -o $@
clean:
@echo -e "\t\tCLEAN"