AnsweredAssumed Answered

Specific compiler in makefile

Question asked by illishar on Aug 16, 2013
Latest reply on Aug 19, 2013 by illishar

Hello,

 

How do you define a specific compiler in a user space makefile?

 

The overall compiler is sat in menuconfig. Eg. FLAT or FDPIC. But suppose you're compiling your overall system with FLAT and have 1 or two user space programs that you wan't to have in FDPIC? What's the best (official) way to do it?

 

Here's a standard makefile:

 

EXEC = modbus OBJS = main.o io.o Modbus.o ServerFunctions.o EXTRALIBS = -lpthread    all: $(EXEC)   $(EXEC): $(OBJS)           $(CC) $(LDFLAGS) -o $@ $(OBJS) $(EXTRALIBS) $(LDLIBS)   romfs:           $(ROMFSINST) /bin/$(EXEC)           $(ROMFSINST) -e CONFIG_USER_MODBUS -a "console:respawn:/bin/$(EXEC)" /etc/inittab   clean:           -rm -f $(EXEC) *.elf *.elf2flt *.gdb *.o  

Outcomes