# Makefile for plate_renderer
CC = gcc

##Please choose your mission
#Hayabusa1
CFLAGS = -Wall -O2 -DHYB1
#Hayabusa2 Ryugu ONC-T with distortion
# CFLAGS = -Wall -O2 -DHYB2 -DHYB2ONCT -DRYUGU -DHYB2ONCTDISTORTION
#Hayabusa2 Ryugu ONC-T without distortion
#CFLAGS = -Wall -O2 -DHYB2 -DHYB2ONCT -DRYUGU
#Hayabusa2 Ryugu ONC-W1 without distortion
#CFLAGS = -Wall -O2 -DHYB2 -DHYB2ONCW1 -DRYUGU 
#Hayabusa2 Ryugu ONC-W2 without distortion
# CFLAGS = -Wall -O2 -DHYB2 -DHYB2ONCW2 -DRYUGU
#Hayabusa2 Torifune ONC-T without distortion
# CFLAGS = -Wall -O2 -DHYB2 -DHYB2ONCT -DTORIFUNE
#Hayabusa2 Torifune ONC-W1 without distortion
# CFLAGS = -Wall -O2 -DHYB2 -DHYB2ONCW1 -DTORIFUNE
#Hayabusa2 Torifune ONC-W1 without distortion
# CFLAGS = -Wall -O2 -DHYB2 -DHYB2ONCW2 -DTORIFUNE
#Hayabusa2 Torifune TIR without distortion
# CFLAGS = -Wall -O2 -DHYB2 -DHYB2TIR -DTORIFUNE

LDFLAGS =
INCLUDES = -I $(HOME)/SPICE/cspice/include/ -I /opt/homebrew/include/ 
LIBS = -lm -lcfitsio -L /opt/homebrew/lib/\
        $(HOME)/SPICE/cspice/lib/cspice.a
TARGET = plate_renderer
OBJS = plate_renderer.o plate_renderer_func.o get_cam_info_c.o get_plbore.o hapke.o ONC_getlos_c.o \
        

all: $(TARGET)

$(TARGET): $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

clean:
	-rm -f $(TARGET) $(OBJS)

.c.o:
	$(CC) $(CFLAGS) $(INCLUDES) -c $<

plate_renderer_func.o: plate_renderer.h
plate_renderer.o: plate_renderer.h
