# This is for BePC - anyone want to add a BeMac configuration?

# Rule for building objects from NASM assembly files
obj/%.o: %.asm
	nasm -o $@ -f elf $<

# Rule for building the BWindow library
lib/libSDLbwindow.so.$(version): $(PORTABLE_OBJS) $(BWINDOW_OBJS) $(ASM_OBJS)
	$(CC) -nostart -o $@ $^  -lroot -lbe -lmedia -ltextencoding
	: Create the symbolic link for the dynamic library
	lib=`basename $@`; \
	link=`echo $$lib | sed 's/\.[0-9]*$$//'`; \
	if [ ! -r lib/$$link ]; then \
	  echo "lib/$$lib <- lib/$$link"; \
	  ln -s $$lib lib/$$link; \
	fi
