LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-09-2015, 10:38 AM   #1
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Putting files in the executable with make?


Hello

I know this way:

Code:
xxd -i icon.png > icon.c
Then I can add icon.c file in the makefile.

The problem is, if I change icon.png, make doesn't see it. Maybe make or gcc have a different way to do this?
 
Old 07-09-2015, 12:19 PM   #2
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,781

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Have you tried adding something like this in your Makefile:

Code:
icon.c : icon.png
	xxd -i $< > $@ # NOTE: there is tab at the beginning of this line
 
1 members found this post helpful.
Old 07-09-2015, 12:41 PM   #3
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Original Poster
Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
It worked, thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make all files under certain directory executable by default? Sefid par Linux - Server 2 05-18-2014 10:34 PM
Make files on NTFS partitions executable Schreiberling Linux - Software 3 02-12-2014 02:39 PM
Force executable .exe files when creating .iso files? red hat flyfisherman Linux - General 6 12-01-2011 06:10 PM
how do you make 'icons' on executable files? servnov General 7 01-01-2005 08:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration