Hello
I'm learning about how to write Makefiles, and am a bit lost at how to run a command in a target depending on the value of a variable.
What I'm trying to do, is run "strip" only if the user is running a given version of a C compiler.
Here's the code:
Code:
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
#FDPIC ELF binaries can be stripped, but not FLAT binaries
$(if($(CROSS),bfin-linux-uclibc-), \
$(STRIP) $@
;)
Does someone know the correct way to do this?
Thank you.