I am trying to create executables for the following files
Currently, I am making 9 different directories for for each. I would like to make 1 directory but everytime I try it does not work.
CROSS_COMPILE?=
# CROSS_COMPILE used to = arm-arago-linux-gnueabi
LIBDIR_APP_LOADER?=../../../../app_loader/lib
INCDIR_APP_LOADER?=../../../../app_loader/include
BINDIR?=../../bin
CFLAGS+= -Wall -I$(INCDIR_APP_LOADER) -D__DEBUG -O2 -mtune=cortex-a8 -march=armv7-a -std=gnu99
LDFLAGS+=-L$(LIBDIR_APP_LOADER) -lprussdrv -lpthread
OBJDIR=obj
TARGET=$(BINDIR)/calibration_info
_DEPS =
DEPS = $(patsubst %,$(INCDIR_APP_LOADER)/%,$(_DEPS))
_OBJ = calibration_info.o
OBJ = $(patsubst %,$(OBJDIR)/%,$(_OBJ))
$(OBJDIR)/%.o: %.c $(DEPS)
@mkdir -p obj
$(CROSS_COMPILE)gcc $(CFLAGS) -c -o $@ $<
$(TARGET): $(OBJ)
$(CROSS_COMPILE)gcc $(CFLAGS) -o $@ $^ $(LDFLAGS)
.PHONY: clean
clean:
rm -rf $(OBJDIR)/ *~ $(INCDIR_APP_LOADER)/*~ $(TARGET)
The code above is a WORKING makefile to make 1 executable.
I would like to have a makefile that can create 9 executables.
I am pretty new at this; I understand the basics but it would be best for a "Makefile with multiple executables for dummies" guide.
Thank you for your help