Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add virtual library support (libspec type virtual) #30

Open
ethouris opened this issue Nov 6, 2024 · 0 comments
Open

Add virtual library support (libspec type virtual) #30

ethouris opened this issue Nov 6, 2024 · 0 comments

Comments

@ethouris
Copy link
Owner

ethouris commented Nov 6, 2024

Beside the static and dynamic libraries, there could be another type of library: virtual.

This actually wouldn't turn into a library file anyhow. Instead, it will simply collect all source files and then object files, and pass them whenever there's any other target (of type program or library) requesting it.

Example:

ag vlib -type library -libspec virtual -s file1.cc file2.cc
ag prg -type program -s main.cc -depends vlib

Produces the following rules:

phony vlib file1.ag.o file2.ag.o
# ... (rules for compiling file1.cc and file2.cc)
rule prg {
     g++ -o prg main.ag.o file1.ag.o file2.ag.o
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant