Makefile with sources in diferent folders


 
Thread Tools Search this Thread
Operating Systems Linux Makefile with sources in diferent folders
# 8  
Old 05-13-2008
I would have thought something more or less along these lines:

Code:
tmp/%.c:
      cp $$(test -e platform_source/$*.c && echo platform_source || echo master_source)/$*.c $@

I'm still just struggling with the idea that it's probably better to tell the compiler to prefer files from platform_source over files from master_source and avoid this whole silly copying business (gripes over apparent negligence towards code modularity notwithstanding).
# 9  
Old 05-13-2008
Computer

jeje, it's really better, but the company is working with batch files (Windows XP), and that's my idea to reduce compiling time. It would really take a long time to modify all source files along with creating Makefiles. For now I just will create makefile, repeating steps of batch files. Anyway thanks for replys. Good luck!

Last edited by borzh62; 05-13-2008 at 04:59 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Connection to diferent server

Hello I'm conecting in server1 and I need connect to server2(other). I need doing that becouse I need run a lot bach of diferent serverX. I explain better: Connectionn server1 ## I need that all the step exit for xxx.txt of the server1 - run xxxx.sh - Conection server2 - su -... (1 Reply)
Discussion started by: bsebastian
1 Replies

2. UNIX for Dummies Questions & Answers

Question about I/O sources

Hi all, What is the difference between these two comands? sed s/a/b/ <f1 >f2 sed s/a/b/ f1 >f2 Best, santiagorf (3 Replies)
Discussion started by: santiagorf
3 Replies

3. Shell Programming and Scripting

multiple and diferent printf(s) for diferent fields in awk

Hi, I'm trying to print and outrput of a timestamp from a script i did that calcs de time diference betwen 2 timestamps in the format HH:MM:SS and i properly formated it with printf inside awk, but i can't do it with separate statements. This works fine, but can you explaim-me how to do it... (2 Replies)
Discussion started by: grafman
2 Replies

4. UNIX for Dummies Questions & Answers

Searching for folders/parent folders not files.

Hello again, A little while back I got help with creating a command to search all directories and sub directories for files from daystart of day x. I'm wondering if there is a command that I've overlooked that may be able to search for / write folder names to an output file which ideally... (2 Replies)
Discussion started by: Aussiemick
2 Replies

5. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

6. News, Links, Events and Announcements

Are the UnixWare 7.1.1 sources available?

So, I was browsing groklaw.net, and I was surprised to read that Pamela Jones was reading the copyright notices in the UnixWare 7.1.1 source code files... Groklaw - Santa Cruz Listed Novell as Owning the Copyrights in 1999 How can that be? Are the UnixWare 7.1.1 sources available to the... (1 Reply)
Discussion started by: pepinox
1 Replies

7. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

8. Linux

Kernel sources

I"m installing my ATI card in FC4. I'm going off of instructions that i've found. The firs step says that i need my kernel sources which i've got then it says that i've gotta unpack them so i can make links to the file later. My kernel sources that i've got are .src.rpm I've installed them but... (1 Reply)
Discussion started by: byblyk
1 Replies

9. UNIX for Dummies Questions & Answers

Subtract date & time in diferent rows

Hi Friends :) I have a long file having fields in the form : Field1 yy/mm/dd hh:mm:ss Duration(Sec) line 1) 123123 05/11/30 12:12:56 145 line 2) 145235 05/11/30 12:15:15 30 line 3) 145264 05/11/30 13:14:56 178 . . I want to subtract yy/dd/dd hh:mm:ss in line (2) from yy/mm/dd hh:mm:ss in... (1 Reply)
Discussion started by: vanand420
1 Replies

10. UNIX for Dummies Questions & Answers

unix sources

hello, i'm looking for the sources of the old, original unices (v3 preferred). could someone point a link? (2 Replies)
Discussion started by: fdarkangel
2 Replies
Login or Register to Ask a Question