Now I think the code works. There were some indexing mistakse,
return instead of continue, etc.
all: sokosol
sokosol: map.o sokosol.o os.o algorithm.o
map.o: map.c general.h
sokosol.o: sokosol.c general.h
os.o: os.c general.h
algorithm.o: algorithm.c general.h
clean:
rm -f sokosol *.o