w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Linking to static library consisting of several libraries and object files using a single header file

Looks to me that your include files may have references to other include files. So, you will need to provide a flag to indicate the location of those include files. I'll suggest providing the location (directory containing all include files) as

INCL_DIR=/include/dir/location

and including it in the compilation phase using the -I flag. For example, your rule for api.o will become

api.o: api.c api.h
        gcc -c $(CFLAGS) -I$(INCL_DIR) $(INCLUDES_FOR_BUNCH_OF_LIBS) $<
-o $@




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.