ddsss

Setting up dir. structure with dsss


I'm trying to setup directoy structure with dsss:

./proj  -- project files

./src   -- source
./dev   -- dev files, test files
./lib   -- source for libraries used

./res   -- resource files
./doc   -- documentation

./bin   -- binary files
./obj   -- object files

Not properly working dsss.conf in the ./proj directory.

name=SomeProject

srcdir+=../src # this doesn't work

[../lib/sqlite3-d]
type=subdir

# Test files
[../dev/sqlite-test.d]
target=../bin/test-sqlite

# Program
[../src/main.d]
target=../bin/main

Any idea where to get more information on how to setup such structure more nicely. I'm unable to find the proper location to put the folder structure information.

The main thing i'm trying to accomplish is to keep files generated by dsss only in ./obj and ./bin directories.


Solution

  • Finally got it working with using rebuild and Makefile:

    This the Makefile:

    CMD = rebuild $< -Isrc -Idev -oqobj -ofbin/$@
    
    SOURCES = src/srcfile1.d src/srcfile2.d
    
    all: main test
    
    main: src/main.d $(SOURCES)
        $(CMD)
    
    test: dev/test.d $(SOURCES)
        $(CMD)
    
    cleanall: clean
    clean:
        rm -f bin/main
        rm -f bin/test
        rm -f obj/*