Makefile 601 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
ifeq ($(CC),gcc)
	LFLAGS = -fopenmp 
else
	LFLAGS = 
endif

OBJ_DIR := obi_objdir
LIB_DIR := obi_libdir

OBJ_FILES = $(OBJ_DIR)/*.o
DYN_LIB_FILES = $(LIB_DIR)/libobi3.so

default: $(DYN_LIB_FILES)

$(DYN_LIB_FILES): | $(LIB_DIR)

$(LIB_DIR):
	mkdir -p $(LIB_DIR)

$(OBJ_FILES): | $(OBJ_DIR)

$(OBJ_DIR):
	mkdir -p $(OBJ_DIR)

$(LIB_DIR)/libobi3.so: $(OBJ_FILES)
	$(CC) -shared -o $@ $^

$(OBJ_DIR)/%.o: \

	$(CC) $(LFLAGS) -fpic -c src/libecoPCR/libapat/*.c src/libecoPCR/libthermo/*.c src/libecoPCR/*.c src/libjson/*.c src/*.c src/*.h
	mv *.o $(OBJ_DIR)
	
clean:
	rm -rf $(LIB_DIR)
	rm -rf $(OBJ_DIR)