mirror of
https://github.com/eddyem/SBIG_340.git
synced 2026-03-22 01:31:22 +03:00
add logging, heater period, max exptime
This commit is contained in:
43
Makefile
43
Makefile
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user