511

Makefile variable in C++ source

#mai faking MakefileCC = c++XFILE = icmSFILE = serverCFILE = clientbuild: clean $(CC) $(XFILE).cpp -o $(XFILE) $(CC) ./server/$(SFILE).cpp -o ./server/$(SFILE) $(CC) ./client/$(CFILE).cpp -o ./client/$(CFILE) chmod +x $(XFILE) chmod +x ./server/$(SFILE) chmod +x ./client/$(CFILE)clean: rm -f $(XFILE) rm -f ./server/$(SFILE) rm -f ./client/$(CFILE)exec: chmod +x $(XFILE)===============================================Asta simplu exemplu de Makefile. Deci daca eu am o variabila in Makefile, de exemplu VERSION si eu vreau ca aceasta variabila sa fie vizibila in sursa c++, eu pot cumva inafara de a transmite ca argument la aplicatie aceasta variabila? Ca aplicatia va fi un Shared Module da nu binar independent.
0