flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > FASM and "make dep"

Author
Thread Post new topic Reply to topic
neonz



Joined: 02 Aug 2003
Posts: 62
Location: Latvia
neonz 08 Aug 2004, 01:17
I'm using GCC together with FASM for my hobby OS. Assembler objects are written in FASM, C objects in GCC, and then everything is linked together with LD.

I am automatically calculating dependencies for C objects with the following code in MAKEFILE:

Code:
.PHONY: dep
dep:
        $(SED) '/\#\#\# GCC dependencies/q' < Makefile > tmp_make
        for i in *.c; do \
            $(CC) $(INCLUDE) -M $$i; \
        done >> tmp_make
        $(MV) tmp_make Makefile
    


Unfortunatelly, FASM does not have -M flag, so I can calculate only C dependencies currently. NASM have -M, but I prefer FASM syntax. So, maybe somebody have written some utility for this purpose. Or maybe this could be added to FASM itself. I don't like to maintain dependencies by hand.
Post 08 Aug 2004, 01:17
View user's profile Send private message Visit poster's website Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica 09 Aug 2004, 19:35
maybe a combo of grep and sed or awk could extract all extrn ?
Post 09 Aug 2004, 19:35
View user's profile Send private message Visit poster's website Reply with quote
neonz



Joined: 02 Aug 2003
Posts: 62
Location: Latvia
neonz 12 Aug 2004, 13:47
I don't need to extract extrn's, I need to extract include's.

Well, it seems there isn't something like this already done, so I will try to hack something by myself.
Post 12 Aug 2004, 13:47
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.