how to do this with Makefile



  • 1. Archiving two libraries into a single one?
    Hi All, I am a newbie. I would like to make one static library out of two existing static libraries. Is this possible? I tried: ar mybiglibrary.a lib1.a lib2.a and this did not work. ar seems to eat only .o files. Is there a utility allowing to exctract the .o files from .a libraries? (I know that nm allows to read the symbols so extraction should be possible no?) Thanks, Baba
  • 2. powerpc gcc
    Hi, where can i download the latest version of powerpc-linux-gcc binary. I tried compiling a new new one, i faced lot of issues. I better want a a binary that i can use it right away. please provide pointers. thanks

how to do this with Makefile

Postby FangQ » Fri, 15 Dec 2006 09:34:52 GMT


I am writing a Makefile to convert a bdf file into different pcf files
corresponding to different unicode ranges, the striped down version of
my Makefile looks like the following


CJK1=0x1100--0x11FF 0x2460--0x24EA
CJK2=0x2605--0x2606 0x262F--0x2637
CJK3=0x3105--0x312C 0x3131--0x318E


cjk: $(SLICE)
	$(SLICE) $(RANGE) $(R9).bdf  > $(R9)_cjk.bdf
	$(SLICE) $(RANGE) $(R10).bdf > $(R10)_cjk.bdf
	$(SLICE) $(RANGE) $(R11).bdf > $(R11)_cjk.bdf
	$(B2P) $(R9)_cjk.bdf  > $(R9).pcf
	$(B2P) $(R10)_cjk.bdf > $(R10).pcf
	$(B2P) $(R11)_cjk.bdf > $(R11).pcf

(the above code snip does not work, as you may notice)

what I want to do is when user make different targets, I want the
variable RANGE to change its value correspondingly. However, I don't
want to repeat the command block for each target.

I believe there must be an elegant way of doing this, i.e. set
variables differently for each target and execute a common set of
commands. However, I can not find it after an hour of search, so I hope
someone can help me up.

thank you


Re: how to do this with Makefile

Postby Pascal Bourguignon » Fri, 15 Dec 2006 09:39:33 GMT

"FangQ" < XXXX@XXXXX.COM > writes:

What I do:



cjk: $(SLICE)
	[ -z $(RANGE) ] && (echo must define RANGE ; exit 1) || true
 	$(SLICE) $(RANGE) $(R9).bdf  > $(R9)_cjk.bdf
 	$(SLICE) $(RANGE) $(R10).bdf > $(R10)_cjk.bdf
 	$(SLICE) $(RANGE) $(R11).bdf > $(R11)_cjk.bdf
 	$(B2P) $(R9)_cjk.bdf  > $(R9).pcf
 	$(B2P) $(R10)_cjk.bdf > $(R10).pcf
 	$(B2P) $(R11)_cjk.bdf > $(R11).pcf

__Pascal Bourguignon__                      http://www.**--****.com/ 
You're always typing.
Well, let's see you ignore my
sitting on your hands.

Re: how to do this with Makefile

Postby Ms Rullgd » Fri, 15 Dec 2006 10:22:34 GMT

"FangQ" < XXXX@XXXXX.COM > writes:

Make that last line read like this instead:

cjk cjk0 cjka: $(SLICE)

Ms Rullgd

Re: how to do this with Makefile

Postby FangQ » Fri, 15 Dec 2006 14:28:53 GMT

thank you, that's exactly what I am looking for.


Similar Threads:

1.Makefile, what am I doing wrong?

Someone please give me a jump start!

using gmake 3.77 on HPUX

my Makefile

define xxx
  echo "xxx $(1)"

XXX = echo "XXX $(1)"

x :
<tab>echo "xxx"
<tab>$(call XXX,"pigs")
<tab>$(call xxx,"rats")


$ gmake
echo "xxx"

It's not executing either of the call statements.  I've looked at the
man page several times and I believe I'm doing it correctly.

I'm trying to use the define as a sub routine call.  Where the same
commands will be used many times just the variable will change.
I'm writing a very large makefile and will be including @ 280 other
make.include pieces to avoid recursion.  I would like all commands to
be in the form of a define to maximize reuse.

2.What was first done for the vehicle again is done for the home

that widespread, organized
opposition  existed or  could  exist.  The tales  about  Goldstein and  his
underground  army,  she said, were simply  a lot of rubbish which the Party
had  invented for its  own purposes and which you had to pretend to believe
in.  Times beyond  number, at Party rallies and spontaneous demonstrations,
she  had shouted at  the top of her voice for the execution of people whose
names  she  had never  heard and in  whose supposed crimes  she had not the
faintest  belief. When public trials were happening she had taken her place
in  the  detachments from the  Youth League  who surrounded the courts from
morning to night, chanting at intervals 'Death to the traitors!' During the
Two  Minutes  Hate she  always excelled  all others  in shouting insults at
Goldstein.  Yet she had only the dimmest idea of who Goldstein was and what
doctrines  he  was supposed  to  represent.  She  had  grown up  since  the
Revolution  and  was too young  to remember  the ideological battles of 

3.problem while doing `mesg y' - done

Dances With Crows wrote:
> message command = /usr/bin/LinPopUp "%f" "%m" %s; rm %s
This works fine now...dammit, I should've done this long before. Thanks 
a lot to everybody who took out time to read my naive problems.


4.pgsql-server/src/makefiles Makefile.unixware

CVSROOT:	/cvsroot
Module name:	pgsql-server
Changes by:	 XXXX@XXXXX.COM 	04/05/13 21:10:52

Modified files:
	src/makefiles  : Makefile.unixware 

Log message:
	Properly quote variable for makefile use.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to  XXXX@XXXXX.COM  so that your
      message can get through to the mailing list cleanly

5.Import Makefiles & Export Makefiles


Does GNU has some tools for conversion of the local makefiles to
another IDE like Codewarrior, KIEL, IAR, VC++ etc ?
Features like - Import Makefile / Export Makefile and generation of the

whole project ?

Is there some kind of Universal tool available for the conversion of
makefiles from one environment to another environment ?
Features like - Import Makefile / Export Makefile and generation of the

whole project ?

I need this for different porting activities between different
to Linux and from linux to different environments .

Thx in advans, 
Karthik Balaguru

6. makefiles for subdirs: what goes in subdir makefiles?

7. VC++ makefile to AIX unix makefile

8. how to pass macro definition from parent makefile to child makefile

Return to unix


Who is online

Users browsing this forum: No registered users and 76 guest